MCP Integration
Current status of the logpare MCP server, how to run it from source today, and the client configs it will use once published.
Learn how to integrate logpare with AI coding assistants via the Model Context Protocol (MCP).
UCP-Ready@logpare/mcp is not published to npm yet. Every npx -y @logpare/mcp and
npm install -g @logpare/mcp command on this page will currently fail with a registry
404. The server lives in this repository at
packages/mcp — see
Running it from source below for what works today. The
per-client configuration blocks are kept here as a reference for when the package ships.
Overview
logpare provides an MCP server that exposes log compression capabilities as tools for AI assistants. This enables AI agents to:
- Compress large log files before analysis
- Extract patterns from application logs
- Estimate compression ratios
- Process UCP checkout and A2A logs (with
--ucpflag)
Supported Clients
| Client | Transport | Config Location |
|---|---|---|
| Claude Desktop | stdio | claude_desktop_config.json |
| Claude Code (CLI) | stdio | ~/.claude.json |
| Cursor | stdio | ~/.cursor/mcp.json |
| VS Code + Copilot | stdio | .vscode/mcp.json |
| Windsurf | stdio | ~/.codeium/windsurf/mcp_config.json |
| ChatGPT | HTTP* | Settings → Connectors |
| Gemini | stdio | ~/.config/gcloud/mcp-config.json |
Note:
@logpare/mcpcurrently supports stdio transport only. Clients marked with * require hosting the MCP server with an HTTP adapter.
Running it from source
Until the package is published, clone the monorepo and build the server, then point your client at the built entry point by absolute path.
git clone https://github.com/logpare/logpare.git
cd logpare
pnpm install
pnpm build # builds the logpare library it depends on
pnpm --filter @logpare/mcp build # builds packages/mcp/distVerify the build:
node packages/mcp/dist/cli.js --testThen use an absolute path in any client config that would otherwise call npx:
{
"mcpServers": {
"logpare": {
"command": "node",
"args": ["/absolute/path/to/logpare/packages/mcp/dist/cli.js"]
}
}
}Every config block below works the same way: replace "command": "npx" and the
"-y", "@logpare/mcp" arguments with the pair above, and keep whatever optional flags
that block already had. A block showing --ucp keeps --ucp; a basic block stays basic.
Claude Desktop
Configuration File Locations
| Platform | Path |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
| Linux | ~/.config/Claude/claude_desktop_config.json |
Basic Configuration
{
"mcpServers": {
"logpare": {
"command": "npx",
"args": ["-y", "@logpare/mcp"]
}
}
}With UCP Extension
{
"mcpServers": {
"logpare": {
"command": "npx",
"args": ["-y", "@logpare/mcp", "--ucp"]
}
}
}With Custom Settings
Defaults are set with CLI flags, not environment variables:
{
"mcpServers": {
"logpare": {
"command": "npx",
"args": ["-y", "@logpare/mcp", "--ucp", "--format", "detailed", "--depth", "5"]
}
}
}Setup Steps
- Open Claude Desktop → Settings (or Claude menu → Settings)
- Navigate to Developer tab
- Click Edit Config
- Add the configuration above
- Save and restart Claude Desktop completely
Verify Installation
After restart, look for the MCP server indicator (hammer icon) in the bottom-right corner of the input box.
Claude Code (CLI)
Add via CLI
These npx forms will fail until the package is published — use the source build below.
# Basic installation
claude mcp add logpare -s user -- npx -y @logpare/mcp
# With UCP extension
claude mcp add logpare -s user -- npx -y @logpare/mcp --ucpWorking today, from a local build:
claude mcp add logpare -s user -- node /absolute/path/to/logpare/packages/mcp/dist/cli.jsConfiguration File
Edit ~/.claude.json:
{
"mcpServers": {
"logpare": {
"command": "npx",
"args": ["-y", "@logpare/mcp", "--ucp"]
}
}
}Verify Installation
claude mcp list
# or use /mcp in a conversation to check statusCursor
Configuration File Locations
| Scope | Path |
|---|---|
| Global | ~/.cursor/mcp.json |
| Project | .cursor/mcp.json (in project root) |
stdio Configuration
{
"mcpServers": {
"logpare": {
"command": "npx",
"args": ["-y", "@logpare/mcp", "--ucp"]
}
}
}Variable Interpolation
Cursor supports these variables:
${env:NAME}— environment variables${userHome}— home directory${workspaceFolder}— project root
VS Code + GitHub Copilot
Requires: VS Code 1.102+ with GitHub Copilot
Configuration File Locations
| Scope | Path |
|---|---|
| Workspace | .vscode/mcp.json |
| Global | User profile (via Command Palette) |
Configuration Format
{
"servers": {
"logpare": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@logpare/mcp", "--ucp"]
}
}
}Setup via Command Palette
- Open Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) - Run MCP: Add Server
- Select Command (stdio)
- Enter:
- Command:
npx - Arguments:
-y @logpare/mcp --ucp - Name:
logpare
- Command:
- Select scope (Workspace or Global)
Start the Server
- Open
.vscode/mcp.json - Click the Start button at the top
- Server tools will be discovered automatically
Windsurf
Configuration File Location
| Platform | Path |
|---|---|
| macOS/Linux | ~/.codeium/windsurf/mcp_config.json |
| Windows | %USERPROFILE%\.codeium\windsurf\mcp_config.json |
Configuration
{
"mcpServers": {
"logpare": {
"command": "npx",
"args": ["-y", "@logpare/mcp", "--ucp"]
}
}
}Setup via UI
- Open Windsurf Settings
- Select Manage MCPs
- Click View raw config to edit
mcp_config.json - Add the configuration above
- Restart Windsurf
ChatGPT
Requires: ChatGPT Pro or Plus account
Setup Steps
- Enable Developer Mode: Settings → Connectors → Advanced settings
- Open Settings → Connectors tab
- Click Create new connector
- Configure:
- Name:
logpare - MCP server URL: Your hosted logpare MCP endpoint
- Authentication: As required
- Name:
Note: ChatGPT requires an HTTP endpoint. For local usage, you'll need to host the MCP server with HTTP transport.
Gemini Code Assist
Configuration File
Edit ~/.config/gcloud/mcp-config.json:
{
"servers": {
"logpare": {
"command": "npx",
"args": ["-y", "@logpare/mcp", "--ucp"]
}
}
}Setup Steps
- Add configuration to
mcp-config.json - Restart your IDE
- Tools will be available in Gemini Code Assist
Available Tools
Core Tools
| Tool | Description |
|---|---|
compress_logs | Compress log lines with format/depth/threshold options |
compress_text | Compress multi-line text |
analyze_patterns | Quick pattern extraction |
estimate_compression | Sample-based compression estimate |
UCP Tools (--ucp flag)
| Tool | Description |
|---|---|
compress_checkout_logs | UCP checkout session compression |
analyze_checkout_errors | Error pattern analysis with suggestions |
compress_a2a_logs | Agent-to-Agent log compression |
Tool Reference
compress_logs
Compress an array of log lines with full options.
{
lines: string[]; // Log lines to compress
format?: 'summary' | 'detailed' | 'json';
depth?: number; // Default: 4
simThreshold?: number; // Default: 0.4
maxTemplates?: number; // Default: 50
}compress_text
Compress multi-line log text.
{
text: string; // Multi-line log text
format?: 'summary' | 'detailed' | 'json';
depth?: number;
simThreshold?: number;
maxTemplates?: number;
}analyze_patterns
Extract patterns without full compression (faster).
{
lines: string[];
maxPatterns?: number; // Default: 20
}estimate_compression
Quick compression ratio estimate from sample.
{
lines: string[];
sampleSize?: number; // Default: 1000
}compress_checkout_logs (UCP)
Compress UCP checkout session logs.
{
lines: string[];
session_id?: string; // Filter by session ID (cs_*)
preserve_errors?: boolean; // Default: true
format?: 'summary' | 'detailed' | 'json' | 'ucp_json';
}analyze_checkout_errors (UCP)
Analyze UCP checkout error patterns.
{
lines: string[];
include_suggestions?: boolean; // Default: true
group_by?: 'error_code' | 'severity' | 'session' | 'time';
}compress_a2a_logs (UCP)
Compress Agent-to-Agent communication logs.
{
lines: string[];
group_by_agent?: boolean;
preserve_handoffs?: boolean;
trace_id?: string;
}CLI Options
npx @logpare/mcp [options]
Options:
--ucp, -u Enable UCP extension
--format, -f Default format (summary|detailed|json)
--depth, -d Parse tree depth (2-8, default: 4)
--threshold, -t Similarity threshold (0.0-1.0, default: 0.4)
--max-lines, -m Max lines per request (default: 100000)
--test Run self-test
--help, -h Show help
--version, -v Show version--depth must be between 2 and 8 and --threshold between 0.0 and 1.0; the server exits
with an error otherwise. There are no LOGPARE_MCP_* environment variables — these flags
are the only way to change the defaults.
Troubleshooting
Server Not Appearing
- Verify JSON syntax is valid
- Restart the client application completely
- While the package is unpublished,
npx @logpare/mcpcannot resolve — use the absolute path from Running it from source - Run
node packages/mcp/dist/cli.js --testto verify the build
Tools Not Working
- Check client's MCP logs for errors
- Verify the server is connected (look for status indicators)
- Rebuild after pulling:
pnpm --filter @logpare/mcp build
Performance Issues
- Reduce
maxTemplatesparameter - Use
estimate_compressionfor large files first - Process logs in smaller batches
- Increase
simThresholdfor fewer templates
Security Best Practices
- Local processing: MCP runs locally—logs stay on your machine
- PII masking: Ensure sensitive data is masked before compression
- Review output: Check compressed output before sharing
- Trusted sources: Only install MCP servers from trusted sources
See Also
- MCP Specification (v2026-07-28) — current revision
- MCP Specification (v2025-11-25) — the revision
@logpare/mcpcurrently targets - UCP Documentation
- Parameter Tuning Guide
- Custom Preprocessing