Metadata-Version: 2.4
Name: doclayer-mcp
Version: 0.1.0
Summary: Doclayer MCP Server - Integrate Doclayer with Claude Code and Cursor
Project-URL: Homepage, https://doclayer.ai
Project-URL: Documentation, https://docs.doclayer.ai/mcp
Project-URL: Repository, https://github.com/okc0mputex/Doclayer
Project-URL: Issues, https://github.com/okc0mputex/Doclayer/issues
Author-email: Doclayer <support@doclayer.ai>
Maintainer-email: Doclayer <support@doclayer.ai>
License-Expression: MIT
License-File: LICENSE
Keywords: ai,claude,cursor,doclayer,document,mcp,model-context-protocol
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing :: Markup
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Requires-Dist: httpx>=0.28.0
Requires-Dist: keyring>=25.0.0
Requires-Dist: mcp>=1.0.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: pyyaml>=6.0.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: respx>=0.21.0; extra == 'dev'
Description-Content-Type: text/markdown

# 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
