doclayer-mcp 0.1.0
Doclayer MCP Server - Integrate Doclayer with Claude Code and Cursor
Requires Python: >=3.11
Keywords: ai, claude, cursor, doclayer, document, mcp, model-context-protocol

# Doclayer MCP Server

A Model Context Protocol (MCP) server that enables developers using Claude Code or Cursor to integrate with Doclayer within 5 minutes.

## Features

- **CLI-like Tools**: Upload documents, search, manage projects, and more
- **Integration Guidance**: Get personalized advice on how to integrate Doclayer
- **Custom Template Creation**: Create and validate custom agent templates
- **Code Examples**: Access ready-to-use code snippets in multiple languages

## Quick Start

### Installation

```bash
# Via pip
pip install doclayer-mcp

# Or via uvx (recommended for MCP)
uvx doclayer-mcp
```

### Configure Claude Code

Add to `~/.claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "doclayer": {
      "command": "uvx",
      "args": ["doclayer-mcp"],
      "env": {
        "DOCLAYER_API_KEY": "your-api-key"
      }
    }
  }
}
```

### Configure Cursor

Add to `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "doclayer": {
      "command": "uvx",
      "args": ["doclayer-mcp"]
    }
  }
}
```

### Get Your API Key

1. Sign up at https://app.doclayer.ai
2. Go to Settings > API Keys
3. Create a new API key
4. Set the environment variable or use the `setup_auth` tool

## Available Tools

| Tool | Description |
|------|-------------|
| `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 |

## Available Resources

| Resource URI | Description |
|--------------|-------------|
| `doclayer://config/current` | Current configuration |
| `doclayer://api/endpoints` | API endpoint reference |
| `doclayer://examples/quickstart` | Code examples |
| `doclayer://schema/manifest` | Template manifest schema |

## Available Prompts

| Prompt | Description |
|--------|-------------|
| `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 |

## 5-Minute Integration Flow

1. **Install** (30 seconds)
   ```bash
   pip install doclayer-mcp
   ```

2. **Configure** (30 seconds)
   - Add to your MCP config
   - Set `DOCLAYER_API_KEY`

3. **Restart your IDE** (30 seconds)

4. **Use the quickstart prompt** (3 minutes)
   - Ask Claude: "Use the quickstart prompt to help me integrate Doclayer"

## Environment 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` |

## Development

### Setup

```bash
cd mcp-server
pip install -e ".[dev]"
```

### Run Tests

```bash
pytest
```

### Run Locally

```bash
python -m doclayer_mcp.server
```

## License

MIT License - see LICENSE file for details.

## Support

- Documentation: https://docs.doclayer.ai
- Issues: https://github.com/okc0mputex/Doclayer/issues
- Email: support@doclayer.ai