Back to Home
mosco23 icon

django-mcp-integration

Verified Safe

by mosco23

Overview

Provides a seamless integration for exposing Model Context Protocol (MCP) tools as an asynchronous API within a Django application using FastMCP.

Installation

Run Command
uvicorn django_mcp_test.asgi:application

Environment 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

Stats

Interest Score0
Security Score9
Cost ClassLow
Stars0
Forks0
Last Update2025-12-23

Tags

DjangoMCPFastMCPAI IntegrationASGI