Back to Home
InfinityFlowApp icon

csharp-mcp

by InfinityFlowApp

Overview

This server provides a Model Context Protocol (MCP) interface for AI assistants to dynamically evaluate and execute C# scripts using Roslyn, either directly or from .csx files.

Installation

Run Command
docker run -it ghcr.io/infinityflowapp/csharp-mcp:latest

Environment Variables

  • CSX_ALLOWED_PATH

Security Notes

The server's core function is to execute arbitrary C# code (`eval` pattern). Scripts run in the same process context as the MCP server, posing a significant risk if untrusted code is executed. While file access can be restricted via `CSX_ALLOWED_PATH` (which is disabled in Docker, relying on Docker's volume mounts), and a timeout exists, there is no mention of robust sandboxing (e.g., AppDomains with limited permissions, separate isolated processes) for untrusted code. Pre-imported namespaces like `System.Net.Http` allow scripts to make network calls. This tool requires extreme caution and should only be used with fully trusted C# scripts or in highly isolated, sandboxed environments.

Similar Servers

Stats

Interest Score30
Security Score3
Cost ClassLow
Avg Tokens150
Stars1
Forks0
Last Update2026-01-19

Tags

C#ScriptingRoslynCode ExecutionAI Tooling