-
Notifications
You must be signed in to change notification settings - Fork 81
Docs Updates #7 - MCP Server #686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
bryantgillespie
merged 12 commits into
bry/dockem-5-layout-changes
from
bry/dockem-7-mcp-tools
May 29, 2026
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
9bc44cb
feat(search): add Typesense docs search
bryantgillespie 73da998
Add Typesense search refinements
bryantgillespie 9d77993
Address search review feedback
bryantgillespie 3a2c0ce
docs(mcp): clarify MCP overview title
bryantgillespie 2e2b762
feat(mcp): add docs MCP server and tools
bryantgillespie 9da3905
Address MCP review feedback
bryantgillespie a598d04
Fix feedback
LZylstra 36f2f49
Fixes
LZylstra 693e1d4
Merge branch 'bry/dockem-6-typesense-search' into bry/dockem-7-mcp-tools
LZylstra 63fdeab
Merge branch 'bry/dockem-5-layout-changes' into bry/dockem-6-typesens…
LZylstra b132679
Merge branch 'bry/dockem-6-typesense-search' into bry/dockem-7-mcp-tools
LZylstra 63becdc
Merge branch 'bry/dockem-5-layout-changes'
bryantgillespie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| // IDE deeplink helpers for the docs MCP server and agent prompt copy actions. | ||
| // Toolkit-supported IDEs are sourced from @nuxtjs/mcp-toolkit's deeplink route. | ||
|
|
||
| export type McpIde = 'cursor' | 'vscode'; | ||
|
|
||
| export interface McpIdeOption { | ||
| id: McpIde; | ||
| label: string; | ||
| icon: string; | ||
| } | ||
|
|
||
| export const MCP_IDES: McpIdeOption[] = [ | ||
| { id: 'cursor', label: 'Add to Cursor', icon: 'i-simple-icons:cursor' }, | ||
| { id: 'vscode', label: 'Add to VS Code', icon: 'i-simple-icons:visualstudiocode' }, | ||
| ]; | ||
|
|
||
| export function mcpDeeplinkPath(baseURL: string, ide?: McpIde) { | ||
| const base = baseURL.replace(/\/$/, ''); | ||
| const path = `${base}/mcp/deeplink`; | ||
| return ide ? `${path}?ide=${ide}` : path; | ||
| } | ||
|
|
||
| export function mcpServerUrl(origin: string, baseURL: string) { | ||
| const base = baseURL.replace(/\/$/, ''); | ||
| return `${origin}${base}/mcp`; | ||
| } | ||
|
|
||
| export function chatGptPromptUrl(prompt: string) { | ||
| return `https://chatgpt.com/?hints=search&q=${encodeURIComponent(prompt)}`; | ||
| } | ||
|
|
||
| export function claudePromptUrl(prompt: string) { | ||
| return `https://claude.ai/new?q=${encodeURIComponent(prompt)}`; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| --- | ||
| stableId: 4b6990b6-8399-4386-890d-a8eda0e0b8b9 | ||
| title: Docs MCP Server | ||
| description: Connect Claude, Cursor, VS Code, or any MCP-compatible client directly to the Directus documentation. | ||
| --- | ||
|
|
||
| You landed here because you opened the Directus docs MCP server in a browser. The server itself speaks the [Model Context Protocol](https://modelcontextprotocol.io/). Connect a compatible AI client to it and your assistant can search and read these docs as a live tool. | ||
|
|
||
| ::callout{icon="material-symbols:info" color="info"} | ||
| This is the **docs MCP server**, which exposes this documentation site to AI clients. If you want to connect AI tools to your own Directus instance to manage content and schema, see the [Directus product MCP guide](/guides/ai/mcp) instead. | ||
| :: | ||
|
|
||
| ## Server URL | ||
|
|
||
| ``` | ||
| https://directus.io/docs/mcp | ||
| ``` | ||
|
|
||
| Transport: streamable HTTP. No authentication required. | ||
|
|
||
| ## Install in one click | ||
|
|
||
| ::card-group | ||
|
|
||
| :::card{title="Add to Cursor" icon="i-simple-icons:cursor" to="/mcp/deeplink" target="_blank"} | ||
| Opens Cursor and registers the docs MCP server. | ||
| ::: | ||
|
|
||
| :::card{title="Add to VS Code" icon="i-simple-icons:visualstudiocode" to="/mcp/deeplink?ide=vscode" target="_blank"} | ||
| Opens VS Code and registers the docs MCP server. | ||
| ::: | ||
|
|
||
| :: | ||
|
|
||
| ## Manual setup | ||
|
|
||
| For clients without a one-click installer, add the server to your MCP config. | ||
|
|
||
| ### Claude Code | ||
|
|
||
| ```bash | ||
| claude mcp add --transport http directus-docs https://directus.io/docs/mcp | ||
| ``` | ||
|
|
||
| ### Claude Desktop | ||
|
|
||
| Edit `claude_desktop_config.json`: | ||
|
|
||
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "directus-docs": { | ||
| "type": "http", | ||
| "url": "https://directus.io/docs/mcp" | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ### Codex / Windsurf / other HTTP-MCP clients | ||
|
|
||
| Point them at `https://directus.io/docs/mcp` with transport set to `http` (sometimes called `streamable-http`). | ||
|
|
||
| ## Available tools | ||
|
|
||
| | Tool | Inputs | Use it for | | ||
| |---|---|---| | ||
| | `list-docs` | `pathPrefix?`, `limit?` | Discover available docs pages when you do not know exact paths. | | ||
| | `get-doc` | `path` | Fetch a single page's full markdown by path (e.g. `/getting-started/overview`). | | ||
| | `search-docs` | `query`, `section?`, `framework?`, `limit?` | Full-text search across the docs. Returns ranked results with title, snippet, and section. | | ||
| | `search-directus-code` | `query`, `repo?`, `language?`, `path?`, `limit?` | Search source code across allowlisted Directus GitHub repos. | | ||
| | `get-directus-file` | `repo?`, `path`, `ref?`, `offset?`, `bytes?` | Fetch source files from allowlisted Directus GitHub repos. | | ||
|
|
||
| ## Try it | ||
|
|
||
| After connecting, ask your AI client questions like: | ||
|
|
||
| - "Search the Directus docs for OAuth setup." | ||
| - "Get the docs page on configuring the SDK in Nuxt." | ||
| - "List all guides in the data-model section." | ||
| - "How do I create a flow in Directus? Use the docs MCP." | ||
|
|
||
| The assistant should call `search-docs` or `list-docs`, then `get-doc` to read the relevant page. | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| - **Connection refused or 404** - confirm the URL is exactly `https://directus.io/docs/mcp` (note the `/docs` prefix). | ||
| - **Tools not showing up** - restart your MCP client after adding the server. Some clients only load tools at startup. | ||
| - **Search returns nothing** - `search-docs` is case-insensitive but does keyword match. Try fewer or broader terms. | ||
|
|
||
| Found a bug? Report it at [github.com/directus/docs/issues](https://github.com/directus/docs/issues). | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.