Skip to content

About

An MCP server that lives inside Rider and exposes Resharper-powered tools for AI agents that allow working with actual codebase semantics instead of `grep` approximations.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

ReSharper MCP Server

An MCP (Model Context Protocol) server that runs inside the ReSharper/Rider backend process, exposing code intelligence features to AI assistants via HTTP.

Supports C#, F#, VB, and any language with a ReSharper PSI implementation.

Tools

Tool Description
find_usages Find all references to a symbol
get_symbol_info Detailed symbol info: kind, type, params, docs, base types, members
find_implementations Find implementations of interfaces/abstract classes and overrides
get_file_errors Get compile errors and unresolved references
search_symbol Search symbols by name (substring match) across the solution
go_to_definition Navigate to a symbol's declaration with source text
get_solution_structure List projects, target frameworks, and project references
browse_namespace Browse namespace hierarchy: child namespaces and types
list_symbols_in_file List all declarations in a file
list_solutions List all open solutions across Rider instances
fix_usings Fix missing using directives in C# files
format_file Format, clean up, or apply code style to a file
flow Describe control flow of a method or type: execution steps, branches, loops, error paths, inlined call targets

Symbol resolution

Tools that operate on a symbol accept two modes:

  • By position — filePath + line + column (1-based)
  • By name — symbolName (e.g. "MyClass", "Namespace.MyClass", "MyClass.MyMethod")

An optional kind filter ("type", "method", "property", "field", "event") helps disambiguate. When multiple symbols match, tools return an ambiguity error listing all candidates with their qualified names, kinds, and locations.

Batch mode

Most tools support batch mode — processing multiple inputs in a single call. This reduces round-trips when querying several symbols or files at once:

  • Symbol-based tools (find_usages, get_symbol_info, find_implementations, go_to_definition) accept a symbols array of {symbolName, kind, filePath, line, column} objects.
  • File-based tools (get_file_errors, list_symbols_in_file, fix_usings, format_file) accept a filePaths array of strings.
  • search_symbol accepts a queries array of strings.
  • browse_namespace accepts a namespaceNames array of strings.

Results are concatenated with === [N/total] label === separators. Shared options (e.g. maxResults, kinds, mode) apply to all items in the batch. Original single-input parameters remain for backward compatibility.

Installation

From JetBrains Marketplace

Install the plugin from Rider: Settings → Plugins → Marketplace → search for "MCP Server for Code Intelligence".

From source

./install-rider.sh
# Restart Rider

The script builds the plugin and copies it to your local Rider plugin directory.

MCP client configuration

Add to your MCP client config (e.g. Claude Code settings.json):

{
  "mcpServers": {
    "resharper": {
      "type": "http",
      "url": "http://127.0.0.1:23741/"
    }
  }
}

The server starts automatically when you open a solution in Rider.

Set RESHARPER_MCP_PORT environment variable to override the default port.

Building

# Build the .NET backend
dotnet build src/ReSharperMcp/ReSharperMcp.csproj -c Release

# Build a distributable plugin ZIP
./build-plugin.sh

Architecture

  • Runs as a ReSharper SolutionComponent (activated when a solution opens, stopped when it closes)
  • Hosts an HTTP server on 127.0.0.1:23741 implementing MCP over JSON-RPC 2.0
  • Uses ReSharper's PSI (Program Structure Interface) APIs for code analysis
  • Two-part Rider plugin: minimal JVM JAR (plugin descriptor) + .NET backend DLL
  • Targets net472 (required by the ReSharper host process)

About

An MCP server that lives inside Rider and exposes Resharper-powered tools for AI agents that allow working with actual codebase semantics instead of `grep` approximations.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages