MCP

Compass exposes an MCP (Model Context Protocol) server at /mcp. Any MCP-compatible AI tool can connect and query the knowledge graph using structured tools.

Setup

Claude Code

Add to your project's .mcp.json:

{
  "mcpServers": {
    "compass": {
      "type": "sse",
      "url": "http://localhost:8080/mcp"
    }
  }
}

Cursor

Add to Cursor's MCP settings (Settings > MCP Servers):

{
  "compass": {
    "type": "sse",
    "url": "http://localhost:8080/mcp"
  }
}

Windsurf

Add to Windsurf's MCP configuration:

{
  "mcpServers": {
    "compass": {
      "serverUrl": "http://localhost:8080/mcp"
    }
  }
}

Tools

search_entities

Search the knowledge graph with keyword, semantic, or hybrid mode.

ParameterRequiredDescription
textYesSearch query
typesNoComma-separated entity types (e.g., table,topic)
sourceNoFilter by source system
modeNokeyword, semantic, or hybrid (default: keyword)
sizeNoMax results (default: 10)

get_context

Get full context about an entity: the entity itself, its relationships, and related entities.

ParameterRequiredDescription
urnYesEntity URN
depthNoTraversal depth, 1-5 (default: 2)

impact

Analyze downstream blast radius — what entities are affected if this entity changes.

ParameterRequiredDescription
urnYesEntity URN
depthNoDownstream traversal depth (default: 3)

get_documents

Get documents (runbooks, annotations, decisions) attached to an entity.

ParameterRequiredDescription
urnYesEntity URN

Usage Patterns

AI agents typically compose these tools together:

  1. Discoversearch_entities to find relevant entities
  2. Understandget_context to see relationships and neighbors
  3. Assess riskimpact to evaluate downstream effects
  4. Get knowledgeget_documents for runbooks and decisions

The agent controls what context it assembles. Compass provides focused, composable tools rather than monolithic responses.