About Django MCP Integration
Django MCP Integration is an MCP server published by mosco23 in the Developer Tools category: dJANGO MCP SERVER INTERGRATION.
Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.
Install
git clone https://github.com/mosco23/django-mcp-integrationThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Django MCP Integration
Powered by Claude · Grounded in docs
Security checks
- ✓README presentThe repository ships documentation.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
4 checks have not been run yet.
Releases
README
Django MCP Integration
Intégration transparente de MCP (Model Context Protocol) dans Django via FastMCP.
Installation
pip install django-mcp-integration
Configuration Django
- Modifier le fichier settings.py
# settings.py
INSTALLED_APPS = [
# ...
'django_mcp_integration',
]
# Optionnel
MCP_SERVER_NAME = "Mon Serveur MCP"
MCP_HOST = "localhost"
MCP_PORT = 8000
MCP_HTTP_PATH = "/mcp/"
MCP_ENABLED = True
MCP_SERVER_INSTRUCTIONS = None
MCP_SERVER_VERSION = "1.0.0"
- Modifier le fichier asgi.py
# asgi.py
import os
# from django.core.asgi import get_asgi_application
from django_mcp_integration.handlers.asgi import get_mcp_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'my_project.settings')
application = get_mcp_asgi_application()
Utiliser dans un outil
# blog/tools.py or blog/mcp_tools.py
from django_mcp_integration import mcp_tool
@mcp_tool(
name="add",
description="make a + b",
)
async def add(a: int, b: int) -> int:
return a + b
@mcp_tool(
name="create_post",
description="create post by IA"
)
class CreatePostTool:
# optional
def check_permission(self, obj):
pass
# required method
async def execute(self, title: str, content: str):
pass
lancerment du server
uvicorn django_mcp_test.asgi:application
README copy captured when this server was indexed; it may lag the repository. The original is authoritative.