Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Enables hybrid keyword and semantic search over ModernGL documentation using FTS5 and vector embeddings, with a single search_docs tool.

README.md

moderngl-docs-mcp

A hybrid (FTS5 keyword + vector semantic) MCP search server for ModernGL documentation (legaly take from context7 👀 , pls don't sue me). Combines SQLite FTS5 and sqlite-vec k-NN search, fused via Reciprocal Rank Fusion, behind a single search_docs MCP tool.

Why hybrid search

A keyword index (FTS5/BM25) finds documents that share literal words with the query. A vector index (embedding similarity) finds documents that are semantically close, even with no shared vocabulary. Real documentation questions span both. This project runs both signals on every query and fuses their rankings.

What you get

  • search_docs(query, limit=5, doc_type=None) — hybrid search tool. doc_type="code" restricts to runnable examples, doc_type="info" restricts to conceptual/API explanations.
  • docs://index — a resource listing every indexed section and its id.
  • docs://{doc_id} — a resource fetching one section's full content by id.
  • build_moderngl_app — a guided prompt that walks an agent through searching docs before writing code.

Install

pip install -e .

This installs the moderngl-docs-mcp command (the MCP server itself) and the ingestion CLI as a Python module.

First run: build the database

The server needs an ingested SQLite database before it can answer queries. Point the ingestion CLI at your dump file(s):

python -m moderngl_docs_mcp.ingestion.cli moderngl_code_docs.txt code moderngl_info_docs.txt info

This bootstraps moderngl_docs.db in the current directory, downloads the embedding model on first run (mixedbread-ai/mxbai-embed-xsmall-v1, ~30MB, cached locally afterward), and ingests both dump files.

Run the server directly (for testing)

moderngl-docs-mcp

MCP servers communicate over stdin/stdout with a client. Use an MCP client or MCP Inspector for manual testing:

npx @modelcontextprotocol/inspector moderngl-docs-mcp

Configure your MCP client

VS Code

Workspace-scoped: create .vscode/mcp.json in the project root:

{
  "servers": {
    "moderngl-docs": {
      "type": "stdio",
      "command": "moderngl-docs-mcp"
    }
  }
}

If moderngl-docs-mcp isn't on your system PATH (e.g. installed inside a virtualenv), use the full interpreter path instead:

{
  "servers": {
    "moderngl-docs": {
      "type": "stdio",
      "command": "/full/path/to/your/venv/bin/moderngl-docs-mcp"
    }
  }
}

Claude Desktop

Add to your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "moderngl-docs": {
      "command": "moderngl-docs-mcp"
    }
  }
}

Cursor

Add to .cursor/mcp.json (project) or your global Cursor MCP settings:

{
  "mcpServers": {
    "moderngl-docs": {
      "command": "moderngl-docs-mcp"
    }
  }
}

Development

pip install -e .
pip install pytest pytest-asyncio sqlite-vec sentence-transformers pyyaml
pytest -v

Run benchmarks

python scripts/run_benchmarks.py

Re-runs the labeled query set in docs/benchmarks/queries.yaml against your real, ingested database.

python scripts/run_benchmarks.py --diagnose "your query" --expected-title "Exact Section Title"

Project structure

src/moderngl_docs_mcp/
├── ingestion/    parser.py + ingest.py + cli.py
├── retrieval/    query.py + fusion.py
├── services/     search.py
├── storage/      schema.sql + db.py
└── server.py     FastMCP tool/resource/prompt registration

docs/
├── architecture/ARCHITECTURE.md
├── benchmarks/BENCHMARKS.md
└── benchmarks/FUTURE-RERANKING.md

scripts/run_benchmarks.py
tests/

License

MIT

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Vector & Memory servers.