freshcrate
Skin:/
Home > MCP Servers > Lifeblood

Lifeblood

Compiler truth in, AI context out. Open semantic glue between language intelligence and AI tools.

Why this rank:Recent releaseStrong adoptionHealthy release cadence

Description

Compiler truth in, AI context out. Open semantic glue between language intelligence and AI tools.

README

Lifeblood

Compiler-as-a-service for AI agents.

Lifeblood gives AI agents direct access to what compilers know. Type resolution, call graphs, diagnostics, reference finding, code execution. All over a standard MCP connection. No IDE required. Load a project, ask the compiler, get verified answers. Compilers already know everything about your code, just pipe that truth to AI agents instead of letting them grep and guess.

Roslyn (C#)    ──┐                              ┌──  Execute code against project types
TypeScript     ──┤  ┌────────────────────────┐  ├──  Diagnose / compile-check
JSON graph     ──â”ŧ→ │    Semantic Graph      │ →┤──  Find references / rename / format
               ──┤  │  (symbols / edges /    │  ├──  Blast radius / file impact
  community    ──┘  │   evidence / trust)    │  └──  Context packs / architecture rules
  adapters          └────────────────────────┘

Born from shipping a 400k LOC Unity project with AI assistance and realizing that AI writes code but does not verify what it wrote.


Quick Start

Install (30 seconds)

dotnet tool install --global Lifeblood
dotnet tool install --global Lifeblood.Server.Mcp

Requires .NET 8 SDK.

Connect to Claude Code, Cursor, or any MCP client

Add to your project's .mcp.json:

{
  "mcpServers": {
    "lifeblood": {
      "command": "lifeblood-mcp",
      "args": []
    }
  }
}

See MCP Setup Guide for Claude Desktop, VS Code, Cursor, and raw stdio configs.

Use

lifeblood_analyze projectPath="/path/to/your/project"   → load semantic graph
lifeblood_blast_radius symbolId="type:MyApp.AuthService" → what breaks if I change this?
lifeblood_file_impact filePath="src/AuthService.cs"      → what files are affected?
lifeblood_find_references symbolId="type:MyApp.IRepo"    → every caller, every consumer
lifeblood_execute code="typeof(MyApp.Foo).GetMethods()"  → run C# against your types

After the first analysis, use incremental: true for fast re-analysis (seconds instead of minutes).

CLI (for CI and scripting)

lifeblood analyze --project /path/to/your/project
lifeblood analyze --project /path/to/your/project --rules hexagonal
lifeblood context --project /path/to/your/project
lifeblood export  --project /path/to/your/project > graph.json

Build from source

git clone https://github.com/user-hash/Lifeblood.git
cd Lifeblood
dotnet build
dotnet test

18 Tools

Connect an MCP client. Load a project. The AI agent gets 18 tools: 8 read, 10 write.

Tools
Read Analyze, Context, Lookup, Dependencies, Dependants, Blast Radius, File Impact, Resolve Short Name
Write Execute, Diagnose, Compile-check, Find References, Find Definition, Find Implementations, Symbol at Position, Documentation, Rename, Format

Every read-side tool that takes a symbolId routes through one resolver. Exact canonical id, truncated method form, and bare short name all resolve to the same answer.

Full tool reference


Architecture

Hexagonal. Pure domain core with zero dependencies. Language adapters on the left, AI connectors on the right.

LEFT SIDE                     CORE                     RIGHT SIDE
(Language Adapters)        (The Pipe)               (AI Connectors)

Roslyn (C#)       ──┐                            ┌──  MCP Server (18 tools)
TypeScript        ──â”ŧ→  Domain  →  Application  →┤──  Context Pack Generator
JSON graph        ──┘       ↑                     ├──  Instruction File Generator
                      Analysis (optional)         └──  CLI / CI

17 port interfaces, all wired (left side adapters + right side connectors + ISymbolResolver for identifier resolution). Boundaries enforced by architecture invariant tests and 11 frozen ADRs.

Architecture Diagram

Full architecture | Interactive diagram


Three Languages, One Graph

Adapter How it works Confidence
C# / Roslyn Compiler-grade semantic analysis. Cross-module resolution. Bidirectional: analysis + code execution. Proven
TypeScript Standalone Node.js. ts.createProgram + TypeChecker. High
Python Standalone ast module. Zero dependencies. Structural
Any language Output JSON conforming to schemas/graph.schema.json. Adapter guide. Varies

Unity Integration

Lifeblood runs as a sidecar alongside Unity MCP. All 18 tools available in the Unity Editor via [McpForUnityTool] discovery. Runs as a separate process, so no assembly conflicts, no domain reload interference.

Unity setup guide


Dogfooding

Self-analysis (CLI): 1,376 symbols, 3,822 edges, 11 modules, 174 types, 0 violations. 5.1 s wall, 212 MB peak, 144% of one core.

Production-verified on a 75-module 400k LOC Unity workspace. Same workspace, two different paths, two different memory profiles. Both are correct, both are by design, both come from the native usage field on every lifeblood_analyze response.

Path Wall CPU total CPU % (1 core) Peak working set GC gen0/1/2 Use when
CLI (streaming, compilations released) 32.6 s 53.7 s 164.5% 571 MB 197 / 108 / 34 One-shot analyze, rules check, graph export
MCP (compilations retained) 34.3 s 59.2 s 172.6% 2,512 MB 2 / 1 / 1 Interactive session with write-side tools (execute, find_references, rename, etc.)

The MCP retained profile sits around 4x the CLI streaming profile because the write-side tools need the loaded workspace in memory to answer follow-up queries. Pass readOnly: true to lifeblood_analyze to drop MCP back to the streaming profile in exchange for no write-side tools. Both measured on AMD Ryzen 9 5950X (16 cores / 32 threads).

The +9,000-plus edges over the previous baseline come from the v0.6.0 BCL ownership fix (call-graph extraction stops returning null at every System usage in workspaces that ship their own BCL) and the multi-parent GraphBuilder fix (partial types now produce one Contains edge per declaration file).

Seven sessions found 50+ real bugs invisible to unit tests.


Roadmap

  • Community adapters: contribution guides for Go and Rust. Contract and checklist ready, no implementation code yet.
  • REST / LSP bridge: expose the graph to IDE extensions and web services.

Documentation

Page Description
Tools All 18 tools with descriptions, symbol ID format, incremental usage
MCP Setup Copy-paste configs for Claude Code, Cursor, VS Code, Claude Desktop, Unity
Unity Integration Sidecar architecture, setup guide, incremental, memory
Architecture Hexagonal structure, dependency flow, port interfaces, invariants
Architecture Decisions 11 frozen ADRs
Status Component table, test counts, self-analysis, production stats
Adapters How to build a language adapter (13-item checklist)
Dogfood Findings 50+ bugs found by self-analysis and reviewer dogfood sessions

Related

License

AGPL v3

Release History

VersionChangesUrgencyDate
v0.7.11 This release is mostly about **honesty and resilience**: when something goes wrong, the server now tells you *what* and *where* instead of collapsing into an opaque error. Several fixes came directly from dogfooding against a large Unity codebase. Full test and self-analysis counts: see [`docs/STATUS.md`](docs/STATUS.md) (truth-receipt SSoT). ### Fixes that change what you see when things break - **The server no longer crashes itself on a broken pipe.** Previously, if a client disconnected High6/1/2026
v0.7.9 External-review-driven release. Closes one second-pass blocker (write-side profile scope honesty, `INV-MULTI-DEFINE-WRITESIDE-001`), fixes the multi-profile incremental cross-project edge drop the first-pass review caught (`fix(adapter)`: per-profile `DowngradedRefsByProfile` carry), fixes the incremental-noop summary zeroing, and refreshes the public-surface truth contract (RELEASE.md skip policy split, NATIVE_CLANG.md local/manual audit-gate wording, ci.yml + build.yml overlap collapsed). TwoHigh5/24/2026
v0.7.8## Highlights - **`lifeblood_execute` Unity-workspace robustness** — three fixes that close LB-LIM-004 (IL2CPP `GameAssembly.dll` injected as managed metadata, missing BCL refs, dishonest `targetProfile` swap). `execute` is again usable for semantic-ratchet authoring against real Unity workspaces. - **`INV-EXTRACT-PROPERTY-READ-001` (F1d)** — bare-identifier sibling-member property and event reads now emit a symbol-level `References` edge. Closes a ~89% private-property edge gap that split `finHigh5/19/2026
v0.7.7First non-C# adapter ships as beta. `adapters/native-clang/` is a libclang-based C extractor that emits `graph.json` through the same `JsonGraphImporter` boundary the TypeScript and Python adapters already use, so `Lifeblood.Domain`, `Lifeblood.Application`, `Lifeblood.Analysis`, and every connector stay free of LLVM, Clang, and CMake dependencies. Plus one graph-layer correctness fix and the `INV-CHANGELOG-001` ratchet that caught the v0.7.6 release-tag drift. ## Highlights - **Native Clang aHigh5/16/2026
v0.7.3Post-v0.7.2 polish wave from a field-report dogfood pass on a real-world Unity workspace (2026-05-11). One high-severity silent-data-loss bug fixed (cross-module edge drop under incremental analyze), three structured-wire-shape improvements landed (CallSite provenance on every expression-derived edge, type-scoped member resolution, `blast_radius` bucket / per-module grouping), plus an eternal-prose cleanup that generalized consumer-project examples across src + tests + shipped docs so Lifeblood High5/12/2026
v0.7.2 DAWG-dogfood wave covering the full G1+G2+G4+R2-3 finding set from a Unity-shaped audit session, plus three pre-tag-review release-blocker fixes (UTF-16 graph import crash, `global.json` invalid sdk version, MCP-layer no-prior incremental contract violation), four pre-tag-review polish items, and one parser fix discovered via broader-class investigation (multi-segment INV ids silently dropped — a 10-invariant repo-wide silent gap). **Tests 664 → 751 (+87). Invariants reported by the parser 66 →High5/8/2026
v0.7.1## v0.7.1 — dead_code pagination + post-v0.7.0 doc sweep Thin polish release on top of v0.7.0. **Tests 661 → 664 (+3).** One feature + one doc-correctness pass; both surfaced from real reviewer + DAWG-scan feedback. ### Headline changes - **`dead_code` pagination** (`LB-FR-024`). Same shape as `cycles` + `context`. Every response carries `count` + `kindBreakdown` (per-`SymbolKind` histogram) + `truncated`. `summarize:true` returns `preview[]` instead of full `findings[]`. `maxResults` caps thHigh4/27/2026
v0.6.7DAWG-dogfood backlog plan, full sweep. Six phases (P1..P6) ship as one combined release on top of v0.6.5. **Tests: 569 to 632 (+63). Invariants: 63 to 70 (+7). Ports: 22 to 26 (+4). MCP tools: 22 to 25 (+3 read-side).** ## Highlights - **P1**: resolver kind correction (`INV-RESOLVER-006`), file-scoped `lifeblood_diagnose`, `lifeblood_compile_check` accepts a file path, `lifeblood_blast_radius` summarize mode + `directDependants`. Three regression guards confirm v0.6.4/v0.6.5 walker work alreaHigh4/26/2026
v0.6.5Closes the three Roslyn extractor gaps that v0.6.4 left marked "by design / known gap" under `INV-DEADCODE-001`, plus a regression in `LifebloodSymbolResolver` that made the new ctor edges unreachable via the read-side tools. Publish workflow hardened against the helper-tag-as-release drift that shipped `0.6.4.1-post-extractor`. `CLAUDE.md` trimmed 20% without dropping a single invariant rule. **569 tests (+12 new: 8 extractor, 4 resolver). 0 regressions. 0 build warnings.** ## Fixed - **ConsHigh4/14/2026
v0.6.4## What changed Five extraction gaps closed in `RoslynEdgeExtractor` plus a root-cause compilation fix in `ModuleCompilationBuilder`. Every call-graph tool benefits: `find_references`, `dependants`, `blast_radius`, `file_impact`, `dead_code`. ### Dead-code accuracy - Self-analysis: 150 to 10 findings (93% reduction) - Real 75-module Unity workspace: **96% true-positive rate** (25/26 verified across random sample, tricky-name checks, and earlier spot-checks) - 380 likely-real dead methods identHigh4/13/2026
v0.6.3## Highlights Phase 8 invariant introspection plus a complete release-hygiene pass covering the 12-commit span from v0.6.1. New MCP tool for querying CLAUDE.md architectural invariants, tokenized ranked-OR semantic search, a compile_check snippet-wrapping fix, a resolver wrong-namespace fallback, the MCP wire/internal DTO split that unblocks Claude Code reconnect, a Linux CI path-normalization fix, and a full documentation sweep. **Tools: 18 to 22 (+4). Ports: 17 to 22 (+5). Tests: 362 to 539.Medium4/11/2026
v0.5.1## Fixed **CS0518 "System.Object is not defined" on multi-module workspaces** (#1) `lifeblood_execute` failed on any code against workspaces with many modules (e.g., Unity/DAWG with 75 modules). Three-layer root cause: 1. `ScriptOptions.Default` contains 25 "Unresolved" named references — never resolve in published apps 2. Adding `compilation.References` injected the target project's BCL (Unity netstandard stubs) 3. Conflicting `System.Object` definitions from different BCL flavors → CS0518 High4/9/2026
v0.4.0## What's new ### Critical fix - **Unity csproj filesystem scan hang** — 75 Unity projects each triggered a recursive scan of the entire project tree. DAWG analysis went from **hanging indefinitely** to **~90 seconds**. Root cause: merge logic always scanned filesystem even when csproj listed files explicitly. ### Performance - **Server GC enabled** — workstation GC was thrashing at 7GB+ heaps. Server GC handles large Roslyn workloads without burning 20% CPU on full collections. - **`readOnly`Medium4/8/2026
v0.1.1Deep hardening pass. 10 bugs fixed, architecture granulated, AST security scanner, 180 tests. ## Highlights - **10 bugs fixed** — property symbol ID collision, GetDiagnostics fallback, IFileSystem port bypass, accessor dangling edges, MCP parse error, and more - **AST security scanner** — Roslyn syntax tree analysis catches reflection bypasses (`GetMethod`, `Invoke`, `SetValue`), `unsafe` blocks, pointer types. Two-layer defense on top of string blocklist - **Architecture granulated** — 4 extrMedium4/8/2026
v0.1.0## Lifeblood v0.1.0 — Compiler truth in, AI context out First public release. Dogfood-verified, dual-audited, ready for feedback. ### What ships - **Lifeblood.Domain** — Pure immutable semantic graph model. Zero dependencies. - **Lifeblood.Application** — Port interfaces and use cases. - **Lifeblood.Adapters.CSharp** — Roslyn reference adapter. Compiler-grade type, call, and implementation resolution. - **Lifeblood.Adapters.JsonGraph** — Universal JSON protocol. Import + export with full metaMedium4/7/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

justoneapi-mcpProduction-ready MCP server exposing JustOneAPI endpoints to AI agents with raw JSON responses.main@2026-06-06
git-notes-memory🧠 Store and search your notes effectively with Git-native memory storage, enhancing productivity for Claude Code users.main@2026-06-06
cc-skillsClaude Code Skills Marketplace: plugins, skills for ADR-driven development, DevOps automation, ClickHouse management, semantic versioning, and productivity workflowsv21.87.0
claude-agent-server⚡ Enable real-time communication with Claude using this WebSocket server, designed for easy deployment and integration with the Claude Agent SDK.main@2026-06-05
recall-aiBuild and manage AI-driven workspaces using Next.js, React, and TypeScript with customizable UI and MIT licensing.main@2026-06-04

More in MCP Servers

AstrBotAgentic IM Chatbot infrastructure that integrates lots of IM platforms, LLMs, plugins and AI feature, and can be your openclaw alternative. ✨
agentscopeBuild and run agents you can see, understand and trust.
claude-plugins-officialOfficial, Anthropic-managed directory of high quality Claude Code Plugins.
langchain4jLangChain4j is an open-source Java library that simplifies the integration of LLMs into Java applications through a unified API, providing access to popular LLMs and vector databases. It makes impleme