{"$schema":"https://wellknown.network/schemas/agent-record-v1.json","schemaVersion":"1","id":"ag_wxkz3pcj989p","handle":"django-ninja-mcp-server","url":"https://wellknown.network/agents/django-ninja-mcp-server","links":{"self":"https://wellknown.network/agents/django-ninja-mcp-server/record.json","html":"https://wellknown.network/agents/django-ninja-mcp-server","markdown":"https://wellknown.network/agents/django-ninja-mcp-server/record.md","api":"https://wellknown.network/api/v1/agents/django-ninja-mcp-server","status":"https://wellknown.network/api/v1/agents/django-ninja-mcp-server/status","claim":"https://wellknown.network/agents/django-ninja-mcp-server/claim","claimApi":"https://wellknown.network/api/v1/claims","claimDescriptor":"https://wellknown.network/agents/django-ninja-mcp-server/claim.json","badge":"https://wellknown.network/agents/django-ninja-mcp-server/badge.svg","openapi":"https://wellknown.network/openapi.json","history":"https://wellknown.network/api/v1/agents/django-ninja-mcp-server/history","tools":"https://wellknown.network/api/v1/agents/django-ninja-mcp-server/tools"},"ard":{"identifier":"urn:air::server:django-ninja-mcp-server","type":"application/mcp-server-card+json"},"kind":"mcp_server","declared":{"name":"django-ninja-mcp-server","summary":"Expose Django Ninja operations and Python functions as MCP tools for Claude Code, Codex and other MCP clients.","description":"# django-ninja-mcp-server\n\nLet MCP clients such as Claude Code and Codex call your Django project.\n\nYou pick which Django Ninja operations and Python functions to expose. Each one\nbecomes an MCP tool that runs as a real Django user, through the same auth,\nvalidation and permission code as your HTTP API.\n\n- **Local (stdio):** `manage.py mcp --user alice`. For a developer's own\n  machine, with no tokens.\n- **Remote (Streamable HTTP):** OAuth 2.1, with\n  [django-oauth-toolkit](https://github.com/jazzband/django-oauth-toolkit)\n  as the authorization server. Tokens must be issued for your MCP URL\n  (RFC 8707), and each tool can require scopes.\n\nBuilt on the official [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk)\n2.x and [Django Ninja](https://django-ninja.dev) 1.7+.\nSupports Python 3.10+ and Django 4.2+.\n\n## Install\n\n```bash\npip install django-ninja-mcp-server            # stdio only\npip install \"django-ninja-mcp-server[oauth]\"   # adds django-oauth-toolkit for HTTP\n```\n\nAdd `\"ninja_mcp\"` to `INSTALLED_APPS` (for the `mcp` management command).\n\n## Expose tools\n\n```python\n# myproject/mcp.py\nfrom ninja_mcp import NinjaMCP, get_identity\n\nfrom orders.api import api\nfrom orders.models import Order\n\nmcp = NinjaMCP(\"Shop\", instructions=\"Tools for the shop's order data.\")\n\n# Django Ninja operations, by view name or operation ID.\nmcp.add_operations(api, [\"list_orders\", \"get_order\"], scopes=[\"orders:read\"])\nmcp.add_operations(api, [\"refund_order\"], scopes=[\"orders:write\"])\n\n# Plain functions. Sync functions run in a worker thread, so the ORM works.\n@mcp.tool(scopes=[\"orders:read\"])\ndef count_open_orders() -> int:\n    \"\"\"Count the caller's open orders.\"\"\"\n    return Order.objects.filter(owner=get_identity().user, status=\"open\").count()\n```\n\n```python\n# settings.py\nNINJA_MCP_SERVER = \"myproject.mcp.mcp\"\n```\n\nAn operation must allow MCP calls in its `auth`:\n\n```python\nfrom ninja.security import django_auth\nfrom ninja_mcp import MCPAuth\n\n@api.get(\"/orders\", resp…","publisher":{"name":"Mariano Baragiola","url":null},"homepage":null,"repository":"https://github.com/mbaragiola/django-ninja-mcp-server/issues","version":"0.1.0","license":null,"protocols":["mcp"],"tags":["claude","codex","django","django-ninja","mcp","model","context","protocol"],"pricing":null,"endpoints":[{"url":"pypi:django-ninja-mcp-server","type":"package_pypi","auth":null,"probeable":false}],"skills":null,"tools":null,"extra":null,"attribution":{"kind":"pypi","name":"pypi","repoUrl":"pypi","summary":"pypi","version":"pypi","description":"pypi","publisherName":"pypi"}},"derived":{"capabilities":[{"slug":"security.identity","name":"Identity & Access","confidence":1,"provenance":"derived"}],"categories":["security"],"language":"en"},"observed":{"status":"unknown","statusReason":"Distributed as a package to run locally; no network endpoint to check.","lastOkAt":null,"lastProbedAt":null,"statusComputedAt":null,"reliability30d":null,"latestObservations":[],"tools":null,"package":{"name":"django-ninja-mcp-server","registry":"pypi","observedAt":"2026-11-05T21:26:36.774Z","publishedAt":"2026-11-05T00:40:49.325094Z","latestVersion":"0.1.0"},"toolSurface":null,"endpointFacts":[]},"verification":{"claimed":false,"claimedAt":null,"proofs":[]},"provenance":{"sources":[{"source":"pypi","key":"django-ninja-mcp-server","url":"https://pypi.org/project/django-ninja-mcp-server/","firstSeenAt":"2026-11-05T21:25:08.811Z","fetchedAt":"2026-11-05T21:25:08.811Z","normalizedAt":"2026-11-05T21:25:08.811Z"}]},"firstSeenAt":"2026-11-05T21:25:08.811Z","updatedAt":"2026-11-05T21:26:36.774Z"}