Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when adding, changing, deploying, testing, or debugging FastMCP MCP servers in existing Django apps, including ASGI mounting, stdio or sidecar servers, Django ORM access from MCP tools, auth and permissions, Streamable HTTP deployment, and MCP client tests.
.claude/skills/hashgraph-online-fastmcp-django/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -16% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 10% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 47% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 35% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 56% | 0% |
Use FastMCP to expose small, typed Django application capabilities to agents. Keep Django as the source of truth for auth, permissions, validation, models, transactions, and business rules. Treat FastMCP as the protocol layer around existing application services.
fastmcp package (from fastmcp import FastMCP) fornew Python MCP work in Django.
from mcp.server.fastmcp import FastMCP)when the project has already standardized on it, needs lower-level protocol control, or a host explicitly requires SDK behavior.
django-mcp-server only when the project needs a Django-nativepackage that works inside WSGI or declaratively exposes models/DRF APIs. Audit generated tool contracts and permissions before exposing private data.
proxied tools can help for a first pass. For production agents, prefer hand-curated tools with purpose-built names, schemas, permissions, and bounded outputs.
FastMCP docs track the project's main branch, so re-check current docs when relying on recently added features or version badges.
Load only the files needed for the current task:
| Need | Read | | --- | --- | | Step-by-step implementation in an existing Django app | workflows/add-fastmcp-to-django.md | | Stdio, HTTP sidecar, ASGI mount, and path-prefix examples | references/transports.md | | Tool contract design, ORM boundaries, async rules, resources, and prompts | references/tool-design.md | | Auth, deployment, tests, local checks, and debugging symptoms | references/auth-deployment-testing.md |
manage.py, settings, asgi.py,wsgi.py, URL routing, auth middleware, APIs, background jobs, and deployment files.
scale independently.
ASGI and sharing process/domain is intentional.
apps/core/mcp.py orproject/mcp.py.
serializers, policy methods, or domain functions.
fastmcp.Client before wiring the transport. Most behaviorshould be tested in memory without a running web server.
browsing, arbitrary imports, file path access, or "admin" tools unless the project has a clear allowlist and authorization plan.
docstrings, and small JSON-serializable return values.
querysets, open files, or huge payloads.
model dumps.
dependency. Never let the model provide privileged identity fields in production.
def FastMCP tools for ordinary Django ORM work unless theproject has a clear async design.
close_old_connections() around ORM workor centralize connection cleanup in a thin helper.
instead of holding MCP requests open.
fastmcp list orfastmcp inspect when tool contracts matter.
confirmation, database state changes, and transaction.on_commit side effects.
behavior, or URL paths changed.
Other measured skills in the registry, with their headline benchmark lift.