Skip to content
Roslyn Bridge MCP

Settings

A project can keep its bridge settings in a file at the workspace root. The file is read at startup and again by lsp with action=reload. It is meant to be committed, so every client and every teammate gets the same behavior.

Put in the file what is true for the project. Put in arguments what depends on the machine. The file cannot set --workspace, --server or --dotnet-root, because a cloned repository must not choose which program runs.

File

The file is .roslyn-bridge.json. The bridge looks only in the workspace root. It accepts comments and trailing commas.

{
"exclude": ["samples", "vendor"],
"startupTimeout": 300,
"requestTimeout": 90,
"solution": "src/App.slnx",
"diagnostics": { "severity": "information" }
}
Key Value Argument Default
exclude Folder names --exclude [], only the built-in list
startupTimeout Seconds, 1 to 600 --startup-timeout 120
requestTimeout Seconds, 1 to 600 --request-timeout 60
solution Path of a .sln, .slnx or .slnf file None Not set, Roslyn finds it
projects Paths of .csproj files None Not set, Roslyn finds them
diagnostics.severity error, warning, information or hint None "warning"

Precedence

A setting comes from the first source that gives it, in this order: an argument then this file, then the default.

exclude is the exception. The folders of the file and of every --exclude argument add to the built-in list. The bridge then ignores these folders when it resolves a file name, watches files, checks edits and scans for diagnostics. Roslyn still loads the projects it finds there, unless solution or projects limit the load.

A severity in a diagnostics call always wins.

Choosing what Roslyn loads

Without solution and projects, Roslyn finds what to load itself, which loads every solution and project at the workspace root.

solution loads only that solution. projects loads only those projects. A file that sets both is invalid. Paths are relative to the workspace root and must stay inside it.

Invalid settings

An invalid file stops the bridge at startup. It exits with code 1 and prints each fault on the standard error, so the MCP client shows why the server did not start.

Faults are an unreadable or malformed file, an unknown key, a value of the wrong type or out of range, a path that does not exist or leaves the workspace, and solution set together with projects. An unknown key or a malformed file is reported alone, before the other checks.

.roslyn-bridge.json is invalid:
- startupTimeout must be from 1 to 600 seconds
- solution 'src/Missing.slnx' does not exist

lsp with action=reload reads the file again. When the file has become invalid, the call returns the error invalid_settings with the faults, and the bridge keeps the settings it already had.