Django MCP server
MCP server by gts360 Verified · gh:gts360
Django MCP Server adds Model Context Protocol support to Django apps. It lets AI agents and MCP clients query Django models and call Django logic through an MCP endpoint, for developers who want to connect their Django project to AI assistants.
Install Django MCP server
Built from the published package, never by AI.
claude mcp add django-mcp-server -- uvx django-mcp-serverRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"django-mcp-server": {
"args": [
"django-mcp-server"
],
"command": "uvx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"django-mcp-server": {
"args": [
"django-mcp-server"
],
"command": "uvx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"django-mcp-server": {
"args": [
"django-mcp-server"
],
"command": "uvx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add django-mcp-server -- uvx django-mcp-server{
"mcpServers": {
"django-mcp-server": {
"args": [
"django-mcp-server"
],
"command": "uvx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add django-mcp-server uvx django-mcp-serverGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the django-mcp-server block.
About
Django MCP Server is an MCP extension for Django, published on PyPI as django-mcp-server. It serves an MCP endpoint inside a Django app, by default at /mcp. Developers expose models by subclassing ModelQueryToolset, or publish generic methods by subclassing MCPToolset. Django REST Framework views can be registered as MCP tools with annotations.
The source says it works on both WSGI and ASGI without infrastructure changes. It can be tested with the MCP Python SDK, Claude AI through streamable HTTP, and Claude Desktop for local servers. The README recommends enabling authorization for non-public data, and it suggests OAuth2 for Claude AI. The project is aimed at Django developers who want AI agents to interact with their applications.
Written from the project's README and checked against it.
Tools it gives your assistant
ModelQueryToolsetSubclass it with a model attribute to give MCP clients access to a Django model.MCPToolsetSubclass it to publish generic methods as tools. Private methods starting with an underscore are not published.mcp_inspectManagement command that checks that your tools are correctly declared.drf_publish_create_mcp_toolAnnotation that registers a Django REST Framework create view as an MCP tool.drf_publish_update_mcp_toolAnnotation that registers a Django REST Framework update view as an MCP tool.drf_publish_delete_mcp_toolAnnotation that registers a Django REST Framework delete view as an MCP tool.drf_publish_list_mcp_toolAnnotation that registers a Django REST Framework list view as an MCP tool.drf_serialize_outputAnnotation that serializes a tool's output with a Django REST Framework serializer.
What you need
- A Django project
- Python with pip to install the package
- An OAuth2 setup such as django-oauth-toolkit for Claude AI remote use
- Claude Desktop installed on the same machine for local use
Try asking
- Use the BirdQueryTool to list birds that have a known location.
- Call the add tool to add two numbers together.
- Send an email to a client using the send_email tool from my Django app.
Good to know
- Claude Desktop only supports local MCP servers, so the app must run on the same machine.
- Claude AI requires Dynamic Client Registration, which the source says django-oauth-toolkit does not support by default.
- Built-in DRF authentication, filter backends, permission classes and pagination are disabled for published DRF views by default.
- Async tools must use Django's async ORM API, and tools must not return a QuerySet.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to Django MCP server
All alternatives →Oh My Posh Validator is listed as an MCP server, but the source is the README for oh-my-posh, a cross platform prompt theme engine. It does not describe an MCP server, tools, or schema validation.
Sim is a workspace for building, deploying and managing AI agents and workflows. Its MCP server lets Claude, Claude Code, Codex or another MCP client manage workspaces, workflows, tables, knowledge bases, files and logs.
Omnara deploys durable AI agents on any model and any machine. It is an open-source, self-hostable managed agent platform under Apache 2.0, with a REST API, TypeScript SDK, CLI, and MCP server.
Strata is an MCP server from Klavis AI for progressive tool usage, described as a way to optimize the AI agent's context window. The repository is deprecated, but it remains public for reference and for local or hosted use.
VoiceMode is an MCP server that adds voice conversations to Claude Code and other MCP capable agents. It uses speech-to-text and text-to-speech. It suits people whose hands or eyes are busy.
Gives an AI agent access to the skills, plugins, MCP connections, and Google Workspace and Microsoft 365 capabilities assigned to you by your OpenWork organization, through one OAuth MCP URL. Intended for people and teams who want to reuse the same setup across agents, tools, and machines.
Compare with Oh My Posh Validator, Sim or Omnara
Django MCP server: common questions
Does Django MCP Server work with ASGI and WSGI?
The source says it works on both WSGI and ASGI without infrastructure change.
How do I secure the MCP endpoint?
The README says to enable authorization through DJANGO_MCP_AUTHENTICATION_CLASSES for non-public data. It also says the MCP specification version 2025-03-26 advises an OAuth2 workflow.
Can I use it with Claude Desktop?
Yes, but the source says Claude Desktop only supports local MCP servers, so the app must be installed on the same machine.
How do I install Django MCP server?
In Claude Code run claude mcp add django-mcp-server -- uvx django-mcp-server. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is Django MCP server the official server?
Django MCP server is published by gh:gts360 from its verified domain in the official MCP Registry.
Is Django MCP server free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is Django MCP server safe to use?
It scores 67 of 100. Grades: maintenance D, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to Django MCP server?
Similar MCP servers: Oh My Posh Validator, Sim, Omnara, strata.
Does Django MCP server work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
