@rectify-so/mcp
v1.1.3
Published
Rectify MCP Server for IDE integration
Readme
Rectify MCP Server
An MCP (Model Context Protocol) server for AI coding assistants. It provides two capabilities:
- Repository intelligence (local, no token) — index your repository on your own machine so an assistant can understand its architecture, trace dependencies, find related files, and analyze the impact of a change.
- Rectify cloud tools (token required) — read your Rectify project data (feedback, code scans, uptime monitoring) from the assistant.
You can use either capability on its own or both together. Repository intelligence runs entirely on your machine and needs no token; the cloud tools need a Rectify MCP token.
Install
npm i -g @rectify-so/mcpOr run on demand with npx -y @rectify-so/mcp.
Requires Node.js 18 or higher.
Quick start
Repository intelligence only (no token, points at a repository):
{
"rectify": {
"command": "npx",
"args": ["-y", "@rectify-so/mcp", "--repo", "/absolute/path/to/your/repo"]
}
}Cloud tools only (token, get it from https://app.rectify.so):
{
"rectify": {
"command": "npx",
"args": ["-y", "@rectify-so/mcp", "--token", "mcp_xxx:userId"]
}
}Both (repository intelligence + cloud tools):
{
"rectify": {
"command": "npx",
"args": [
"-y",
"@rectify-so/mcp",
"--repo",
"/absolute/path/to/your/repo",
"--token",
"mcp_xxx:userId"
]
}
}--repo defaults to the current working directory, so when the assistant launches the
server from inside your project you can omit it.
IDE configuration
Most assistants use one of two shapes. Copy the rectify block into your assistant's MCP
config and add the flags you need (--repo, --token, or both).
Claude Desktop — %APPDATA%/Claude/claude_desktop_config.json (Windows) or
~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"rectify": {
"command": "npx",
"args": ["-y", "@rectify-so/mcp", "--repo", "/absolute/path/to/your/repo"]
}
}
}Cursor — ~/.cursor/mcp.json (or project .cursor/mcp.json):
{
"mcpServers": {
"rectify": {
"command": "npx",
"args": ["-y", "@rectify-so/mcp", "--repo", "/absolute/path/to/your/repo"]
}
}
}The same command/args work for any stdio MCP client (Windsurf, VS Code, Claude Code,
Codex, Gemini CLI, etc.); only the location of the config file differs.
Repository Intelligence
Indexes the repository locally into a graph of files and symbols (functions, classes,
methods, interfaces) connected by imports, calls, and contains relationships.
Supports TypeScript, JavaScript/JSX, TSX, and Python. The graph is stored in a local
file at <repo>/.rectify/repo-graph.json (no native dependencies, no database to set up).
Your source code never leaves your machine and nothing is sent to Rectify's servers. These tools work offline and require no token.
Add .rectify/ to your project's .gitignore.
Tools
update_memory— (Re)index the repository into local memory. Run once to build the graph, then again after editing files. Incremental: only changed files are re-parsed (a full scan of a ~600-file repo takes a few seconds; an unchanged re-run is sub-second). Optionalpathsto limit the update to specific files.repository_overview— File/symbol/relationship counts, language breakdown, the largest modules, and the most-connected files and symbols. Call this first.architectural_summary— Groups the repository into modules (by directory) with each module's key files and the import dependencies between modules.trace_dependencies— What a file or symbol depends on (dependencies), what depends on it (dependents), orboth, up to N hops.find_related_files— Files most closely related to a target via shared imports and call relationships.analyze_impact— Blast radius of changing a file or symbol: the transitive set of dependent symbols, files, modules, and tests.search_memory— Full-text search over indexed symbols and files.
Tip: tell the assistant to run
update_memoryonce at the start of a session, then userepository_overview,analyze_impact, andtrace_dependenciesas it works.
Rectify Cloud Tools
Available when a --token is provided. The token format is mcp_xxx:userId (create one
in the Rectify dashboard).
Tool
rectify-feedback-session-url-analyze— Decompress and analyze a feedback session recording to surface network errors, performance issues, console logs, and a user-action timeline. Inputs:sessionDataUrl?orfeedbackId?(the server resolves the URL when an ID is given). Session data is only available for bug-type feedback.
Resources
Resources are exposed under rectify://{orgId}/{projectId}/...:
Feedback
feedbacks— list feedback (filters:status,priority,type,page,limit)feedbacks/overview— feedback statisticsfeedbacks/{id}/analyze-session-data— analyze a bug feedback's session data
Code scans
scan/job— current scan jobscan/issues— list issues (filters:severity,type,status,page,pageSize)scan/issues/{key}— issue detailscan/issues/by-file— issues grouped by file (filePath)scan/metrics— aggregated quality metricsscan/history— scan history (limit)
Monitoring
monitoring/overview— health overviewmonitoring/monitors— list monitors (filters:status,type)monitoring/monitors/{monitorId}— monitor detailmonitoring/monitors/{monitorId}/stats— monitor stats (period=24h|7d|30d|90d)monitoring/incidents— list incidents (filters:status,severity,monitorId,limit,page)monitoring/incidents/{incidentId}— incident detailmonitoring/analytics/incidents— incident trends (days)monitoring/analytics/slowest-monitors— slowest monitors (limit)monitoring/analytics/lowest-uptime— lowest-uptime monitors (days,limit)
Options
--repo <path>— repository to index for repository intelligence. Defaults to the current working directory.--token <token>— Rectify MCP token (formatmcp_xxx:userId). Enables the cloud tools. Omit to use repository intelligence only.
Local Development
npm install
npm run buildRun the built server:
node dist/cli.js --repo /absolute/path/to/your/repo
node dist/cli.js --token mcp_xxx:userIdOr run from source with tsx:
npx tsx src/cli.ts --repo /absolute/path/to/your/repoInspect it with the MCP Inspector:
npx @modelcontextprotocol/inspector node dist/cli.js --repo /absolute/path/to/your/repoPoint a local IDE config at the compiled CLI instead of npx:
{
"rectify": {
"command": "node",
"args": ["/absolute/path/to/rectify-mcp/dist/cli.js", "--repo", "/absolute/path/to/your/repo"]
}
}Troubleshooting
Repository tools return nothing — run update_memory first to build the graph, and
make sure --repo points at the right directory (or that the server was launched from
inside the repo).
Token validation fails — verify the token format is mcp_xxx:userId, that it is
active in the Rectify dashboard, and that the API is reachable from your machine.
IDE not connecting — rebuild after code changes (npm run build), restart the IDE
after editing the config, and verify the absolute path to dist/cli.js when running
locally.
License
MIT
