Claude Code Integration
Connect DocRouter to Claude Code
Use the Model Context Protocol (MCP) to manage documents, schemas, and prompts directly from your terminal.
Get started in 3 steps
Install the MCP server
Run npm install -g @docrouter/mcp to install the DocRouter MCP server.
Configure Claude Code
Add the DocRouter MCP server to your Claude Code configuration with your DocRouter organization API token. The organization ID is resolved automatically from this token.
Start using DocRouter
Ask Claude Code to list documents, create schemas, run prompts, and more.
What is Claude Code Integration?
Claude Code can interact directly with your DocRouter.AI organization using our MCP server. This allows you to manage documents, schemas, and prompts directly from your terminal-based AI assistant.
- Terminal-based access: Manage DocRouter without leaving your terminal
- AI-powered automation: Use Claude to script complex document processing tasks
- Context-aware: Claude can use document data to help you write code or documentation
Configuration
Add the DocRouter MCP server to your Claude Code configuration:
{
"mcpServers": {
"docrouter": {
"command": "docrouter-mcp",
"env": {
"DOCROUTER_API_URL": "https://app.docrouter.ai/fastapi",
"DOCROUTER_ORG_API_TOKEN": "your-org-api-token"
}
}
}
}
You’ll need your organization API token from the DocRouter dashboard. The organization ID is automatically resolved from the token and does not need to be configured.
Example Usage
Once configured, you can ask Claude Code to perform tasks like:
- “List the last 5 documents uploaded to DocRouter.”
- “Create a new schema for invoice extraction.”
- “Run the ‘Extract Data’ prompt on document doc_123.”
- “What is the status of my latest upload?”
Best Practices
✓ Secure Credentials — Store your API token securely and never commit it to version control.
✓ Use Environment Variables — Configure credentials via environment variables for better security.
✓ Test First — Start with simple queries like listing documents before running complex operations.
Learn More
- MCP Server — Learn about the Model Context Protocol
- REST API — Complete API reference
- Cursor Integration — Similar integration for Cursor editor
- GitHub Copilot Integration — Similar integration for GitHub Copilot