django-mcp-integration
Verified Safeby mosco23
Overview
Provides a seamless integration for exposing Model Context Protocol (MCP) tools as an asynchronous API within a Django application using FastMCP.
Installation
uvicorn django_mcp_test.asgi:applicationEnvironment Variables
- MCP_ENABLED
- MCP_SERVER_NAME
- MCP_SERVER_VERSION
- MCP_SERVER_INSTRUCTIONS
- MCP_HOST
- MCP_PORT
- MCP_HTTP_PATH
- MCP_AUTO_DISCOVER
- MCP_ENABLE_CACHE
- MCP_CACHE_TTL
- MCP_MAX_WORKERS
- MCP_LOG_LEVEL
- MCP_LOG_REQUESTS
Security Notes
The project leverages Django's built-in security features for API key hashing (SHA512 with constant-time comparison). API key authentication is implemented for securing tool access. Tool discovery uses `importlib` but is restricted to defined patterns within Django app directories, mitigating risks associated with arbitrary code loading. No direct `eval` or `exec` patterns were found in the provided code. Users should ensure standard Django application security practices are followed for the overall project.
Similar Servers
fastmcp
FastMCP is an ergonomic interface for the Model Context Protocol (MCP), providing a comprehensive framework for building and interacting with AI agents, tools, resources, and prompts across various transports and authentication methods.
tmcp
A server implementation for the Model Context Protocol (MCP) to enable LLMs to access external context and tools.
django-ai-boost
Provides Model Context Protocol (MCP) tools for AI assistants to introspect and interact with Django project details and runtime information.
zeromcp
A minimal, pure Python Model Context Protocol (MCP) server for exposing tools, resources, and prompts via HTTP/SSE and Stdio transports.