dash-improve-my-llms 2.0
Crawler / SEO companion for Dash apps, with a thin MCP bridge.
What this package is
A small set of HTTP routes and middleware that make a Dash application legible to the parts of the web that don't speak Dash:
- Search-engine and AI crawlers (Googlebot, GPTBot, ClaudeBot, …)
- Users pasting a URL into a chat window for context
- MCP-aware clients on Dash 4.3+
It is intentionally small. Dash 4.3 already ships an MCP server that exposes layouts and component metadata live over JSON-RPC, so this package no longer tries to compete on that surface.
The three audiences
| Audience | How they talk to your app | What 2.0 gives them |
|---|---|---|
| MCP clients | JSON-RPC over Streamable HTTP | LLMS_DOC registered as dash.mcp resource |
| Web crawlers | Plain HTTPS, no JavaScript | /robots.txt, /sitemap.xml, static HTML |
| Paste-into-chat users | One-shot HTTP fetch | /llms.txt, /<page>/llms.txt as markdown |
What it serves
/llms.txtand/<page>/llms.txt— prose markdown, fromLLMS_DOC/robots.txt— bot-class access policies viaRobotsConfig/sitemap.xml— generated fromdash.page_registry- Static HTML prerender — served to crawlers that hit a normal page URL
That is the entire HTTP surface. There are no /page.json, /architecture.txt, or /llms.toon endpoints in 2.0 — component-tree introspection lives in Dash 4.3 MCP.
The LLMS_DOC pattern
Every page module exports a LLMS_DOC string. That string is the literal body of /<page>/llms.txt:
# pages/home.py
LLMS_DOC = '''
# Home
...
'''
If a page has no LLMS_DOC, the package emits a single warning at add_llms_routes() listing the missing pages, and the endpoint returns a small stub so bots still get a 200.
Multi-backend support
add_llms_routes(app) detects whether app.server is Flask, FastAPI, or Quart and dispatches to the matching adapter. Pick one extra at install time:
pip install dash-improve-my-llms[flask] # Dash 3.x and earlier
pip install dash-improve-my-llms[fastapi] # Dash 4.1+
pip install dash-improve-my-llms[quart] # Dash 4.1+ async
Quick start
from dash import Dash
from dash_improve_my_llms import add_llms_routes, RobotsConfig, mark_hidden
app = Dash(__name__, use_pages=True)
app._base_url = "https://myapp.com"
app._robots_config = RobotsConfig(block_ai_training=True, allow_ai_search=True)
mark_hidden("/admin")
add_llms_routes(app)
Pages in this demo
Each of the three audience cards above has a dedicated demo page:
/audiences/mcp-clients— directory of resources this app registers with dash.mcp/audiences/web-crawlers— live /robots.txt, RobotsConfig knobs, per-page visibility/audiences/llm-context— copy any page's LLMS_DOC to your clipboard
Plus a few supporting pages:
/analytics— a regular Dash page (Plotly + callbacks) with its own LLMS_DOC/admin— hidden viamark_hidden, shows visitor analytics/v200-features— walks through what changed from 1.x
Note for AI agents: This is the static, prerendered view of an interactive Dash application served because we detected a non-JS user agent. Full prose docs:
- /llms.txt — LLM-friendly documentation
- /sitemap.xml
- /robots.txt