Skip to content

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.

Terminal window
context serve
OptionDescriptionDefault
--httpUse HTTP transport (default is stdio)Off
--port <number>Port for HTTP server3000
--host <address>Host address to bind0.0.0.0
--context-dir <path>Path to context files./context
Terminal window
context serve

This is the standard mode for use with Claude Desktop, Cursor, and other MCP-compatible tools.

Terminal window
context serve --http --port 8080

Starts an HTTP server at http://0.0.0.0:8080/mcp for browser-based or networked clients.

Terminal window
context serve --http --host 0.0.0.0 --port 3000

Add to your claude_desktop_config.json:

{
"mcpServers": {
"context": {
"command": "context",
"args": ["serve"],
"cwd": "/path/to/your/project"
}
}
}

Add to .cursor/mcp.json in your project:

{
"mcpServers": {
"context": {
"command": "context",
"args": ["serve"]
}
}
}

The server exposes the following to MCP clients:

ResourceDescription
context://manifestFull compiled manifest
context://model/{name}Single model details
context://glossaryAll business term definitions
context://tier/{name}Tier scorecard for a model
context://data-product/templateBlank data product YAML template
context://data-product/{name}Export model as data product
ToolDescription
context_searchFull-text search across models, fields, terms
context_explainLook up any entity by name
context_validateRun lint rules and return diagnostics
context_tierGet the current tier scorecard
context_golden_queriesRetrieve curated SQL templates
context_guardrailsGet required filters and business rules