writing-skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
fastmcp-djangoUse 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.
Independent GitHub snapshot · Automated classification · Original documentation governs
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) for
new 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-native
package that works inside WSGI or declaratively exposes models/DRF APIs. Audit
generated tool contracts and permissions before exposing private data.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.apps/core/mcp.py or
project/mcp.py.fastmcp.Client before wiring the transport. Most behavior
should be tested in memory without a running web server.def FastMCP tools for ordinary Django ORM work unless the
project has a clear async design.close_old_connections() around ORM work
or centralize connection cleanup in a thin helper.fastmcp list or
fastmcp inspect when tool contracts matter.transaction.on_commit side
effects.