Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

ContextForge MCP deterministically compresses codebases, noisy logs, massive JSON/OpenAPI dumps, and RAG chunks to cut 60-90% of context-window tokens with zero LLM calls.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
compile_repo_contextA

Walk a local repository on disk (skipping node_modules, .git, lockfiles, binaries, and .env secrets), rank files against taskQuery via BM25, and compile a strict token-budgeted context pack mixing verbatim target code and line-indexed skeletons.

skeletonize_codeA

Deterministically compress JS/TS, Python, C/C++, Go, Rust, or Java source code into a line-indexed signature skeleton (or symbol-focus view that expands only matching functions), cutting 65-88% tokens while preserving imports, types, signatures, and exact Lstart-Lend ranges.

compress_logs_and_tracesA

Drain-style deterministic log template clusterer and stack-trace deduplicator. Normalizes timestamps, UUIDs, IPs, hex pointers, and numbers to collapse 1,000+ noisy CI/server/test lines into frequency-ranked ERROR/WARN clusters + unique stack traces (70-95% token reduction).

compact_json_and_apiA

Deterministically compact huge JSON payloads, DB query dumps, or OpenAPI 3.x/Swagger specs into an inferred typed schema with field cardinality, numeric min/max ranges, enum distributions, and a trimmed sample item (75-92% token reduction).

audit_and_pack_rag_contextA

Audit retrieved RAG passages against embedding encoder hard limits (MiniLM 256, BGE/E5 512, Nomic 2048, OpenAI 8191, Voyage 32k), eliminate silent truncation via sentence-bounded re-chunking, remove Jaccard near-duplicates, and apply Lost-in-the-Middle U-shaped attention ordering inside a strict token budget.

compile_context_packB

BM25-ranked, token-budgeted multi-artifact context compiler. Ranks source files, logs, JSON dumps, and docs against a taskQuery, keeping top files verbatim, skeletonizing supporting dependencies, clustering logs, and outputting a strict XML context pack + dropped-file manifest.

simulate_context_budgetB

Deterministic multi-turn agent context-window and cost economics simulator. Computes exact MCP schema tax, turn-by-turn token growth, Lost-in-the-Middle degradation cliff turn, 85% compaction wall turn, prompt-cache economics, and monthly USD savings across 8 frontier models.

Prompts

Interactive templates invoked by user choice

NameDescription
compress-debug-sessionCompress raw crash logs/stack traces and skeletonize suspect source files before diagnosing a production bug.
pack-repo-for-featureCompile an optimal BM25-ranked context pack for implementing a feature across a large multi-file repository.
optimize-rag-pipelineAudit a set of RAG chunks for silent encoder truncation, deduplicate overlap, and reorder for U-shaped attention.

Resources

Contextual data attached and managed by the client

NameDescription
Context Compression Decision PlaybookDeterministic guide for choosing full verbatim code vs signature skeletons, log clustering, JSON schema folding, or disk offloading.
Frontier Model Context Windows & Caching EconomicsReference table of effective attention sweet spots, compaction walls, and cached vs uncached input token pricing.
RAG Encoder Truncation & Lost-in-the-Middle MitigationReference limits for common embedding encoders and U-shaped attention ordering.
MCP Tool-Schema Hygiene & Context-Bloat PreventionHow to avoid burning 15,000+ tokens per turn on eager MCP schemas.

TDQS

A3.7/5.0

Scored across 7 tools

Disambiguation4/5

Each tool targets a distinct artifact type (JSON/OpenAPI, source code, logs/traces, RAG passages) or task (repo walk, budget simulation), so purposes are mostly clear. The three 'pack/compile' tools (compile_context_pack, compile_repo_context, audit_and_pack_rag_context) overlap somewhat since all produce budgeted context, but input-source differences in the descriptions help disambiguate.

Naming Consistency4/5

Names follow a consistent snake_case, verb-led convention (compact_, compile_, skeletonize_, compress_, audit_and_pack_, simulate_). Minor deviations: audit_and_pack_rag_context uses two verbs, and compress vs compact are near-synonyms, but overall pattern is predictable.

Tool Count5/5

Seven tools is well-scoped for a context/token-optimization toolkit, with each tool covering a distinct compression or analysis concern. No redundant or filler tools.

Completeness4/5

The surface broadly covers artifact compaction (JSON, code, logs), context packing (multi-artifact, repo, RAG), and budget simulation, forming a coherent lifecycle. Minor gaps: no standalone token-count/validation tool and no inverse (expand/restore) operations, though simulate_context_budget partially covers estimation.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues