# MCP server

The docs’ MCP server is at [https://design-system.blocks-ui.com/mcp](https://design-system.blocks-ui.com/mcp). It searches and reads these docs: the same pages and the same Markdown the site serves. It’s public, needs no account or key, and never calls a model.

## Connect

Add it as a remote HTTP server.

Claude Code:

```sh
claude mcp add --transport http blocks-design-system https://design-system.blocks-ui.com/mcp
```

Cursor, in `.cursor/mcp.json`:

```json
{"mcpServers":{"blocks-design-system":{"url":"https://design-system.blocks-ui.com/mcp"}}}
```

VS Code, in `.vscode/mcp.json`:

```json
{"servers":{"blocks-design-system":{"type":"http","url":"https://design-system.blocks-ui.com/mcp"}}}
```

Any other client that supports remote servers takes the same URL. Opening it in a browser answers `405`: it’s an endpoint for MCP clients, not a page.

## Tools

The usual workflow is two calls: search with a few distinctive words, then read the best page.

| Tool | Takes | Returns |
| --- | --- | --- |
| `search_docs` | `query`: a few distinctive words, every one of which must match. `limit`: 1 to 20 results, 8 by default. | the best-matching sections, each with its page, heading, canonical URL, `blocks://docs/` URI and a short excerpt |
| `get_doc` | `path`: a route like `/components/select`, a docs URL with or without `.md`, or a `blocks://docs/` URI from `search_docs` | the page’s Markdown, with its title, description and canonical URL |

Both are read-only. `search_docs` searches each page by section: every word must appear in the page’s title, the section’s heading or its text, and matches in titles and headings rank first. Each result links to its section’s heading on the HTML page. It returns excerpts rather than whole pages. `get_doc` returns exactly what the page’s `.md` URL serves, including each example’s source and the props table.

A path that isn’t a docs page, such as a file in the repository or another site’s URL, is a tool error that says how to find pages. Arguments that don’t match a tool’s schema are errors too, never a partial result.

## Resources

Every page is also a resource, for clients that attach context rather than call tools: `blocks://docs/{path}`, such as `blocks://docs/components/select` or `blocks://docs/foundations/themes`. Listing resources lists every page with its title and description. Reading one returns its Markdown as `text/markdown`.

Use the tools when the agent needs to find something; use a resource when you already know the page you want.

## Protocol compatibility

The server speaks MCP’s Streamable HTTP transport, statelessly, to clients on the 2026-07-28 protocol revision and to 2025-era ones. It allows requests from any origin, so browser-based clients can use it too.

## Next

- [Markdown and llms.txt](https://design-system.blocks-ui.com/agents/markdown.md): the same pages over plain HTTP.
- [Using the docs from an agent](https://design-system.blocks-ui.com/agents.md): which interface to give an agent.
