Skip to main content

Exposes /.well-known/mcp-server on Django projects for MCP agent discovery. Implements draft-serra-mcp-discovery-uri.

Project description

django-mcp-discovery

Exposes /.well-known/mcp-server on your Django project so AI agents can discover your MCP server via mcp://.

Implements draft-serra-mcp-discovery-uri.

Installation

pip install django-mcp-discovery

Setup

1. Add to INSTALLED_APPS:

# settings.py
INSTALLED_APPS = [
    ...
    'mcp_discovery',
]

2. Include URLs:

# urls.py
from django.urls import path, include

urlpatterns = [
    ...
    path('', include('mcp_discovery.urls')),
]

3. Done. Visit https://yoursite.com/.well-known/mcp-server to verify.

Configuration (optional)

# settings.py
MCP_DISCOVERY = {
    'NAME': 'My Site MCP Server',
    'ENDPOINT': 'https://mysite.com/mcp/',
    'DESCRIPTION': 'My site MCP endpoint',
    'AUTH': 'none',              # none | apikey | oauth2
    'CAPABILITIES': ['tools', 'resources'],
    'CATEGORIES': ['e-commerce', 'fashion'],
    'LANGUAGES': ['it', 'en'],
    'CONTACT': 'api@mysite.com',
    'DOCS': 'https://mysite.com/mcp/docs/',
    'CRAWL': True,               # False to opt out of indexing
}

Without any configuration the plugin auto-detects:

  • Name — from django.contrib.sites or SITE_NAME setting
  • Endpoint — from SITE_URL or first non-localhost ALLOWED_HOSTS
  • Language — from LANGUAGE_CODE setting

Example output

{
  "mcp_version": "2025-06-18",
  "name": "My Shop MCP Server",
  "endpoint": "https://myshop.com/mcp/",
  "transport": "http",
  "auth": { "type": "none" },
  "capabilities": ["tools", "resources"],
  "languages": ["it"],
  "crawl": true
}

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_mcp_discovery-0.2.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_mcp_discovery-0.2.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file django_mcp_discovery-0.2.0.tar.gz.

File metadata

  • Download URL: django_mcp_discovery-0.2.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for django_mcp_discovery-0.2.0.tar.gz
Algorithm Hash digest
SHA256 17aa9b369f0fc7ed49756309c45b85e22bff0747cf154451d8ac5664521fb16f
MD5 d0f6d7a6e641b14aa02dca37e06aaa38
BLAKE2b-256 1f77bcb550cb4a5c830adb5bc68a88efb4c698e227a69cedc266246f9e155dbc

See more details on using hashes here.

File details

Details for the file django_mcp_discovery-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_mcp_discovery-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0dad4165832e7c60321388b0f28607cbdbbf3b4bf79eda5c3879745d7a3f71c
MD5 53e55b6071040eb9dbec00c39f782d33
BLAKE2b-256 76d23e0baafc22222782b10cf42753b0a4fe56f14b4d50faee1a0905fa58c264

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page