The MCP stack in this project.
Protocol layer
MCP uses JSON-RPC style messages between a client and server. HARP implements it with fastmcp.
fastmcpharp/mcp/server.pyRuntime layer
The MCP server shares HARP's index runtime. It can use BM25, optional OpenRAG hybrid search, evidence rendering, and Prometheus telemetry.
Transport layer
Local tools spawn HARP over stdio. Remote agents can use streamable HTTP mounted into the FastAPI app at /mcp.
python3 -m harp.mcp.server/api/harp/mcp/Tools, resources, and prompts are different things.
How MCP is triggered.
MCP is not a daemon that randomly starts doing work. A client starts or connects to the server, then a user or model action causes a tool/resource/prompt request.
"Investigate this alert" or "search HARP for node disk pressure."
The app sees the HARP MCP server is configured and available.
Local stdio spawns Python, or HTTP connects to HARP API's /mcp.
The client sends a structured request like harp_search_hybrid.
HARP returns JSON or Markdown with source paths and safety notes.
Step through an MCP call.
Click each step to see what is happening on the wire and inside HARP.
The agent gets context, not power.
Good use
Let agents search HARP, retrieve cited runbooks, summarize evidence, compare RCAs, and propose safe next diagnostics.
Bad use
Do not use MCP to expose shell commands, Kubernetes mutation, Git writes, reindexing, secret reads, or remediation execution.
Why it matters
MCP makes HARP usable by many AI clients without rewriting custom integrations for each tool.