# Diogenes Context Compression & Code Solvers MCP

> Diogenes Context Compression & Code Solvers MCP is a freemium MCP server for developer tools. MCP server with AST context pruning, token budgeting and code patching tools for coding. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Starting price:** $5 a month
- **Platforms:** API, CLI, Web, VS Code, Self-hosted
- **Website:** https://diogenesgateway.com
- **Repository:** https://github.com/stand-out-of-my-sun/diogenes-context-code-solver-mcp
- **MCP Registry name:** io.github.stand-out-of-my-sun/diogenes-context-code-solver-mcp
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-27

## About

Diogenes exposes fifteen deterministic developer tools over a streamable HTTP endpoint. The toolset focuses on shrinking large source files and logs before they reach a model, planning how a prompt's token budget is spent, and applying code diffs that no longer match line-for-line. Other tools cover symbol and complexity analysis, circular dependency detection, stack-trace triage, type schema generation, exact arithmetic and NPV/IRR, critical path scheduling, A/B significance testing, Monte Carlo risk simulation, OpenAPI breaking-change detection, boundary test vectors and agent memory diffs.

Many of the tools are free to call without an account or wallet. Calls to the heavier tools are metered in sats via L402 or through a prepaid key bought with Stripe or crypto, and each endpoint offers a demo mode that returns a schema preview. The source is MIT-licensed and it can also be run locally over stdio with npx.

The server suits developers using Cursor, Claude Desktop, Zed or Windsurf who want MCP tools for context budgeting, patch repair and deterministic calculations without loading the wider 108-endpoint gateway.

## Features

- **AST context pruning:** Compresses large source files, logs or transcripts while keeping signatures, imports and error frames.
- **Token budget planning:** Counts BPE tokens across prompt segments and estimates model costs per call.
- **Fuzzy diff patching:** Applies unified diffs or search/replace blocks even when line numbers or indentation have drifted.
- **Static code analysis:** Lists symbols, call edges and complexity metrics for TypeScript, Python, Rust, Go and Move files.
- **Deterministic solvers:** Runs exact arithmetic, NPV/IRR, critical path scheduling and Monte Carlo risk models without model guesswork.
- **Account-less free tier:** Most tools run with no API key or wallet, and paid calls can be prepaid or paid per request.

## Good for

- Shrinking oversized source files or logs before sending them into an LLM prompt
- Repairing a code edit that failed exact line matching in an IDE agent
- Finding circular imports and the downstream files to retest after a change
- Generating TypeScript, Zod or Pydantic types from a sample JSON response
- Checking whether an A/B prompt experiment produced a significant lift

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add --transport http diogenes-context-code-solver-mcp https://diogenesgateway.com/mcp/context-code-solver
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "diogenes-context-code-solver-mcp": {
      "type": "http",
      "url": "https://diogenesgateway.com/mcp/context-code-solver"
    }
  }
}
```

### Claude Desktop (Customize → Connectors → Add → Add custom connector)

```text
https://diogenesgateway.com/mcp/context-code-solver
```

Paste this URL, choose how to sign in, then click Add and Connect. On Team and Enterprise an Owner adds it in Organization settings → Connectors.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "diogenes-context-code-solver-mcp": {
      "url": "https://diogenesgateway.com/mcp/context-code-solver"
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "diogenes-context-code-solver-mcp": {
      "type": "http",
      "url": "https://diogenesgateway.com/mcp/context-code-solver"
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### ChatGPT (chatgpt.com → Plugins → + → Add custom MCP server)

```text
https://diogenesgateway.com/mcp/context-code-solver
```

Paste this URL, set up sign-in, accept the warning and install the plugin. Then type @ in a chat to use it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add diogenes-context-code-solver-mcp --url https://diogenesgateway.com/mcp/context-code-solver
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.diogenes-context-code-solver-mcp]
url = "https://diogenesgateway.com/mcp/context-code-solver"
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "diogenes-context-code-solver-mcp": {
      "httpUrl": "https://diogenesgateway.com/mcp/context-code-solver"
    }
  }
}
```

