MCP Server#
clp-json includes an MCP server that allows AI agents–such as Claude
Desktop, Cursor, and Visual Studio Code (VSCode)–to query
CLP-compressed logs.
This guide explains how to configure and run CLP’s MCP server, as well as how to connect an AI agent to the MCP server.
Note
Currently, support for the MCP server is only included with clp-json (not clp-text).
Prerequisites#
This guide assumes:
you can configure, start, stop, and use
clp-jsonas described in the clp-json quick-start guide.you have an Agent installed that supports connections to MCP servers over HTTP.
Starting the MCP Server#
Configure
clp-jsonto run the MCP server by locating themcp_serversection inetc/clp-config.yaml#mcp_server: nullthen uncommenting it and specifying a
hostandport:mcp_server: host: "localhost" port: 8000 # other settings
Replace the default
hostandportshown above if necessary.Note
If you set
mcp_server: nullor leave themcp_serversection commented, the MCP server won’t be started with the rest ofclp-json.Start
clp-jsonand compress the logs you want to query by following the clp-json quick-start guide. This will run the CLP MCP server on thehostandportyou specified in step (1).
Connecting to the MCP Server#
See one of the following guides for how to connect CLP’s MCP server to the agent of your choice.
Note
Agents sometimes ignore MCP instructions even after making the get_instructions tool call. To
reduce erroneous queries from the agent, in your prompt, you can tell the agent to read the MCP
instructions carefully before analyzing any logs.
Connecting Claude Desktop
Configuring Claude Desktop to connect to the CLP MCP server
Connecting Cursor
Configuring Cursor to connect to the CLP MCP server
Connecting VSCode
Configuring VSCode to connect to the CLP MCP server
Limitations#
CLP currently doesn’t store time zone information in the compressed logs. This means that if the logs you compressed were not in the UTC time zone, you will need to tell your agent what time zone the logs were in originally. Support for encoding time zone information in the compressed logs will be available in a future release.