MCP Server
Connect AI agents to your infrastructure via the Model Context Protocol. Query resources, relationships, and context packs programmatically.
Overview
Knowledge Tree includes a Model Context Protocol (MCP)server that allows AI agents (like Claude, GPT, or custom agents) to query your infrastructure directly. The MCP server exposes tools for searching resources, traversing relationships, and assembling context packs.
Transports
The MCP server supports two transport modes:
| Transport | Use Case |
|---|---|
| stdio | Claude Desktop, local agents |
| HTTP+SSE | Remote agents, web applications |
Available Tools
The MCP server exposes these tools to connected agents:
| Tool | Description | Parameters |
|---|---|---|
search_resources | Search for resources | query, type, provider, limit |
get_resource | Get a specific resource | type, id |
get_relationships | Get edges for a resource | id, direction, edgeType |
traverse | Graph traversal | startId, direction, edgeTypes, maxDepth |
assemble_context | Build a context pack | packType, target, maxTokens |
query_graph | Execute a Cypher query | cypher, params |
Context Packs
Context packs are pre-assembled bundles of relevant infrastructure information, sized to fit within LLM token budgets. Available pack types:
| Pack Type | Purpose |
|---|---|
runbook | Operational runbook for a resource |
architecture | Architecture description with neighbors |
impact | Impact analysis (what depends on this) |
inventory | Resource inventory matching a query |
search | Semantic search across documentation |
Configuration
# In your MCP client config (e.g., Claude Desktop)
{
"mcpServers": {
"knowledge-tree": {
"command": "kt-agent",
"args": ["mcp", "--config", "configs/dev.yaml"],
"transport": "stdio"
}
}
}HTTP+SSE Transport
For remote agents, the MCP server also listens on the configured MCP port (default 9090). Point your agent's MCP client at
http://your-server:9090/mcp.