Home Pricing

Documentation

DotNetCodeReviewer performs deep static code review of C#/.NET source using the Roslyn compiler platform. Use it two ways: a hosted REST API, or a local MCP server that plugs into your AI coding tools.

The analysis is identical across both: it checks for security issues, performance problems, async-correctness mistakes, maintainability smells, and architectural violations. All results are advisory you stay in control of your code.

Quickstart

Send a C# source payload to the review endpoint with your API key in the X-Api-Key header. A key is required for every request, including on the Free plan see Authentication for how to get one.

curl -X POST https://dotnetcodereviewer-api.azurewebsites.net/api/v1/review/file \
  -H "X-Api-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "public class C { public void M() { try { Work(); } catch (Exception ex) { } } }",
    "fileName": "C.cs"
  }'

You get back a structured list of issues with a rule id, severity, location, and a suggested fix. See Response format.

Authentication

Every request to /api/v1/* requires an API key including requests on the Free plan. "Free" refers to the price of the plan, not to skipping authentication: a Free key is still required, you just don't pay for it. Your key is tied to your plan (Free, Pro, or Team), which determines the available capabilities and your daily quota.

Send your key in the X-Api-Key request header:

X-Api-Key: your-api-key
Keep your API key secret, like a password. Anyone who has it can use your subscription. If you believe a key is compromised, contact support to rotate it.

A missing or invalid key returns 401 Unauthorized. A key whose plan does not include the requested capability returns 403 Forbidden. See Errors.

Review a file Free plan

POST /api/v1/review/file

Reviews a single C# source payload and returns all findings. Available on every plan, including Free. (An API key is still required see Authentication.)

Request body

FieldTypeRequiredNotes
contentstringYesThe C# source to review. 1–500,000 characters.
fileNamestringNoA label for the file (e.g. Calculator.cs). Used in the response only; never read from disk. Defaults to input.cs.
{
  "content": "public class C { /* your C# source */ }",
  "fileName": "C.cs"
}
The hosted API is content-only: you send source text, never a server path. Whole-directory analysis (review_project and the focused scans) is available through the local MCP server.

Suggest tests Pro / Team

POST /api/v1/analysis/tests

Suggests concrete unit-test scenarios for the public methods in a source payload (happy path, null/empty arguments, boundaries, exception paths, branch coverage). Requires a Pro or Team plan.

Request body

Same shape as Review a file: content (required) and fileName (optional).

Response format

A successful review returns 200 OK with a summary and an issues array. Each issue identifies the rule, severity, category, location, and a suggested fix.

{
  "filePath": "C.cs",
  "totalIssues": 1,
  "criticalCount": 0,
  "warningCount": 1,
  "suggestionCount": 0,
  "infoCount": 0,
  "issues": [
    {
      "ruleId": "DNCR0001",
      "severity": "Warning",
      "category": "ErrorHandling",
      "line": 1,
      "column": 52,
      "title": "Empty catch block swallows exceptions",
      "description": "An exception is caught but neither handled, logged, nor rethrown.",
      "suggestion": "Log the exception, handle it meaningfully, or rethrow with `throw;`."
    }
  ]
}
A 200 with an empty issues array means the analysis ran and found nothing matching its rules. It does not assert that the code compiles the reviewer analyzes code, it is not a compiler.

Severities

SeverityMeaning
CriticalFix immediately likely a real bug or security hole.
WarningShould be fixed a meaningful problem.
SuggestionAn improvement worth considering.
InfoA minor note.

Findings are grouped into categories: Security, Performance, AsyncAwait, ErrorHandling, Reliability, Maintainability, Architecture, Naming, Style, and Testing.

Errors

Errors are returned with a standard HTTP status code and a JSON body of the form { "error": "..." }.

StatusMeaningWhat to do
400Bad request malformed JSON or content outside the 1–500,000 character range.Check the request body.
401Missing or invalid API key.Send a valid key in X-Api-Key.
403Your plan does not include this capability.Upgrade to Pro or Team.
429Daily quota or burst rate limit exceeded.Wait for the reset, or upgrade. See below.

Rate limits & quotas

Two limits apply. A per-minute burst limit protects the service from spikes, and a daily quota reflects your plan. Every response carries rate-limit headers:

HeaderMeaning
X-RateLimit-LimitYour daily request allowance.
X-RateLimit-RemainingRequests remaining today.
X-RateLimit-ResetWhen the daily count resets (Unix time, next UTC midnight).

When the daily quota is exhausted, requests return 429 Too Many Requests with a Retry-After header until the reset.

PlanDaily quota
Free100 reviews / day
Pro5,000 reviews / day
Team50,000 reviews / day

MCP server: install the tool

The MCP server runs locally on your machine and exposes the full analysis (including whole-directory tools) to AI coding assistants. It installs as a .NET global tool and requires the .NET 10 SDK or runtime.

dotnet tool install -g DotNetCodeReviewer.McpServer

This installs a command named dncr-mcp. Update later with:

dotnet tool update -g DotNetCodeReviewer.McpServer
Running dncr-mcp directly in a terminal will appear to "hang" that is correct. It is a stdio (JSON-RPC) server waiting for a client to connect. Press Ctrl+C to stop. All analysis runs locally; your source is not sent anywhere.

MCP server: configure your client

Point your MCP client at the dncr-mcp command over stdio.

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "dotnet-code-reviewer": { "command": "dncr-mcp" }
  }
}

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "dotnet-code-reviewer": { "command": "dncr-mcp" }
  }
}

Restart your client. The assistant can now call the review tools.

MCP server: available tools

ToolWhat it does
review_fileReview a single C# file.
review_projectReview every C# file under a directory.
check_clean_architectureValidate Clean Architecture layer boundaries.
audit_nugetCheck NuGet package-reference hygiene.
scan_securitySecurity-focused scan (SQL injection, secrets, weak crypto).
audit_ef_coreEntity Framework / data-access scan.
check_async_patternsAsync-correctness scan.
suggest_testsSuggest unit-test scenarios for a file.
The directory-level tools (review_project, check_clean_architecture, audit_nuget, and the focused scans) are available through the local MCP server, where the directory is your own machine. The hosted REST API is content-only for security.

Plans

PlanPriceIncludes
Free$0Single-file review, NuGet audit, 100 reviews/day.
Pro$12/moAll tools, unlimited files, 5,000 reviews/day, priority support.
Team$39/moEverything in Pro, 5 seats, team analytics, 50,000 reviews/day.

View pricing and subscribe →

Support

Questions, bug reports, or billing help: email dotnetcodereviewer.support@gmail.com. We aim to respond within two business days.