Or run: gemini mcp add -s user --transport http diogenes-context-code-solver-mcp https://diogenesgateway.com/mcp/context-code-solver

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "diogenes-context-code-solver-mcp": {
      "serverUrl": "https://diogenesgateway.com/mcp/context-code-solver"
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "diogenes-context-code-solver-mcp": {
      "url": "https://diogenesgateway.com/mcp/context-code-solver",
      "transport": "http"
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "diogenes-context-code-solver-mcp": {
      "type": "streamableHttp",
      "url": "https://diogenesgateway.com/mcp/context-code-solver"
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "diogenes-context-code-solver-mcp": {
      "url": "https://diogenesgateway.com/mcp/context-code-solver"
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "diogenes-context-code-solver-mcp": {
      "url": "https://diogenesgateway.com/mcp/context-code-solver"
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "diogenes-context-code-solver-mcp": {
      "url": "https://diogenesgateway.com/mcp/context-code-solver"
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "diogenes-context-code-solver-mcp": {
      "url": "https://diogenesgateway.com/mcp/context-code-solver"
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Grok Bot (Grok Bot desktop app → Connect apps → Add a custom connector)

```sh
https://diogenesgateway.com/mcp/context-code-solver
```

Enter a Name (for example "Diogenes Context Compression & Code Solvers MCP"), choose Type: Remote HTTPS, paste this as the Server URL and choose Add plugin.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "diogenes-context-code-solver-mcp": {
      "type": "http",
      "url": "https://diogenesgateway.com/mcp/context-code-solver"
    }
  }
}
```

## Tools

The server marks all 15 tools read-only. From the server's own tool labels and tool names; not verified by us.

- `diff_agent_memory_checkpoint` (says read-only): Computes structural diffs between two agent state snapshots ('added_keys', 'mutated_keys', 'removed_keys'), flags boolean belief contradictions, generates an RFC 7396 JSON Merge Patch delta, and computes a canonical checkpoint hash. Use when checkpointing agent state or transmitting minimal RFC 7396 state deltas across multi-agent handoffs; for counting BPE tokens and auditing Lost-in-the-Middle p
- `prune_context_skeleton` (says read-only): Compresses large source files, logs, or transcripts by 50–80% to fit an LLM context budget while preserving 100% of function/class/type signatures, imports, error frames, and query-matched lines. Use when shrinking oversized source files or logs before feeding them into an LLM prompt; for counting BPE tokens across prompt segments and calculating multi-model inference costs without altering text, 
- `plan_context_token_budget` (says read-only): Counts subword BPE tokens across prompt segments, detects high-priority instructions trapped in the 35%–72% Lost-in-the-Middle attention trough, and calculates USD/satoshi costs across frontier LLMs. Use when auditing prompt token budgets, reordering prompt sections for primacy/recency attention, or comparing model API costs; for actively compressing and stripping low-salience lines from a single 
- `rerank_hybrid_rag_chunks` (says read-only): Reranks and deduplicates candidate RAG or retrieval passages against a search prompt using Okapi BM25 (k1=1.5, b=0.75), Reciprocal Rank Fusion (RRF), and Maximal Marginal Relevance (MMR) Jaccard diversity filtering. Use when selecting the top-K highest-signal, non-redundant passages from vector search or grep results; for compressing a single contiguous source file while keeping its original line 
- `apply_fuzzy_code_patch` (says read-only): Applies unified diffs (@@ ... @@) or SEARCH/REPLACE blocks to source code using sliding-window token similarity to resolve drifted line numbers, align indentation, and verify bracket balance. Use when healing and applying a code edit or diff that failed exact line matching due to line-number drift or whitespace differences; for inspecting function signatures, call trees, and cyclomatic complexity 
- `analyze_ast_symbol_graph` (says read-only): Static lexer and AST parser only (zero execution or evaluation): extracts imports, exports, classes, interfaces, and functions with line numbers, intra-file call edges, McCabe cyclomatic complexity, and Halstead volume across TypeScript, Python, Rust, Go, and Move. Use when mapping internal functions, call graphs, and complexity hotspots of a source file before refactoring; for analyzing cross-fil
- `audit_module_dependency_cycles` (says read-only): Runs Tarjan's Strongly Connected Components (SCC) algorithm on a module import map to detect circular dependencies, compute parallel topological build waves, and trace downstream change blast radius. Use when auditing multi-file import graphs for circular cycles or determining which downstream files must be re-tested after an edit; for extracting function-level symbols and cyclomatic complexity in
- `isolate_stacktrace_root_cause` (says read-only): Parses noisy CI/terminal logs and multi-language stack traces (Node/TS, Python, Rust, Go), strips node_modules/stdlib frames to isolate the innermost failing user-code frame, and clusters repetitive logs into Drain templates. Use when triage-debugging test failures, crash dumps, or repetitive server error logs; for compressing general source code files or prose transcripts, use prune_context_skele
- `compile_polyglot_type_schemas` (says read-only): Inspects a sample JSON payload (inferring UUID, ISO-8601 datetime, email, integer vs float, and array item types) and compiles strict TypeScript interfaces, Zod schemas, Python Pydantic v2 models, and JSON Schema Draft 2020-12. Use when generating static type definitions and runtime validators in TypeScript and Python from a sample JSON response; for extracting existing function/class symbols and 
- `evaluate_deterministic_math` (says read-only): Strict Shunting-Yard AST arithmetic parser with zero eval() or dynamic code execution: evaluates algebraic formulas and computes exact financial NPV, Newton-Raphson IRR, Kelly criterion, and dataset stats. Use when computing exact arithmetic formulas, cashflow NPV/IRR, or descriptive statistics without LLM floating-point guesswork; for running two-sample A/B hypothesis tests, use evaluate_ab_stati
- `schedule_critical_path_tasks` (says read-only): Solves a task dependency DAG via the Critical Path Method (CPM) to compute ES/EF/LS/LF, Total Float/Slack, optimal makespan, and the Critical Path. Use when scheduling dependent engineering milestones or workflow steps to find the minimum project duration and zero-slack bottleneck path; for detecting circular code imports and file blast radius without task durations, use audit_module_dependency_cy
- `evaluate_ab_statistical_significance` (says read-only): Computes Welch's two-sample t-test or two-proportion z-test, returning two-tailed p-values, Cohen's d effect size, relative lift %, and Bayesian P(Treatment > Control). Use when determining whether a prompt change, model benchmark, or A/B experiment produced a statistically significant improvement; for evaluating single algebraic formulas or NPV/IRR cashflows, use evaluate_deterministic_math inste
- `detect_openapi_breaking_changes` (says read-only): Compares baseline and candidate OpenAPI 3.1 specs, JSON Schemas, or MCP tool manifests to detect breaking changes (removed fields, new required inputs, narrowed enums, type mutations). Use when auditing API, JSON Schema, or MCP contract revisions for backward compatibility before deployment; for compiling new TypeScript, Zod, and Pydantic schemas from a single sample JSON payload, use compile_poly
- `generate_boundary_test_vectors` (says read-only): Synthesizes deterministic unit-test vectors from a JSON Schema or function signature covering valid equivalence partitions, numeric/length boundaries, and adversarial Unicode/null inputs. Use when generating exhaustive edge-case unit test payloads and fuzz vectors for an API endpoint or function; for healing and applying unified diffs or search/replace edits to source code, use apply_fuzzy_code_pa
- `simulate_monte_carlo_risk` (says read-only): Runs a reproducible seeded Mulberry32 Monte Carlo simulation over uncertain cost, latency, or duration variables to compute P10/P50/P90/P95 percentiles, Value-at-Risk (VaR), and CVaR. Use when modeling stochastic uncertainty, tail risk (VaR/CVaR), and probability of meeting a budget or SLA target; for evaluating deterministic single-point algebraic formulas or exact NPV/IRR cashflows, use evaluate

## FAQ

### Do I need an account to use Diogenes Context Compression & Code Solvers MCP?

No. The free developer tier works with zero API keys and no wallet, and the paid tools can be called per request or from a prepaid key.

### How do I connect Diogenes Context Compression & Code Solvers MCP to my editor?

Add the streamable HTTP URL https://diogenesgateway.com/mcp/context-code-solver to the MCP settings of Cursor, Claude Desktop or Zed, or run the npx package over stdio.

### Which tools cost money?

Tools such as rerank_hybrid_rag_chunks, audit_module_dependency_cycles and simulate_monte_carlo_risk are charged in sats via L402, while the code analysis, patching and math tools are free.

### Can I try paid tools before paying?

Yes. Appending ?demo=true to a REST endpoint returns a schema preview at no cost, and the gateway lists a limited number of free live demos per day.

### How do I add Diogenes Context Compression & Code Solvers MCP to Claude Code?

Run this command in your terminal: claude mcp add --transport http diogenes-context-code-solver-mcp https://diogenesgateway.com/mcp/context-code-solver

### What are the best alternatives to Diogenes Context Compression & Code Solvers MCP?

The closest alternatives to Diogenes Context Compression & Code Solvers MCP are CodeLint.Dev Tools, RungLab DevTools MCP, Mcpdiet, Diogenes Dev & Data Utilities MCP and Diogenes Autonomous Microservice Gateway.

## Where this comes from

- Description: written from the project's README, the project's website and its MCP Registry entry.
- Status and tools: checked automatically by AIPoweredBot on 28 November 2026.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [CodeLint.Dev Tools](https://ai-powered.com/mcp/codelint-dev-tools): CodeLint.Dev Tools is a free MCP server for developer tools.
- [RungLab DevTools MCP](https://ai-powered.com/mcp/runglab-devtools-mcp): RungLab DevTools MCP is a free MCP server for security.
- [Mcpdiet](https://ai-powered.com/mcp/mcpdiet): Mcpdiet is an open-source MCP server for developer tools.
- [Diogenes Dev & Data Utilities MCP](https://ai-powered.com/mcp/diogenes-dev-and-data-utilities-mcp): Diogenes Dev & Data Utilities MCP is a freemium MCP server for developer tools.
- [Diogenes Autonomous Microservice Gateway](https://ai-powered.com/mcp/diogenes-autonomous-microservice-gateway): Diogenes Autonomous Microservice Gateway is a freemium MCP server for developer tools.
- [Token Context MCP](https://ai-powered.com/mcp/token-context-mcp): Token Context MCP is an open-source MCP server for developer tools.
- [mate.tools](https://ai-powered.com/mcp/mate-tools): mate.tools is an open-source MCP server for developer tools.
- [Daimonos](https://ai-powered.com/mcp/daimonos): Daimonos is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/diogenes-context-compression-and-code-solvers-mcp
