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.1.0.tar.gz (4.1 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.1.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_mcp_discovery-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 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.1.0.tar.gz
Algorithm Hash digest
SHA256 cad45e73c67fec4144322a43a1297475d3e918b240581b979321f61b976e10bb
MD5 a1ebe31ac6d7a4508c8fd8fad52a7ec1
BLAKE2b-256 2aa9d74362ea9094b0d487c4170e53c6d661122617e9010b96e1ee86f5d4b4fd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_mcp_discovery-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33a58f56e9a46ce937e250db21512538ae813c1a6530c70f9863b3f96e7c3d79
MD5 dbba2e93ae42ab4826b225356a038dd0
BLAKE2b-256 2d28d91ba82ccf833abedd21f32e17faf9aa6677c635a36ba61976f5b91ff616

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