Integrating AI development agents into your workflow requires structured interfaces that allow models to query, read, and write documentation context efficiently. docmd satisfies this need via a native Model Context Protocol (MCP) server and an extensible Agent Skills database.
Model Context Protocol (MCP) Setup
The Model Context Protocol connects LLM environments directly to your local workspace tools.
1. Claude Desktop Integration
Add the following to your desktop configuration file (typically at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"docmd": {
"command": "npx",
"args": ["@docmd/core", "mcp"],
"cwd": "/path/to/your/docs/project"
}
}
}
2. IDE Integration (Cursor / Windsurf)
In your editor’s MCP settings panel, add a new server using the stdio transport:
- Command:
npx @docmd/core mcp - Transport:
stdio
Available MCP Tools
Once connected, the following tools become available to the agent:
search_docs(query): Performs a workspace-wide full-text search.list_docs(subdir?): Lists every markdown file in the project, optionally scoped to a subdirectory (a locale, a version, a guide section). Use this to navigate the docs tree before reading individual files.read_doc(route): Retrieves the raw Markdown contents of a specific route. The route must resolve inside the project root.get_config(): Returns the resolveddocmd.config— title, source and output directories, locales, versions, and enabled plugins. Sensitive values (API keys, analytics IDs) are stripped from the response.validate_docs(): Lints the entire documentation and returns validation errors (e.g., broken links).get_llms_context(): Fetches the consolidatedllms-full.txtcontext file.
Leveraging Agent Skills (SKILL.md)
When you run docmd init in your project, the engine automatically generates a SKILL.md file in your root workspace. This file serves as a prompt instruction card for any AI agent working on your repository.
Best Practices for AI Agents
- Read SKILL.md First: Instruct your agents to read the
SKILL.mdfile at the start of a coding session. This teaches the model about custom Callouts, OpenAPI markup, and file structures. - Validate After Edits: Whenever an agent modifies Markdown files, it should call the
validate_docstool (or runnpx @docmd/core validate) to verify that no relative links or anchor paths are broken. - Synchronize Locales: If the project uses versioning or multiple languages, agents should use the comparison matrix to ensure all translations stay in sync.