AIContextBuilder logo

AIContextBuilder

Roslyn-based MCP context and analysis for C#/.NET solutions, including review, simplification, usage, and code context tools.

Install AIContextBuilder

Run the project’s own setup commands, in order.

Setup steps from the project

AIContextBuilder installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    dotnet tool install -g aicb-roslyn-mcp
    
  2. 2. Configure
    aicb init
    
  3. 3. Configure
    aicb init --hooks none
    

Overview

AIContextBuilder MCP server analyzes C# and .NET solutions with MSBuild and Roslyn to provide symbol-aware code context for coding agents. It maps callers, implementations, dependency injection paths, tests, side effects, and change impact, then can package selected code and relationships as Markdown for an LLM. Reach for it when an agent needs semantic understanding of a local .NET codebase rather than substring-based searches. It runs locally and can also be used through the accompanying CLI and Windows desktop application.

Use cases

  • Explore callers and implementations before changing a C# symbol
  • Review C# code with Roslyn-aware context
  • Simplify selected .NET code with agent assistance
  • Check usage and change impact across a solution
  • Pack task-focused code context within a token budget

Key features

  • Roslyn-based semantic analysis
  • Symbol-aware C# and .NET context
  • Caller, implementation, usage, and impact analysis
  • Token-budgeted Markdown context packages
  • Optional AI semantic annotations
  • Live sessions and remembered codebase models

Tools14

What AIContextBuilder lets your agent do. Expand a tool for its parameters.

Self-reported~240 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

11/11 checks healthy over the last 45d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars11Stargazers on the source repository.
Last commit10d agoMost recent push to the default branch.
Tools exposed14Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How AIContextBuilder works

What AIContextBuilder MCP server does

AIContextBuilder MCP server gives coding agents structured information about C# and .NET codebases. It analyzes solution files and builds a semantic model that can distinguish symbols such as overloads, interfaces, overrides, partial types, and records. The resulting information can answer questions about callers, implementations, dependency-injection construction paths, tests, side effects, and the likely impact of changing a symbol.

The server can also assemble focused context for an LLM instead of returning an unfiltered source tree. Generated AI-Builder-MD includes selected code, symbol relationships, architecture information, semantic metadata, and provenance. Optional AI annotations in XML documentation can add author-defined details such as a type’s role, layer, responsibility, stability, or side effects.

How it works

AIContextBuilder MCP server loads a .sln, .slnx, or .slnf solution and uses MSBuild with Roslyn semantic models. It analyzes the solution once for a live server session, then answers later questions from its indexes. Saved source changes can usually be incorporated through an incremental refresh; a forced refresh reloads the full solution.

Context selection can use a token budget. Named symbols remain included while surrounding detail is reduced when the budget is tight, and the result identifies omitted types, tests, or related symbols. A measurement operation can report the token count of planned answers without returning their full payloads.

Each MCP process maintains its own live session. The server sees saved files, not unsaved editor buffers. Persisted remembered codebases can be recalled by another process, but recalled models have no live workspace, may lack reliable line numbers, and provide fewer insights until refreshed.

Setup and configuration

Run the local MCP server against a C# or .NET solution. The same analysis engine is available through the CLI and a Windows desktop application, although each process maintains its own live analysis. A <Solution>.aicb.json file can store solution configuration, rules, and choices; it does not contain analysis results, sessions, or credentials.

Optional persistence tools such as remember_codebase, recall_codebase, and refresh_remembered are not enabled by a default MCP profile. Enable them by setting AICB_MCP_TOOLS to the required tool names or to all.

Tools and capabilities

The listed MCP tools are:

  • aicb-csharp-context for symbol-aware C# and .NET context.
  • aicb-code-review for code review workflows.
  • aicb-code-simplifier for code-simplification workflows.
  • aicb-usage-check for checking symbol usage.

The broader documented engine also supports operations for reading a symbol with dependencies and callees, exploring callers and implementations, packing context for a natural-language task, preparing edit-oriented context with tests and related siblings, and measuring response size. Change-impact analysis can report direct and transitive effects, including production impact counts.

Limitations and notes

Static analysis does not establish every runtime relationship or guarantee that a reduced context is sufficient for a task. The server analyzes saved source only, and a second server process does not share the first process’s live graph. Remembered models can be stale; recall reports staleness information but deliberately returns the model, so live re-analysis may still be necessary.

The software is closed source and is distributed under a custom EULA. The public repository contains documentation, releases, and licensing information.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about AIContextBuilder

AIContextBuilder is an MCP server that connects coding agents to local C# and .NET solutions through MSBuild and Roslyn. Its main tools provide symbol-aware code context, code review, code simplification, and usage checking, while its analysis can map callers, implementations, tests, dependencies, and change impact.

It loads a solution with MSBuild and builds Roslyn semantic models and indexes. The server then answers questions from that analysis, distinguishing symbols and relationships such as overloads, interfaces, overrides, partial types, callers, implementations, and dependency-injection paths.

Set AICB_MCP_TOOLS to the required tool names or to all. The optional remember_codebase, recall_codebase, and refresh_remembered tools are not included in a default MCP profile, and recalled models may need a live refresh for current workspace precision.

No. A live MCP session analyzes saved files rather than unsaved editor buffers. After source files are saved, the next refresh usually updates changed portions, while force: true performs a complete reload.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAIContextBuilder AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/aicontextbuilder?style=directory)](https://allmcps.com/mcp/aicontextbuilder)
HTML Embed
<a href="https://allmcps.com/mcp/aicontextbuilder"><img src="https://allmcps.com/api/badge/aicontextbuilder?style=directory" alt="AIContextBuilder on AllMCPs" /></a>