> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metabind.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Server Overview

> Model Context Protocol tools for AI-powered content creation

The MCP (Model Context Protocol) Content Creation Tools enable AI agents to discover, understand, *and* create content within the Metabind platform's established design system structures. These tools are optimized for LLM usage, returning only the fields necessary for content understanding and generation while minimizing token consumption.

## Key Principles

### Minimal Token Usage

* Returns only fields needed for content creation
* Excludes internal metadata and system fields
* Full schemas and content only returned when explicitly requested via get operations
* Descriptions use structured markdown for better LLM comprehension
* Response fields carefully selected to balance utility and token consumption

### Schema-Driven Creation

* All content creation validated against JSON schemas
* Content stored as structured JSON matching schemas
* Compiled BindJS code auto-generated from JSON
* Type safety through schema validation

### Semantic Discovery

* Vector search capabilities for finding relevant resources
* Natural language queries for content and component discovery
* AI-optimized descriptions using structured markdown
* Leverages embeddings for conceptual similarity matching

### Design System Compliance

* Ensures all created content follows established patterns
* Validates against content type constraints
* Maintains component allowlists and groupings
* Preserves package version dependencies

### Dual Search Modes

All search tools support two modes:

| Mode                   | Trigger                   | Behavior                                                                          |
| ---------------------- | ------------------------- | --------------------------------------------------------------------------------- |
| **Semantic Search**    | Include `query` parameter | Uses AI embeddings for natural language queries, returns relevance-ranked results |
| **Standard Filtering** | Omit `query` parameter    | Uses exact matching on filters, returns consistently ordered results              |

Combine semantic search with filters for precise, relevant results.

## Getting Started

Configure your MCP client to connect to:

```
https://mcp.metabind.ai
```

Authentication uses the same API key as other Metabind endpoints.

## Tool Categories

<CardGroup cols={2}>
  <Card title="Context Management" icon="folder-open" href="/mcp/context/overview">
    Set and manage project context for all operations
  </Card>

  <Card title="Discovery Tools" icon="magnifying-glass" href="/mcp/discovery/overview">
    Search and retrieve content types, content items, components, and assets
  </Card>

  <Card title="Content Creation" icon="pen" href="/mcp/creation/overview">
    Create and update content items
  </Card>

  <Card title="Error Handling" icon="triangle-exclamation" href="/mcp/errors">
    Validation errors and recovery strategies
  </Card>
</CardGroup>

## Tool Summary

| Category              | Tool                   | Description                      |
| --------------------- | ---------------------- | -------------------------------- |
| **Context**           | `set_project`          | Set default project context      |
|                       | `get_current_project`  | Get current project context      |
|                       | `list_projects`        | List available projects          |
| **Content Discovery** | `search_content_types` | Search/list content types        |
|                       | `get_content_type`     | Get detailed content type schema |
|                       | `search_content`       | Search/list content items        |
|                       | `get_content`          | Get detailed content item        |
| **Assets**            | `search_assets`        | Search/list media assets         |
| **Creation**          | `create_content`       | Create new content items         |
|                       | `update_content`       | Update existing content          |

## Naming Conventions

| Element         | Convention  | Example                |
| --------------- | ----------- | ---------------------- |
| Tool names      | snake\_case | `search_content_types` |
| Field names     | camelCase   | `contentTypeId`        |
| Response fields | camelCase   | `projectName`          |

This maintains MCP consistency for tool names while matching the Metabind API's camelCase field naming.

## Authentication

MCP tools use the same authentication as the Metabind API. The MCP server handles authentication through the connection parameters established when the client connects.

## Project Context

All tools accept an optional `projectId` parameter. If not provided, tools use the session's default project set via `set_project`. Context persists within a session but requires re-establishment on reconnection.

```javascript theme={null}
// Set project context once
await mcp.call("set_project", { projectId: "proj_123" });

// Subsequent calls use the default project
await mcp.call("search_content", { query: "tutorials" });
```
