MCP Server Integration
Model Context Protocol server for Claude Code and Cursor. Integrate Doclayer document processing directly in your AI coding assistant.
MCP Server
Document processing for AI coding assistants
The Doclayer MCP server enables developers using Claude Code or Cursor to integrate document processing directly in their IDE. Upload documents, search content, create templates, and more - all through natural conversation.
Quick Start (5 minutes)
Install the MCP server
Install the Doclayer MCP server via pip or uvx:
# Via pip
pip install doclayer-mcp
# Or via uvx (recommended for MCP)
uvx doclayer-mcpConfigure your IDE
Add Doclayer to your MCP configuration file.
Get your API key
Sign up at app.doclayer.ai, go to Settings > API Keys, and create a new key.
Restart your IDE
Restart Claude Code or Cursor to load the MCP server. Then ask your AI assistant to use the quickstart prompt.
IDE Configuration
Claude Code
~/.claude/claude_desktop_config.json
{
"mcpServers": {
"doclayer": {
"command": "uvx",
"args": ["doclayer-mcp"],
"env": {
"DOCLAYER_API_KEY": "your-api-key"
}
}
}
}Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"doclayer": {
"command": "uvx",
"args": ["doclayer-mcp"]
}
}
}Available Tools
The MCP server exposes 13 tools that your AI assistant can use to interact with Doclayer:
setup_auth
Configure API credentials
check_connection
Verify API connectivity
upload_document
Upload a document for processing
get_document_status
Check processing status
get_document_extractions
Retrieve extraction results
search_documents
Vector search across documents
list_templates
List available agent templates
get_template
Get template details
list_projects
List your projects
create_project
Create a new project
generate_api_key
Create new API key
create_custom_template
Scaffold a new template
validate_template
Validate template manifest
Built-in Prompts
Pre-configured prompts to help you get started quickly:
quickstart
5-minute integration guide
integration-advisor
Analyze your project and suggest integration
template-creator
Guide to create custom templates
troubleshoot
Diagnose common issues
best-practices
Integration best practices
Example: Processing an Invoice
Simply ask your AI assistant to process a document. The MCP server handles the rest.
You: Upload invoice.pdf and extract the key details
Claude: I'll upload and process that invoice for you.
[Uses upload_document tool]
[Uses get_document_status tool to wait for processing]
[Uses get_document_extractions tool]
Here are the extracted details:
- Vendor: Acme Corp
- Invoice #: INV-2024-001
- Amount: $1,234.56
- Due Date: 2024-02-15Environment Variables
| Variable | Description | Default |
|---|---|---|
| DOCLAYER_API_KEY | Your Doclayer API key | None |
| DOCLAYER_BASE_URL | API base URL | https://api.doclayer.ai |
| DOCLAYER_TENANT_ID | Tenant/organization ID | None |
| DOCLAYER_NO_KEYRING | Disable system keyring | false |
Prerequisites
- Python 3.11 or higher
- Claude Code or Cursor with MCP support
- Doclayer account with API key