Your DRF API as MCP tools β 1,800 endpoints become 16 dispatchers, permissioned by Django.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
The Django MCP gateway that discovers your API automatically.
frisian-mcp turns your existing Django REST Framework ViewSets into Model Context Protocol tools with zero boilerplate. Add the package, include one URL, and every ViewSet action becomes a callable MCP tool β name, description, and input schema derived from your serializers automatically.
Designed for token-efficient agent workflows. A 50-action Django app loads in 500β2,000 tokens of tools/list schema instead of the 15,000β25,000 conventional flat MCP would emit; a 60-device bulk-write response is 24 tokens instead of ~10,800 of full echo. Same surface, two orders of magnitude less context burned before the agent has done any reasoning. Full numbers in Token efficiency.
Version: 1.1.1 | License: Apache 2.0 | Python: 3.11+ | Django: 5.x
Project site: https://frisian-mcp.com/
A live MCP server is hosted at https://frisian-mcp.com/ for hands-on evaluation β point any MCP-compatible client at it to see the dispatcher pattern and lean envelope behavior against a real surface. The same site serves the project documentation through an MCP-consumable dispatcher, so coding agents (Claude Code, Codex, Gemini CLI, etc.) can connect to it directly and consume installation, configuration, and decorator reference material as part of their working context while integrating frisian-mcp into your own project.
| Feature | Details |
|---|---|
| Auto-discovery | Walks URL patterns at startup; registers every ViewSet action as an MCP tool |
| Zero boilerplate | Name, description, and input schema derived from DRF serializers automatically |
@mcp_dispatcher | One tool β many actions; built-in help mode; per-action validation |
@mcp_tool | Explicit single-function tool registration for custom logic |
@mcp_resource | Expose server-side content via resources/list / resources/read |
| Filter introspection | SearchFilter, OrderingFilter, DjangoFilterBackend β schema properties on list |
| Allowlist / denylist | FRISIAN_MCP_TOOL_ALLOWLIST / FRISIAN_MCP_TOOL_DENYLIST for surgical surface control |
| Dispatch groups | FRISIAN_MCP_DISPATCH_GROUPS β bundle N tools into 1 dispatcher; action="help" for discovery |
| Deferred discovery | URL scan fires on first request β captures late-loading plugin ViewSets |
| OAuth 2.0 | contrib.oauth β authorization code (PKCE) + client credentials; HMAC-hashed tokens |
| Static tokens | contrib.tokens β HMAC-hashed Bearer tokens for internal agents |
| Per-agent scoping | contrib.agents β per-credential tool allowlists; fail-closed on inactive connections |
| Permission tiers | FRISIAN_MCP_TOKEN_TIER_MAP / FRISIAN_MCP_MAX_TIER β map roles to read/write gates |
| Host-app scoping | SyncInvocation calls viewset.initial() β host RBAC, queryset filtering, and throttles enforced |
| Tool middleware | FRISIAN_MCP_TOOL_MIDDLEWARE β audit logging, rate limiting, heartbeats |
| Rate limiting | RateLimitMiddleware β built-in sliding-window, no Redis required |
| Pluggable backends | Custom discovery and invocation backends via dotted-path settings |
| SSE support | Accept: text/event-stream wraps any response in a single SSE event |
MCP 2025-11-25 | Streamable HTTP; ping, initialize, tools/list, tools/call, resources/list |
The dispatcher pattern and the lean write envelope exist for one reason: agent context windows are finite, and the conventional MCP shape (one tool per ViewSet action; full serialized echo on every write) burns through that budget before the agent has done anything useful.
Measured numbers from real integrations:
| Scenario | Default MCP shape | frisian-mcp | Reduction |
|---|---|---|---|
tools/list for a 50-action Django app | ~15,000β25,000 tokens | 500β2,000 tokens with FRISIAN_MCP_DISPATCH_GROUPS | ~95% |
tools/list for a large infrastructure Django app | 1,737 flat tools | 15 dispatcher tools | tool surface reduced ~99% |
| 60-device bulk-create response | ~10,798 tokens (full echo) | 24 tokens (lean envelope) | 99.8% |
| 200-device bulk-create response | ~36,000 tokens | 24 tokens (constant) | 99.9% |
The bulk-write savings are constant regardless of batch size β the lean envelope is fixed-shape and the full response is reachable via the continuation token without re-running the write. The dispatcher reduction is opt-in through FRISIAN_MCP_DISPATCH_GROUPS (autodiscovery alone gives the conventional flat shape).
See The Token Problem, Dispatcher Pattern, and Write-Path Response Filtering for the design rationale and full measurements.
1. Install and add to INSTALLED_APPS:
2. Include the gateway URL:
That's it. With auto-discovery enabled (the default), every DRF ViewSet in your URL tree is now an MCP tool.
After startup, the gateway exposes users.list, users.retrieve, users.create, users.update, users.partial_update, and users.destroy β derived entirely from the ViewSet.
3. Generate a client config:
Use --client to emit the format expected by a specific MCP client. Use --url and --name to override the server URL and key.
4. Verify the install:
Walks the configuration end-to-end and exits non-zero on errors. Run after every install, every config change, and as the first diagnostic step on any unexpected behaviour. See the mcp_doctor guide for the full check list.
@mcp_tool, @mcp_dispatcher, and auto-discovery all write to the same tool_registry singleton.isError: true, not JSON-RPC errors. Permission denials and handler exceptions return isError: true inside a normal HTTP 200 response β the session stays alive./mcp/ surface. Tool-level tiers gate individual tools/call invocations.For teams building purpose-built agent tools, frisian-mcp ships the @mcp_dispatcher pattern: one MCP tool name routes to many actions internally.
One tool in tools/list instead of many. Call with action="help" for a structured listing of available actions. Per-action JSON Schema validation runs before the method.
This is the pattern for agent-facing APIs where tool count matters and progressive disclosure beats a flat list.
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/frisian-mcp-django)<a href="https://allmcps.com/mcp/frisian-mcp-django"><img src="https://allmcps.com/api/badge/frisian-mcp-django?style=directory" alt="Frisian MCP (Django) on AllMCPs" /></a>