SolutionServer is a production-oriented local Model Context Protocol (MCP) server built with C# and .NET 10. It is designed for public distribution and gives MCP clients a safe, focused set of tools for inspecting a local solution or workspace.
The server is intended for developer workflows in Visual Studio, VS Code, and other MCP-capable clients that can launch a local stdio executable directly.
SolutionServer provides a focused, read‑only API for local workspace inspection:
GetWorkspaceSummary– Returns the absolute workspace root, the solution file (if present), and a list of all recognized project files.ListProjects– Enumerates every supported project file (*.csproj,*.fsproj,*.vbproj) under the workspace root.ListProjectFiles– Given a project file path, returns all files contained in that project’s directory tree.ReadTextFile– Reads a specific line range (max 400 lines) from a text file inside the workspace root.
All operations are confined to the directory specified by SOLUTION_SERVER_ROOT; the server never writes or executes code, ensuring a safe, sandboxed interaction.
- .NET 10 SDK or newer on the client machine
- An MCP-capable client such as Visual Studio or VS Code
- A published
SolutionServerexecutable available on disk
Publish the server before configuring your MCP client:
dotnet publish .\SolutionServer.csproj -c Release -r win-x64
The published executable is typically written to:
SolutionServer\bin\Release\net10.0\win-x64\publish\SolutionServer.exe
SolutionServer requires one environment variable:
SOLUTION_SERVER_ROOT- absolute path to the local workspace root the server is allowed to inspect
Visual Studio discovers repository-local MCP settings from <solution-directory>\.mcp.json.
This repository includes a ready-to-edit example in .mcp.json:
{
"$schema": "https://json.schemastore.org/mcp.json",
"servers": {
"SolutionServer": {
"type": "stdio",
"command": "F:/_dev_drv_root_/Repos/SolutionServer/SolutionServer/SolutionServer/bin/Release/net10.0/win-x64/publish/SolutionServer.exe",
"args": [],
"env": {
"SOLUTION_SERVER_ROOT": "F:/_dev_drv_root_/Repos/SolutionServer/SolutionServer" "SOLUTION_SERVER_ROOT": "F:/_dev_drv_root_/Repos/SolutionServer/SolutionServer"
}
}
}
}Update the executable path and SOLUTION_SERVER_ROOT to match your environment.
VS Code discovers repository-local MCP settings from .vscode/mcp.json.
This repository includes a ready-to-edit example in .vscode/mcp.json:
{
"$schema": "https://json.schemastore.org/mcp.json",
"servers": {
"SolutionServer": {
"type": "stdio",
"command": "F:/_dev_drv_root_/Repos/SolutionServer/SolutionServer/SolutionServer/bin/Release/net10.0/win-x64/publish/SolutionServer.exe",
"args": [],
"env": {
"SOLUTION_SERVER_ROOT": "F:/_dev_drv_root_/Repos/SolutionServer/SolutionServer" "SOLUTION_SERVER_ROOT": "F:/_dev_drv_root_/Repos/SolutionServer/SolutionServer"
}
}
}
}Update the executable path and SOLUTION_SERVER_ROOT before using the server.
To run the built executable directly from a local publish output:
{
"servers": {
"SolutionServer": {
"type": "stdio",
"command": "<ABSOLUTE PATH TO SolutionServer.exe>",
"args": [],
"env": {
"SOLUTION_SERVER_ROOT": "<ABSOLUTE WORKSPACE ROOT>" "SOLUTION_SERVER_ROOT": "<ABSOLUTE WORKSPACE ROOT>"
}
}
}
}Once connected, try prompts such as:
Summarize the current solution using SolutionServer.List the projects in my workspace.Show me the files in SolutionServer/SolutionServer.csproj's project directory.Read the first 120 lines of SolutionServer/Program.cs.
Before publishing to NuGet.org:
- Update the repository URLs in
SolutionServer.csprojand.mcp/server.json - Verify the package ID and version are correct
- Review the checked-in
.mcp.jsonand.vscode/mcp.jsonsamples so they point to valid executable and workspace paths - Build and test locally
- Review
RELEASE_NOTES.md - Pack the server
- Publish the
.nupkgto NuGet.org
Pack the server:
dotnet pack -c Release
Publish the server:
dotnet nuget push bin/Release/*.nupkg --api-key <your-api-key> --source https://api.nuget.org/v3/index.json
The package is configured to:
- pack as an MCP server NuGet package
- publish as a self-contained single-file executable
- use native AOT
- embed
.mcp/server.jsonfor MCP discovery on NuGet.org - include this README, release notes, and an MIT license file in the package
SolutionServer is intentionally limited to read-oriented local inspection. It does not write files, execute arbitrary shell commands, or access paths outside the configured workspace root.
Because the server exposes local file content to an MCP client, only configure it for directories you trust the connected AI workflow to inspect.
Before publishing for broad public consumption, replace the placeholder repository URL values in:
SolutionServer.csproj.mcp/server.json