Skip to main content
Glama

drizzle-docs-mcp

latest release npm version License: MIT

Your AI writes Drizzle code from memory. Memory is out of date, so you get code that looks right and doesn't run — a where clause that was renamed two versions ago, an import that moved, a Postgres trick that only works on SQLite.

This gives it the real thing instead. 446 pages across 6 SQL dialects, read straight from orm.drizzle.team and served as clean Markdown — so the answer comes from today's docs, not from a training set.

npx -y drizzle-docs-mcp

That's the whole install. No API key, no account, nothing to configure.

What you get

Three tools your AI can call:

Tool

What it does

Arguments

list_topics

Browse the catalogue. No arguments returns the map: every dialect, every section, page counts.

dialect, section, limit (60), offset

search_docs

Find a page, or the answer inside the pages.

query, depth (index | full), dialect, section, limit (10)

fetch_page

Read one page as clean Markdown (nav, sidebars and footers stripped).

slug, sections, maxLength, format (markdown | json | plaintext), fresh

  • depth: "index" (default) fuzzy-searches titles, slugs and sections straight from llms.txt — instant, and it tolerates typos (migraton finds Migrations).

  • depth: "full" downloads llms-full.txt once (a few MB) and searches the actual page text, returning a snippet around each match. Use it when you need the answer, not a link.

  • Slugs look like docs/pg/select. Some catalogue links point at pages the site serves without the dialect segment (/docs/pg/overview → /docs/overview) — fetch_page retries the unprefixed URL and repairs the catalogue, so you never have to care.

Ask it things like:

  • "How do I set up a Postgres schema in Drizzle?"

  • "Which migration pages exist for SQLite?"

  • "Show me the batch API examples" → search_docs { query: "batch api", depth: "full" }

The catalogue comes from Drizzle's own llms.txt and llms-full.txt, so it tracks the real docs structure instead of scraping a sidebar and guessing.

Related MCP server: mcp-server-dev-docs

Connect

1. npm (stdio) — nothing to install

npx -y drizzle-docs-mcp        # Node
bunx drizzle-docs-mcp          # Bun

Or add it to your editor's MCP config:

{
  "mcpServers": {
    "drizzle-docs": {
      "command": "npx",
      "args": ["-y", "drizzle-docs-mcp"]
    }
  }
}

Cursor — Settings → MCP → Add new MCP server:

{
  "drizzle-docs": {
    "command": "npx",
    "args": ["-y", "drizzle-docs-mcp"]
  }
}

Windsurf — ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "drizzle-docs": { "command": "npx", "args": ["-y", "drizzle-docs-mcp"] }
  }
}

VS Code (Copilot) — .vscode/mcp.json or the MCP: Add Server command:

{
  "servers": {
    "drizzle-docs": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "drizzle-docs-mcp"]
    }
  }
}

Claude Code

claude mcp add drizzle-docs -- npx -y drizzle-docs-mcp

Zed — ~/.config/zed/settings.json:

{
  "context_servers": {
    "drizzle-docs": {
      "command": { "path": "npx", "args": ["-y", "drizzle-docs-mcp"] }
    }
  }
}

2. https (Streamable HTTP) — host it yourself

The same server can listen on a port. Set MCP_TRANSPORT=http (or pass --http) and the MCP endpoint is served at /mcp:

docker build -t drizzle-docs-mcp .
docker run --rm -p 3000:3000 drizzle-docs-mcp
curl http://localhost:3000/        # {"name":"drizzle-docs-mcp","version":"…",…}

Without Docker:

bun install && bun run build
node dist/index.js --http          # PORT, HOST, MCP_PATH come from the env

Then point a client at it:

{
  "mcpServers": {
    "drizzle-docs": { "type": "http", "url": "https://<your-host>/mcp" }
  }
}

Runs on Node 22+ or Bun, so any container platform, VM or PaaS works — tmcp speaks plain Web Request/Response, which is why the same code serves stdio locally and HTTP remotely.

NOTE

v2 ran on Mastra Cloud (drizzle.mastra.cloud). That endpoint is retired — use npx for local use, or self-host for a shared URL. See CHANGELOG.md.

Skills

The repo ships an agent skill that teaches your AI how to use these tools (when to use which one, and the gotchas above). Install it:

# From the skills registry (same pattern as DocShark)
npx skills add Michael-Obele/drizzle-docs --skill drizzle-docs

Or by hand into the standard skill folder:

mkdir -p ~/.agents/skills/drizzle-docs
curl -fsSL https://raw.githubusercontent.com/Michael-Obele/drizzle-docs/master/skills/drizzle-docs/SKILL.md \
  -o ~/.agents/skills/drizzle-docs/SKILL.md
  • GitHub Copilot and OpenCode read ~/.agents/skills/ automatically.

  • Claude Code: ln -s ../../.agents/skills/drizzle-docs ~/.claude/skills/drizzle-docs

  • In this repo the skill lives in skills/drizzle-docs/ and is symlinked into .agents/, .agent/ and .windsurf/, so every supported editor picks it up from a clone.

Also: DocShark

This server answers one site — Drizzle's. If you work across many documentation sites, use DocShark (our own docs MCP, also built on tmcp): it crawls any docs site, stores it in SQLite with FTS5/BM25 search, and lets your AI query the latest pages.

bun add -g docshark

