Skip to main content
Glama
sbrejnev988-coder

mcp-code-shrinker

mcp-code-shrinker v0.3.11

Semantic Context Compiler — stratified L0-L3 context with exact-source escalation.

Status

Feature

✅ Implemented

L0 Project Map, L1 Contracts, L2 Exact Source, L3 Evidence

✅ Implemented

Stable symbol IDs (survive neighbor edits)

✅ Implemented

Symbol revision tracking (body changes → new revision)

✅ Implemented

Context packets with ranking + quality check

✅ Implemented

Patch workflow: propose → validate (sandbox) → apply

✅ Implemented

Path security (MCP roots)

✅ Implemented

Loss manifest + confidence scores

🔨 Experimental

Cross-file call graph (relative imports; package imports planned)

🔨 Experimental

Patch sandbox with project copy (node_modules skipped)

🔨 Experimental

TypeScript typecheck integration (tsc must be installed)

📋 Planned

tree-sitter grammars (regex parser used currently)

📋 Planned

Quality benchmark suite

📋 Planned

Git worktree isolation for patches

Architecture

Layer 0: Project Map         (5%)
Layer 1: Semantic Contracts  (40%)  signatures, effects, throws, confidence
Layer 2: Exact Source        (40%)  NO renaming, NO regex, NO format changes
Layer 3: Evidence            (15%)  tests, stack traces, diagnostics

Related MCP server: code-graph-rag-mcp

Tools (11)

Tool

Status

Description

project.scan

🔨 Exp

Build cross-file call graph

project.map

L0: file tree + exports

file.contracts

L1: all symbol contracts

symbol.source

L2: EXACT source (never modified)

symbol.context

🔨 Exp

Callers/callees/tests from graph

context.create

Build L0-L3 packet

context.expand

Model requests missing symbols

context.inspect

Loss manifest + quality check

patch.propose

Edit operations

patch.validate

Sandbox: parse→typecheck→lint→test

patch.apply

Apply with hash re-check + .bak

Install

git clone https://github.com/sbrejnev988-coder/mcp-code-shrinker.git
cd mcp-code-shrinker && npm install && npm test

License

MIT

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sbrejnev988-coder/mcp-code-shrinker'

If you have feedback or need assistance with the MCP directory API, please join our Discord server