Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/VuDZ/RoslynMcpServerWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/vudz/roslynmcpserver/roslyn-mcp-pitfalls)<a href="https://agentmods.dev/rules/vudz/roslynmcpserver/roslyn-mcp-pitfalls"><img src="https://agentmods.dev/badge/rules/vudz/roslynmcpserver/roslyn-mcp-pitfalls/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/vudz/roslynmcpserver/roslyn-mcp-pitfalls"><img src="https://agentmods.dev/badge/rules/vudz/roslynmcpserver/roslyn-mcp-pitfalls.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01794 | $0.01794 |
| Opus 5 | $0.00897 | $0.00897 |
| Sonnet 5 | $0.00359 | $0.00359 |
| Haiku 4.5 | $0.00179 | $0.00179 |
Grade A, and why
roslyn-mcp-pitfalls scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 51 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Known pitfalls (do not reintroduce)
-
Relative paths vs CWD — Cursor often starts MCP with CWD = user home. Relative
filePathwithout workspace resolve → wrong/missing files. Fix:ResolvePathAgainstWorkspace. -
search_codewithout directory — scanning from home hangs forever. Default to loaded workspace directory; default extension filter.cs; add scan timeout. -
get_code_skeletonvs decompile — agents passassemblyName/typeNameto file skeleton. Keep tools distinct; friendly error ifpathmissing. -
Fuzzy assembly match —
Contains(name)picks wrong DLL. Exact{name}.dll+ deps.json + NuGet/BCL fallback only. -
SDK mismatch silent —
0 Error(s)while wrong MSBuild (9.x vs 10.x pin). Detect and emitMCP_MSBUILD_SDK_MISMATCH; fix env before app code. -
NuGet audit invisible at
-v:minimal— escalate restore/normal verbosity; parse embeddederror NU####. -
VSTest “partial” on missing counters — requiring both
Passed:andFailed:is wrong. Success often omitsFailed:;.slnx/MSBuild VSTest fail output often omitsPassed:. Infer the missing side (Failed/Skipped→ 0, orPassed = Total − Failed − Skipped). Total-only without those lines stays unparsed. -
MSBuild bitness — 64-bit process + x86 SDK = BadImageFormat. Register matching MSBuild early.
-
CWD = BaseDirectory — publish folder breaks tools; use
ROSLYN_MCP_WORKSPACEinstead. -
Hardcoded paths in docs — breaks other machines; resolve via IDE workspace /
list_directory_tree. -
run_specific_testfilter — never put RoslynFullyQualifiedFormat(method()) intoFullyQualifiedName=; VSTest treats()as grouping. PreferFullyQualifiedName~withNs.Type.Method(no parens). Do not prefix a leading.when the needle is already dotted (.Ns.Classdoes not appear insideNs.Class). -
Fake/cached
run_dotnet_buildsuccess — MCP has no result cache. False greens came from (a) MSBuild incremental/up-to-date skipping recompile → default--no-incremental; (b) probelastExitCodeoverwritten by restore exit 0 after a failed build → effective exit = last build step only; (c) omitted-con multi-config solutions. Always check metadataConfiguration/NoIncremental. -
Publish locked by zombie MCP — Cursor may keep
RoslynMcpServer.exerunning after MCP disconnect; publish then fails with MSB3027 file locks.publish-and-verify.ps1auto-kills repo/publish holders (opt out:-SkipKill), then reload MCP. -
apply_patchreplaceAll hang — never rescan the insertednewString. IfnewStringcontainsoldString(Foo→Ns.Foos),while (IndexOf)grows the buffer forever, MCP never returns, logs stay empty. AdvancesearchFrompast each insert (same asstring.Replace); log start/match/write withnewContainsOldand elapsed ms. -
run_specific_test/run_dotnet_testwithout--no-build— a singledotnet teston a large.slnxdumps MSBuild warnings after (or instead of) the VSTest banner. Parser requiresPassed!/Total tests:/Test Run Successful; exit 0 with onlyTime Elapsed/N Warning(s)becomesStatus: partial+ last 2KB of build footer. Split:dotnet buildthendotnet test --no-build --no-restore; parse only the test process. Do not treat exit 0 as success and do not feed the build log toVstestOutputParser. -
VSTest duration not only
ms— slow tests print[1 s]/[1 m 28 s]. A Passed/Failed regex that requiresmsonly reports no matching tests despiteTotal tests: 1/Passed: 1. Acceptms|s|m|h(compound durations). Do not treat any[...]as duration. -
TargetFrameworks/ missingCompile—Directory.Build.propswithTargetFrameworks(even one TFM, ornetstandard2.0;net10.0) makes design-time evaluation a CrossTargeting outer build:Buildexists,Compiledoes not.load_workspacemust passtargetFramework(inner TFM, e.g.net10.0). Do not treat this as SDK mismatch;dotnet buildcan still succeed. Dedicated failure lists TFMs from nearest props.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday Changed · +4 lines · +260 tokens per session e2f9e53480e8
- 2d ago First seen · 47 lines · 1,534 tokens per session scan A 64101485ae6d
roslyn-mcp-pitfalls is a cursor rule published in the GitHub repository VuDZ/RoslynMcpServer (7 stars, last pushed yesterday), licensed MIT. It adds 1,794 tokens to every session, about $0.0090 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-14.
Other cursor rules, from other repositories
playwright-defect-tracking-cursorrules-prompt-file
Cursor rules for Playwright development with defect tracking.
pytest-integration-tests
Below is an example test. Notice the following.
pytest-tests
Below is an example test, you'll notice the following.
fusebase-flow-validation
Fusebase Flow validation/verification phase rules. Use when running gate checks, reviewing diffs, or verifying smoke prompts.
codesynapse-cli
Use this rule to answer codebase architecture questions, trace dependencies, find callers/callees, calculate blast radius, and explore the code graph. Triggers on: "how does X work", "what handles Y", "where is Z defined", "explain the mechanism", "who calls", "blast radius", "shortest path", "trace request flow"…
chaos
Failure injection mode — stress test implementations by simulating failures and hostile conditions.