MCP ExplorerExplorer

Csharpmcp

@li-zhixinon 9 months ago
1 MIT
FreeCommunity
AI Systems
#code-interpreter#csharp#mcp
A Roslyn-based mcp server for dynamically executing C# code snippets

Overview

What is Csharpmcp

CSharpMCP is a Roslyn-based MCP server designed for dynamically executing C# code snippets on a local machine.

Use cases

Use cases include executing code snippets for testing purposes, dynamically running scripts in applications, and providing an interactive coding environment for learning C#.

How to use

To use CSharpMCP, compile your existing C# project and provide the path of the compiled DLL as a startup parameter. You can then execute C# code snippets using the available tools.

Key features

Key features include RunAsync for executing C# code while preserving state, CleanExecuteContext for clearing the execution context, and GetHistoryCode for retrieving previously executed code.

Where to use

CSharpMCP can be used in software development environments where dynamic code execution is needed, such as testing, scripting, and educational purposes.

Content

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)

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers