Cursor Integration
Power Cursor AI with DocRouter data
Use the Model Context Protocol (MCP) to search, read, and manage your documents directly from Cursor.
Get started in 3 steps
Install the MCP server
Run npm install -g @docrouter/mcp to install the DocRouter MCP server.
Add to Cursor settings
Open Cursor Settings → Features → MCP, then add a new MCP server with command docrouter-mcp.
Configure credentials
Add environment variable: DOCROUTER_ORG_API_TOKEN. The organization ID is resolved automatically from this token.
What is Cursor Integration?
By connecting DocRouter.AI to Cursor via MCP, you enable Cursor’s AI to search, read, and manage your documents and extraction schemas. This is perfect for building applications that rely on DocRouter’s structured data.
- Direct data access: Build frontend or backend logic using real extraction results as context
- Schema management: Update your DocRouter schemas without leaving your editor
- Rapid prototyping: Quickly test how different prompts affect your application’s data flow
Configuration Steps
- Open Cursor Settings (Cmd+,)
- Navigate to Features → MCP
- Click + Add New MCP Server
- Fill in the details:
- Name:
DocRouter - Type:
command - Command:
docrouter-mcp
- Name:
- Add Environment Variables:
DOCROUTER_ORG_API_TOKEN: Your organization API token (organization ID is resolved automatically)
How to Use
In Cursor Chat (Cmd+L) or Composer (Cmd+I), you can now use DocRouter tools:
- “Show me the schema for ‘Invoices’.”
- “Download the extraction results for the latest document.”
- “Create a new prompt that uses the ‘Receipt’ tag.”
Best Practices
✓ Secure Credentials — Store your API token securely in Cursor's environment variables.
✓ Use Real Data — Leverage actual extraction results to build more accurate application logic.
✓ Iterate Quickly — Test schema changes and prompt variations without switching tools.
Learn More
- MCP Server — Learn about the Model Context Protocol
- Claude Code Integration — Similar integration for Claude Code
- GitHub Copilot Integration — Similar integration for GitHub Copilot
- REST API — Complete API reference