The Django MCP server. Even if you don't use Django.

Already on Django? One class, two lines of code, and your models become typed tools LLM agents can call โ€” over stdio for desktop assistants, over HTTP (JSON-RPC POST) for HTTP clients. The REST API ships at the same time, from the same source. Not on Django? Point 0-mcp init at any MySQL or Postgres database and walk away with a complete Django + 0-mcp project ten seconds later. Either way, you end up with the same battle-tested stack: async by default, Redis-native, multi-tenant aware. Zero MCP boilerplate. Zero schema drift. One source of truth.

Already have a database? Skip the model and resource boilerplate entirely:

pip install 'django-zeromcp[gen-mysql]'
0-mcp init --db mysql://user:pass@host/dbname --output ./myproject

In ~10 seconds, every table is a model, every model is an MCP tool, every tool has typed schemas. Read the full walkthrough.

Setup (once per app)

from zeromcp import BaseResource
from myapp.models import Space

Your entire resource โ€” 2 lines

class SpaceResource(BaseResource):
    model = Space

That's it. You now have a complete MCP server:

And โ€” without writing a single extra line โ€” the same class also serves a REST API:

No second codebase. No schema drift. Your agent surface and your API are the same source of truth.

Async dispatch, session and API-key auth, per-IP rate limit, scanner blocking, sanitized 500s, HMAC-SHA256 anti-replay tokens, multi-tenant DB routing โ€” all on by default. For both MCP and REST. You did not configure them. You did not even import them.

Need filters, search, ordering, write whitelists, cache, ownership scoping, Pydantic validation? Add one attribute at a time:

class SpaceResource(BaseResource):
    model = Space
    list_fields    = ['id', 'name', 'description', 'active']
    filter_fields  = ['active', 'name']
    search_fields  = ['name', 'description']
    create_fields  = ['name', 'description']
    update_fields  = ['name', 'description', 'active']
    cache          = True
    owner_field    = 'owner_id'

What you didn't have to write

None of it is wired by hand. None of it can drift. None of it is your problem anymore.

Built for agents first

Every Django app that exists today will need an agent surface tomorrow. Claude Desktop, Cursor, custom copilots, in-house automation โ€” they all expect typed tools with JSON Schema, descriptions and bounded outputs. Writing that by hand, alongside the API you already have, means two codebases that drift apart.

0-mcp closes the gap. The MCP server reuses the same model fields, Pydantic schemas, field whitelists, auth, rate limit and ownership scoping the REST layer uses. Same protections. Same source of truth. Turn it on and your existing Django app becomes agent-ready.

Same auth. Same rate limit. Same ownership scoping. No DSL to learn. No second codebase to keep in sync.

Built for the boring 90%

CRUD on a Django model. List with filters. Soft auth gates. Tenant DB routing. Most of what an agent needs โ€” and most of what your API does โ€” is this. Writing it from scratch, twice, is the slowest, dumbest part of the job.

0-mcp is the answer for that 90%. The remaining 10% โ€” the actual product โ€” gets all your attention.

Production-ready out of the box

ConcernStatus
MCP server (stdio + HTTP)โœ… opt-in
MCP tool schema generationโœ… default
Async views (Django 5+)โœ… default
Redis-backed sessions, cache, rate limitโœ… default
Multi-tenant DB routingโœ… opt-in
Pydantic validationโœ… opt-in
Scanner blocking + 4xx flood detectionโœ… default
OpenAPI 3.0.3 + Scalar UIโœ… default
HMAC-SHA256 anti-replay tokenโœ… opt-in
165-test suiteโœ… green

Who is this for

๐Ÿš€

The first MCP tool takes five minutes. The fiftieth takes five minutes too.

Project

0-mcp by Stamatios Stamou Jr โ€” github.com/ssjunior/0-mcp