context serve
The serve command starts a Model Context Protocol (MCP) server that makes your compiled context available to AI assistants and other MCP clients.
context serveOptions
Section titled “Options”| Option | Description | Default |
|---|---|---|
--http | Use HTTP transport (default is stdio) | Off |
--port <number> | Port for HTTP server | 3000 |
--host <address> | Host address to bind | 0.0.0.0 |
--context-dir <path> | Path to context files | ./context |
Examples
Section titled “Examples”Stdio mode (default)
Section titled “Stdio mode (default)”context serveThis is the standard mode for use with Claude Desktop, Cursor, and other MCP-compatible tools.
HTTP mode
Section titled “HTTP mode”context serve --http --port 8080Starts an HTTP server at http://0.0.0.0:8080/mcp for browser-based or networked clients.
Bind to all interfaces
Section titled “Bind to all interfaces”context serve --http --host 0.0.0.0 --port 3000MCP client configuration
Section titled “MCP client configuration”Claude Desktop
Section titled “Claude Desktop”Add to your claude_desktop_config.json:
{ "mcpServers": { "context": { "command": "context", "args": ["serve"], "cwd": "/path/to/your/project" } }}Cursor
Section titled “Cursor”Add to .cursor/mcp.json in your project:
{ "mcpServers": { "context": { "command": "context", "args": ["serve"] } }}Exposed MCP resources
Section titled “Exposed MCP resources”The server exposes the following to MCP clients:
| Resource | Description |
|---|---|
context://manifest | Full compiled manifest |
context://model/{name} | Single model details |
context://glossary | All business term definitions |
context://tier/{name} | Tier scorecard for a model |
context://data-product/template | Blank data product YAML template |
context://data-product/{name} | Export model as data product |
Exposed MCP tools
Section titled “Exposed MCP tools”| Tool | Description |
|---|---|
context_search | Full-text search across models, fields, terms |
context_explain | Look up any entity by name |
context_validate | Run lint rules and return diagnostics |
context_tier | Get the current tier scorecard |
context_golden_queries | Retrieve curated SQL templates |
context_guardrails | Get required filters and business rules |
Next steps
Section titled “Next steps”- Build the manifest first with
context build - Generate static docs with
context site