docshark add https://orm.drizzle.team/ --depth 2   # index a site
docshark search "relational queries"               # CLI search
docshark list                                      # what is indexed
docshark stale                                     # refresh anything >14 days old

Add it to your MCP config:

{
  "mcpServers": {
    "docshark": {
      "command": "bunx",
      "args": ["-y", "docshark", "start", "--stdio"]
    }
  }
}

Its agent skills are one command away too:

npx skills add Michael-Obele/docshark --skill docshark
npx skills add Michael-Obele/docshark --skill using-docshark

Use them together: drizzle-docs-mcp for instant, always-fresh Drizzle answers, DocShark for everything else you index. See DocShark on GitHub →.

Configuration

All optional — defaults work out of the box.

Env var

Default

Meaning

DOCS_BASE_URL

https://orm.drizzle.team

Docs site (or your own mirror) to read

DOCS_CACHE_TTL_MS

3600000

How long a page/index stays cached (1 h)

MCP_TRANSPORT

stdio

stdio or http (same as --http)

PORT

3000

HTTP port

HOST

0.0.0.0

HTTP bind address

MCP_PATH

/mcp

HTTP MCP endpoint path

Local development

bun install          # dependencies
bun run dev          # stdio, watch mode
bun run dev:http     # HTTP on :3000/mcp
bun run check        # tsc --noEmit
bun test             # parser + search tests (offline fixtures)
bun run build        # emit dist/ (this is what npm ships)

Publishing a release

Bump version in package.json, then push a matching tag. The workflow typechecks, tests, builds, publishes to npm and cuts a GitHub release:

bun version patch        # 3.0.1 -> 3.0.2
git commit -am "chore: release"
git tag vX.Y.Z && git push origin vX.Y.Z

It refuses to publish if the tag does not match package.json, and prepublishOnly re-runs check + test + build first.

Architecture

  • MCP_ARCHITECTURE.md — how the server, the data layer and the transports fit together.

  • src/lib/docs.ts — catalogue (llms.txt), page fetching + Markdown conversion, full corpus (llms-full.txt), caching.

  • src/lib/search.ts — Fuse.js indexes for the fast and the deep search.

  • src/tools/ — the three tools.

  • src/server.ts + src/index.ts — server assembly and transport selection.

Contributing

Read the Contributing Guidelines and Code of Conduct first. Issues and security reports go to Security.

License

MIT

Available Tools

3 tools
fetch_pageFetch a Drizzle docs pageA
Read-onlyIdempotent

Fetch one Drizzle ORM documentation page as clean Markdown (navigation, sidebars and footers are stripped). slug is a page slug such as "docs/pg/select", or a full https URL. Keep context small with sections (return only the headings whose names match, e.g. ["Examples"]) and maxLength (truncate). Use format for json/plaintext shapes, and fresh: true to bypass the one-hour cache. Discover slugs with list_topics or search_docs.

Inputs: slug (required), fresh, format, sections, +1 more.

list_topicsList Drizzle docs topicsA
Read-onlyIdempotent

Browse the Drizzle ORM documentation catalogue (source: /llms.txt — about 450 pages). Call it with NO arguments first to get the map: every SQL dialect, every section, and how many pages each one holds. Then add dialect (pg, mysql, sqlite, mssql, cockroach, singlestore) and/or section (for example "Migrations", "Access your data", "Validations") to list the pages inside that slice — page the result with limit/offset. Each topic has a slug (like "docs/pg/select") to pass to fetch_page.

Inputs: limit, offset, dialect, section.

search_docsSearch Drizzle docsA
Read-onlyIdempotent

Search the Drizzle ORM documentation. depth "index" (default) fuzzy-searches titles, slugs and sections from /llms.txt — instant, use it to pick the right page. depth "full" downloads /llms-full.txt once (a few MB) and searches the actual page text, returning a snippet around every match — use it when you need the answer, not just a link. Filter with dialect (pg, mysql, sqlite, mssql, cockroach, singlestore) and/or section. Tolerates typos: "migraton" still finds Migrations.

Inputs: query (required), depth, limit, dialect, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.7/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool occupies a distinct step of the docs workflow: list_topics browses the catalogue, search_docs finds matches, fetch_page retrieves a page. The descriptions explicitly state the handoff (list_topics/search_docs produce slugs for fetch_page), leaving no realistic chance of misselection.

    Naming Consistency5/5

    All three names follow a strict verb_noun snake_case pattern (list_topics, search_docs, fetch_page). The verbs are also semantically accurate to the actions performed.

    Tool Count5/5

    Three tools is the minimum viable surface for document discovery, retrieval and search, and each earns its place without redundancy. Nothing feels missing or bolted on for a documentation-lookup server.

    Completeness4/5

    The discover → search → fetch lifecycle is fully covered, including pagination, dialect/section filtering, section-level extraction and cache bypass. Minor gaps remain, such as no batch multi-page fetch and no direct way to enumerate a single page's full heading tree before fetching.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      Provides AI models with direct access to documentation for over 600 technologies from DevDocs.io, including popular languages, frameworks, and tools. It enables comprehensive searching, content retrieval, and offline access via an intelligent local caching system.
      12
      2
      -
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to search API documentation, retrieve endpoint details, get SDK snippets, and check changelogs from an OpenAPI spec.
      7
      104 npm
      4
      MIT