PeakInfer MCP Server
MCP server for achieving peak inference performance by detecting drift between code and runtime behavior, comparing against benchmarks, and providing optimization templates.
README
PeakInfer MCP Server
Achieve peak inference performance in Claude Desktop and Claude Code.
PeakInfer helps you run AI inference at peak performance by correlating what no one else sees together: your code, runtime behavior, benchmarks, and evals.
The Problem
Your code says streaming: true. Runtime shows 0% actual streams. That's drift—and it's killing your latency.
Peak Inference Performance means: Improving latency, throughput, reliability, and cost without changing evaluated behavior.
Features
- Drift Detection: Find mismatches between code declarations and runtime behavior
- Runtime Connectors: Fetch events from Helicone and LangSmith
- Benchmark Comparison: Compare your metrics to InferenceMAX benchmarks (15+ models)
- Template Library: Access 43 optimization templates
- Analysis History: Track and compare performance over time
Installation
Via npx (Recommended)
npx @kalmantic/peakinfer-mcp
Via npm (Global)
npm install -g @kalmantic/peakinfer-mcp
peakinfer-mcp
Claude Desktop Configuration
Add to ~/.config/claude/claude_desktop_config.json (macOS) or %APPDATA%\claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"peakinfer": {
"command": "npx",
"args": ["@kalmantic/peakinfer-mcp"],
"env": {
"HELICONE_API_KEY": "your-key-here",
"LANGSMITH_API_KEY": "your-key-here"
}
}
}
}
Build from Source
git clone https://github.com/Kalmantic/peakinfer-mcp.git
cd peakinfer-mcp
npm install
npm run build
Available Tools
Runtime Data
| Tool | Description |
|---|---|
get_helicone_events |
Fetch LLM events from Helicone |
get_langsmith_traces |
Fetch traces from LangSmith |
Benchmarks
| Tool | Description |
|---|---|
get_inferencemax_benchmark |
Get benchmark data for a model |
compare_to_baseline |
Compare current analysis to historical baseline |
Templates
| Tool | Description |
|---|---|
list_templates |
List available optimization templates |
get_template |
Get details of a specific template |
Analysis
| Tool | Description |
|---|---|
save_analysis |
Save analysis results to history |
Environment Variables
| Variable | Description |
|---|---|
HELICONE_API_KEY |
API key for Helicone integration |
LANGSMITH_API_KEY |
API key for LangSmith integration |
Example Usage
In Claude Desktop or Claude Code:
Fetch the last 7 days of events from Helicone and identify any drift between my code and runtime behavior.
Compare my current p95 latency to InferenceMAX benchmarks for gpt-4o.
Show me optimization templates for improving throughput without changing model behavior.
Resources
The server also exposes MCP resources:
peakinfer://templates- Optimization templates (43 total)peakinfer://benchmarks- InferenceMAX benchmark data (15+ models)peakinfer://history- Analysis run history
Prompts
Available prompt templates:
analyze-file- Analyze a file for LLM inference pointscompare-benchmarks- Compare your metrics to peak benchmarkssuggest-optimizations- Get optimization recommendations that preserve behavior
The Four Dimensions
PeakInfer analyzes every inference point across 4 dimensions:
| Dimension | What We Find |
|---|---|
| Latency | Missing streaming, blocking calls, p95 vs benchmark gaps |
| Throughput | Sequential bottlenecks, batch opportunities |
| Reliability | Missing retries, timeouts, fallbacks |
| Cost | Right-sized model selection, token optimization |
Troubleshooting
Server not appearing in Claude Desktop
- Check the path to
dist/index.jsis absolute - Verify
npm run buildcompleted successfully - Restart Claude Desktop after config changes
API key errors
- Verify API keys are set in config
envsection - Check keys are valid at provider's dashboard
- Ensure no trailing whitespace in key values
Links
License
Apache-2.0
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.