DocRouter MCP Server

Model Context Protocol server for seamless AI assistant integration

Overview

The DocRouter MCP Server enables AI agents to interact directly with DocRouter.AI for document processing workflows.

  • Document management and retrieval
  • AI-powered document processing
  • Schema and prompt configuration
  • Web forms configuration

Installation

Prerequisites

  • Node.js 18+ installed on your system

Installation

npm install -g @docrouter/mcp

Verify installation:

which docrouter-mcp
docrouter-mcp --help

Configuration

Configure the MCP server for your AI assistant:

  • Cursor IDE: Create .mcp.json
  • Claude Desktop: Update claude_desktop_config.json
  • Claude Agent: Configure MCP server
{
  "mcpServers": {
    "docrouter": {
      "command": "docrouter-mcp",
      "env": {
        "DOCROUTER_API_URL": "https://app.docrouter.ai/fastapi",
        "DOCROUTER_ORG_ID": "your-org-id",
        "DOCROUTER_ORG_API_TOKEN": "your-api-token"
      }
    }
  }
}

Replace your-org-id and your-api-token with your actual DocRouter credentials.

Example Prompts

Create a Schema

Create a schema for extracting invoices with these fields:
- invoice_number (string, required)
- date (string, format: date)
- total_amount (number, required)
- vendor_name (string)
- line_items (array of objects). The line_items object: 
  - description 
  - quantity 
  - unit_price
  - total

Update a Schema

Update the invoice schema to add a new optional field:
- payment_terms (string)

Create a Prompt

Create a prompt for extracting invoice data from documents.

Configure it with the invoice schema, and tag it with a tag named 'green'

Update a Prompt

Update the invoice extraction prompt to ensure the date is in YYYY-MM-DD format."

Available Tools

Click on any tool name to see detailed information about its parameters and usage.

Documents

upload_documents(documents) Upload documents
list_documents(skip, limit, tagIds, nameSearch, metadataSearch) List documents
get_document(documentId, fileType) Get document by ID
update_document(documentId, documentName, tagIds, metadata) Update document metadata
delete_document(documentId) Delete document

OCR

get_ocr_blocks(documentId) Get OCR blocks
get_ocr_text(documentId, pageNum) Get OCR text
get_ocr_metadata(documentId) Get OCR metadata

LLM Extraction

run_llm(documentId, promptRevId, force) Run AI extraction
get_llm_result(documentId, promptRevId, fallback) Get extraction results
update_llm_result(documentId, promptId, result, isVerified) Update extraction results
delete_llm_result(documentId, promptId) Delete extraction results

Tags

create_tag(tag) Create tag
list_tags(skip, limit, nameSearch) List tags
get_tag(tagId) Get tag by ID
update_tag(tagId, tag) Update tag
delete_tag(tagId) Delete tag

Prompts

create_prompt(prompt) Create prompt
list_prompts(skip, limit, document_id, tag_ids, nameSearch) List prompts
get_prompt(promptRevId) Get prompt by ID
update_prompt(promptId, content) Update prompt
delete_prompt(promptId) Delete prompt

Schemas

create_schema(name, response_format) Create schema
list_schemas(skip, limit, nameSearch) List schemas
get_schema(schemaRevId) Get schema by ID
update_schema(schemaId, schema) Update schema
delete_schema(schemaId) Delete schema
validate_schema(schema) Validate schema format
validate_against_schema(schemaRevId, data) Validate data against schema

Forms

create_form(name, response_format) Create form
list_forms(skip, limit, tag_ids) List forms
get_form(formRevId) Get form by ID
update_form(formId, form) Update form
delete_form(formId) Delete form
submit_form(documentId, formRevId, submission_data, submitted_by) Submit form
get_form_submission(documentId, formRevId) Get form submission
delete_form_submission(documentId, formRevId) Delete form submission
validate_form(form) Validate form format

LLM Chat

run_llm_chat(messages, model, temperature, max_tokens, stream) Run LLM chat

Help

help() Get general API help
help_prompts() Get prompts help
help_schemas() Get schemas help
help_forms() Get forms help
</main>

© 2025 DocRouter MCP Server. Part of the docrouter.ai project.

</div>