This directory contains the source documentation for MXCP. These docs are automatically synced to mxcp.dev upon deployment.
This documentation is maintained by both humans and AI assistants. When making changes to the MXCP codebase, you should update the corresponding documentation to keep it accurate and helpful.
Update docs when:
- Adding new CLI commands or options
- Adding new configuration options
- Changing endpoint schemas or behavior
- Adding new features or capabilities
- Fixing bugs that affect documented behavior
- Deprecating or removing features
- Accuracy over completeness - Only document what exists and works
- Examples are essential - Every feature needs a working example
- Keep it current - Outdated docs are worse than no docs
- Cross-reference - Link related topics to help readers navigate
- SEO matters - Every page should be discoverable via search
- Consistency matters - Follow patterns established in existing docs
All code examples must be tested before adding them to documentation.
When adding or updating examples:
- Create a test environment - Use a temporary directory (
/tmp/mxcp-test-*) - Copy the example exactly - Use the same code that will appear in docs
- Run validation - Execute
mxcp validateto check for errors - Run tests - Execute
mxcp testif the example includes tests - Verify output - Ensure the example produces the expected results
- Clean up - Remove test directories when done
# Example testing workflow
mkdir -p /tmp/mxcp-docs-test && cd /tmp/mxcp-docs-test
# Create files from documentation example
mxcp validate
mxcp test
# Verify everything works, then clean up
rm -rf /tmp/mxcp-docs-testNever add examples that haven't been validated. Broken examples frustrate users and damage trust.
Before writing new documentation, review similar existing pages:
- Check the same section - Look at other pages in the directory for structure and style
- Check similar content - If documenting a tool, look at other tool documentation
- Match the tone - Keep voice and terminology consistent
- Reuse patterns - Use the same table formats, admonition styles, and code block conventions
For example:
- Writing a new endpoint type? Check
concepts/tools.md,concepts/resources.md - Adding a CLI command? Check
reference/cli.mdfor the standard format - Creating a tutorial? Check existing tutorials for structure and depth
- Adding an example? Check
examples/for the standard layout
docs/
├── getting-started/ # First-time users: quickstart, introduction, glossary
├── concepts/ # Core concepts: endpoints, types, methodology
├── tutorials/ # Step-by-step guides for specific tasks
├── security/ # Authentication, policies, auditing
├── operations/ # Deployment, configuration, monitoring
├── quality/ # Testing, validation, linting, evals
├── integrations/ # Claude Desktop, dbt, DuckDB extensions
├── reference/ # CLI commands, API specs, schema reference
├── examples/ # Real-world use case examples
├── contributing/ # How to contribute to MXCP
├── schemas/ # JSON schemas (not markdown)
└── .archive/ # Deprecated docs (not published)
| Section | Audience | Content Type |
|---|---|---|
| getting-started | New users | Quick wins, orientation |
| concepts | All users | Understanding how things work |
| tutorials | Developers | Task-focused guides |
| security | DevOps, Security | Security configuration |
| operations | DevOps | Production deployment |
| quality | Developers | Testing and validation |
| integrations | Developers | Third-party connections |
| reference | All users | Complete technical specs |
| examples | All users | Copy-paste solutions |
| contributing | Contributors | Development guidelines |
Every documentation page must be optimized for search engines. Users discover MXCP through Google searches like "MCP server authentication" or "DuckDB API gateway".
Every markdown file MUST have this frontmatter:
---
title: "Page Title - Include Primary Keyword"
description: "Compelling 120-160 character description with keywords. Explains what the reader will learn."
sidebar:
order: 1
---| Rule | Example |
|---|---|
| Include primary keyword | "Authentication - OAuth & API Keys" ✓ |
| Keep under 60 characters | "Getting Started with MXCP" ✓ |
| Be specific, not generic | "Testing Endpoints" ✓ vs "Testing" ✗ |
| Use title case | "Input Policies" ✓ vs "input policies" ✗ |
The description appears in search results. It must:
- Be 120-160 characters - Google truncates longer descriptions
- Include primary keyword in first 60 characters
- Include secondary keywords naturally
- Describe the value - What will the reader learn/do?
- Be unique - No two pages should have the same description
Good examples:
description: "Configure OAuth 2.0 and API key authentication for MXCP endpoints. Secure your MCP server with industry-standard auth."
description: "Write automated tests for MXCP endpoints. Validate SQL queries, Python functions, and policy enforcement with the test framework."
description: "Deploy MXCP to production with Docker. Configure environment variables, health checks, and monitoring for enterprise deployments."Bad examples:
description: "This page covers authentication." # Too short, no keywords
description: "Learn about testing in MXCP and how to write tests for your endpoints and validate them." # No specific keywords
description: "Authentication" # Not a description- Headings hierarchy - Use H2 → H3 → H4, never skip levels
- Keywords in headings - Include relevant terms in section headers
- First paragraph - Include primary keywords in opening paragraph
- Descriptive link text - Use "see the Testing Guide" not "click here"
- Alt text for images - Describe what the image shows
| Section | Primary Keywords |
|---|---|
| getting-started | mxcp, mcp server, quickstart, install |
| concepts | endpoints, tools, resources, prompts, mcp protocol |
| security | authentication, oauth, api key, policies, audit |
| operations | deployment, docker, configuration, monitoring |
| quality | testing, validation, linting, evaluations |
| integrations | claude desktop, dbt, duckdb, mcp client |
| reference | cli, api, schema, commands |
Every page should follow this structure:
---
title: "Feature Name"
description: "SEO-optimized description with keywords."
sidebar:
order: 1
---
Brief introduction (1-2 sentences) explaining what this page covers.
> **Related Topics:** [Related 1](/path) (context) | [Related 2](/path) (context)
## Main Section
Content...
## Another Section
Content...
## See Also
- [Related Topic](/path) - Brief descriptionAdd a related topics banner after the introduction to help navigation:
> **Related Topics:** [Type System](/concepts/type-system) (parameter types) | [Testing](/quality/testing) (write tests)Always include working examples. Use appropriate language identifiers:
```yaml
# YAML for endpoint definitions
mxcp: 1
tool:
name: get_user
description: Retrieve user by ID
```
```python
# Python for Python endpoints
def get_user(user_id: int) -> dict:
return {"id": user_id, "name": "Example"}
```
```bash
# Bash for CLI commands
mxcp validate
mxcp test
mxcp serve --port 8000
```
```sql
-- SQL for queries
SELECT * FROM users WHERE id = $user_id
```Use sparingly for important callouts:
:::note
General helpful information.
:::
:::tip
Best practices or shortcuts.
:::
:::caution
Important warnings about potential issues.
:::
:::danger
Critical warnings about data loss or security.
:::Use tables for structured data:
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `--port` | int | 8000 | Server port |
| `--debug` | flag | false | Enable debug logging |Within the same section - Use relative paths:
[Type System](type-system)
[Next Page](./next-page)Cross-section links - Use absolute paths:
[Testing Guide](/quality/testing)
[CLI Reference](/reference/cli)- Create the file in the appropriate directory
- Add required frontmatter with SEO-optimized title and description
- Set
sidebar.orderfor positioning (lower = higher in sidebar) - Add Related Topics banner if applicable
- Include working code examples
- Link to related pages
- Create a new directory under
docs/ - Add an
index.mdwith:- Overview of the section
- List of pages in the section
- When to use this section
- Note: The website sidebar configuration is managed separately
| Rule | Example |
|---|---|
| Lowercase with hyphens | input-policies.md ✓ |
| Short but descriptive | testing.md ✓ |
| Section index | index.md for landing pages |
| Match URL slug | oauth.md → /security/oauth |
Control page order with sidebar.order in frontmatter:
| Range | Use For |
|---|---|
| 1-10 | Section overview and core pages |
| 11-50 | Main content pages |
| 51-99 | Advanced topics |
| 100+ | Reference and appendix |
If you modify MXCP code that affects documentation:
- Search for references - Grep docs for the feature name
- Update examples - Ensure all code examples still work
- Update descriptions - Reflect new behavior accurately
- Check cross-references - Update links if pages move
When deprecating features:
-
Add a deprecation notice at the top:
:::caution[Deprecated] This feature is deprecated and will be removed in v2.0. Use [New Feature](/path) instead. :::
-
Update any pages that link to the deprecated feature
-
After removal, move the file to
.archive/(not deleted, for reference)
When reorganizing documentation:
- Move the file to the new location
- Search for all internal links to the old path
- Update all references to use the new path
- Consider adding a redirect note in the old location temporarily
Before considering documentation complete, verify:
- Title is under 60 characters with primary keyword
- Description is 120-160 characters with keywords
- Description is unique (not duplicated from another page)
-
sidebar.orderis set appropriately
- Introduction explains what the page covers
- Related Topics banner links to relevant pages
- All code examples are complete and working
- Code blocks have language identifiers
- Headings follow H2 → H3 → H4 hierarchy
- Tables render correctly
- No broken internal links
- Primary keyword in title
- Primary keyword in first paragraph
- Keywords in headings where natural
- Descriptive link text (not "click here")
- Alt text on any images
## command-name
Brief description of what the command does.
### Usage
\`\`\`bash
mxcp command-name [OPTIONS] [ARGUMENTS]
\`\`\`
### Options
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `--option` | type | default | What it does |
### Examples
\`\`\`bash
# Basic usage
mxcp command-name
# With options
mxcp command-name --option value
\`\`\`## Feature Name
Brief explanation of what this feature does and why you'd use it.
### Configuration
\`\`\`yaml
# Example configuration
feature:
option: value
\`\`\`
### Usage
Step-by-step instructions...
### Examples
Real-world examples...
### See Also
- [Related Feature](/path)## Troubleshooting
### Problem: Error message or symptom
**Cause:** Why this happens
**Solution:**
1. Step one
2. Step two
### Problem: Another issue
...The .archive/ directory contains:
- Deprecated documentation (kept for reference)
- Old versions of rewritten pages
- Content that may be restored later
Files in .archive/ are NOT published to the website.
- Starlight Documentation - Website framework
- Markdown Guide - Markdown syntax
- Google SEO Guide - SEO best practices