mcpField
C
CSharpMCP

CSharpMCP

Local
github.com/li-zhixinDeveloper Tools3Updated 83w ago

About CSharpMCP

CSharpMCP is a Roslyn-based MCP server for executing C# snippets. It preserves execution state between runs and can reference compiled project DLLs.

Key features

  1. 01Execute C# snippets
  2. 02Preserve state between runs
  3. 03Clear execution context
  4. 04View code execution history
  5. 05Reference compiled project DLLs

Use cases

  1. 01Run C# snippets with shared state
  2. 02Execute snippets against compiled project assemblies

MCP support

Exposes tools to MCP clients for running C# code, clearing execution state, and retrieving code history. Code runs on the local machine.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

CSharpMCP

The CSharpMCP is a mcp server designed for executing C# code base roslyn.

Warning: This will execute code on the local machine. Use with caution.

Available Tools

  • RunAsync: Execute the provided C# code, and the state (like variables) will be preserved each time.

  • CleanExecuteContext: Clean the code execution context, all states will be cleared.

  • GetHistoryCode: Get the history code.

How to reference existing projects

  1. Compile the existing project
  2. Use the path of the compiled dll as the startup parameter of CSharpMCP (references will be added automatically)

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.