MCP for Code Review — Connecting Model Context Protocol Servers
Macroscope
Macroscope
Product

MCP for Code Review: Connecting Model Context Protocol Servers

How Model Context Protocol (MCP) extends an AI code review agent with your own tools — workspace connectors, per-user access controls, and personal OAuth 2.1 connections to Sentry, Linear, Datadog, and internal APIs.

Model Context Protocol (MCP) code review is the practice of connecting external MCP servers to an AI code review agent so it can consult your production systems — error trackers, observability platforms, issue trackers, internal APIs — while it answers questions about your codebase.

Most AI code review tools read two things: the diff and the repository. That is enough to catch a null dereference. It is not enough to answer "is this the code path that has been paging us all week?" That question needs Sentry. "Does this PR close the ticket it claims to?" needs Linear or Jira. MCP is the standard that lets a review agent reach those systems without a bespoke integration for each one.

TL;DR — MCP for Code Review

  • MCP is an open standard for exposing tools to AI agents, so one protocol replaces N custom integrations.
  • Macroscope supports two kinds of MCP connection: workspace connectors set up by admins, and personal connections you set up for yourself.
  • Workspace connectors are configured from Settings → Connections → MCP Servers and are available to all members, or to an allow list.
  • Access controls let admins restrict a connector to specific users, with a badge in the connection list showing which connectors are limited.
  • Personal connections need no admin and no client credentials: any public HTTPS server implementing OAuth 2.1 with RFC 7591 dynamic client registration works, and Macroscope registers itself automatically.
  • The agent uses these tools when answering in Slack, so the context arrives where the conversation already is.

What Is MCP?

Model Context Protocol (MCP) is an open standard for exposing tools and data to AI agents over a uniform interface. Instead of every AI product building a one-off Datadog integration, a one-off PagerDuty integration, and a one-off connector for your internal service, an MCP server describes the tools it offers and any MCP-compatible client can call them.

For code review, that inversion matters. The valuable context for reviewing a change usually lives outside the repository:

  • Error trackers know which lines actually break in production.
  • Observability platforms know which endpoints are hot and which are cold.
  • Issue trackers know what the change was supposed to do.
  • Internal APIs know your service topology, ownership, and deploy state.

An agent that can query those systems reviews the change in the world it will run in, instead of in isolation.

What Is MCP Code Review?

MCP code review is AI code review in which the reviewing agent can call external MCP tools during its analysis or when answering follow-up questions. The review still starts from the diff and repository context. MCP widens what the agent can consult before it commits to an answer.

The practical difference shows up in follow-up questions. A reviewer that only read the diff can tell you what the code does. A reviewer with an MCP connection to your error tracker can tell you whether the function you just changed is the one throwing in production, and how often.

Two Kinds of MCP Connection

Macroscope distinguishes connections an admin manages for everyone from connections you manage for yourself. The distinction covers identity, blast radius, and tool controls.

Workspace connectorPersonal connection
Set up byAdminsYou
Available toAll workspace members, or an allow listOnly you
Runs asShared workspace identityYour own identity
Tool controlsSelect and disable individual toolsFull tool set exposed — no selection

The "runs as" row is the one worth reading twice. A workspace connector acts under a shared identity, so every member who invokes it sees the same scope. A personal connection acts as you, so it returns what your own permissions allow — which is usually what you want for tools like Linear or Sentry, where the useful answer depends on who is asking.

Setting Up a Workspace MCP Connector

Workspace connectors are admin-only and configured from Settings → Connections → MCP Servers:

  1. Go to Settings → Connections and scroll to the MCP Connectors section.
  2. Enter the server URL and click Discover. Macroscope auto-detects the server's authentication method.
  3. Configure authentication. Depending on the server this may be OAuth credentials (client ID and secret), custom headers, or nothing at all.
  4. Select tools — if using header or no-auth. For servers that do not use OAuth, Macroscope shows the tools the server exposes before you click Connect, and you can toggle off any the agent should not use. Click Connect once the tool selection looks right.
  5. For OAuth connections: review tools immediately after connecting. OAuth-backed servers complete the connection as part of the consent flow, so the server is active before you can see its tool list. Open the connection in edit mode right after setup, review the tools the server exposes, and toggle off any write or administrative tools the agent should not reach. Do not assume safe defaults — an MCP server often exposes write operations alongside reads.

Tool selection is a real control, not a formality. An MCP server often exposes far more than you want an agent reaching for — write operations alongside reads, administrative endpoints alongside queries.

Access Controls: Restricting a Connector to Specific Users

By default every workspace member can use a workspace connector's tools. To narrow that:

  1. Open the MCP connection in edit mode.
  2. Switch to the Access tab.
  3. Add users to the allow list.

Only users on the allow list can invoke that connector's tools. Connections with restricted access display a badge and tooltip in the connection list, so an admin can see at a glance which connectors are limited without opening each one.

This matters for any connector whose tools are sensitive by nature. A billing API or an internal admin service can be connected once and exposed to three people, rather than being left unconnected because it is too broad for the whole workspace.

Personal MCP Connections

Personal connections are MCP servers you connect for yourself, from Settings → Personal, with no admin involvement. Use them to give the agent your own tools — Stripe, Notion, Linear, Sentry, or your own internal APIs — when it answers your questions.

The setup is deliberately credential-free. Personal connections support public HTTPS servers that implement OAuth 2.1 with RFC 7591 dynamic client registration — Macroscope uses dynamic client registration to discover the server's authorization endpoints and register itself automatically, with no client credentials to enter. Servers that do not implement RFC 7591 DCR are rejected during setup.

  1. Paste the server URL.
  2. Complete the OAuth consent flow.
  3. The connection is ready.

Reconnect or disconnect at any time from the same page.

The absence of a client ID and secret is the point. Requiring an OAuth app registration is what stops most individual engineers from connecting the tools they personally use, because registering an app is an admin task at most companies. Automatic client registration removes that step.

One limitation to know: personal connections expose the server's full tool set. Unlike workspace connectors, there is no tool selection screen — you cannot toggle off write or administrative tools before the agent can reach them. If a server exposes sensitive write tools and you cannot restrict them at the server level, use a workspace connector instead.

Why MCP Beats Bespoke Integrations

Three reasons, in the order they tend to bite:

Coverage. No vendor will build an integration for your internal deploy service. An MCP server in front of it is something your team can write in an afternoon, and every MCP-compatible client gets it for free.

Consistency. Bespoke integrations each have their own auth model, their own failure modes, and their own configuration surface. MCP servers share a discovery and authentication story, which is why the setup flow above can be four steps regardless of which server you are connecting.

Portability. An MCP server you write is not tied to one AI vendor. That is a real hedge in a category moving as fast as AI code review.

What MCP Does Not Solve

MCP is a transport and tool-description standard. It does not make the underlying analysis good.

If an AI reviewer cannot follow a call across files, connecting it to Sentry will not fix that — you will get a reviewer that misses cross-file bugs and can also query your error tracker. The base capability still has to be there. In a 118-bug benchmark across 8 languages, Macroscope detected 48% of real production bugs, and that number comes from analysis quality, not from integrations.

Treat MCP as an amplifier of a reviewer that already works, not a substitute for one.

MCP and Custom Review Agents

MCP connections are most useful alongside custom review logic. Check Run Agents let you define your own reviewers in markdown, scoped to specific paths. An agent that enforces a migration convention becomes considerably more useful when it can check the current schema state through an MCP connection instead of inferring it from the diff. For interactive Slack questions, an allow-listed connector can provide this context to permitted users; automated Check Run Agent reviews have no requesting user identity, so they require an unrestricted connector — allow-listed connectors are excluded entirely from automated reviews.

The same pairing applies to the Macroscope agent answering questions in Slack: the agent's usefulness in a thread is bounded by what it can look up, and MCP is how you widen that bound.

Security Considerations for MCP in Code Review

A few things worth deciding before you connect anything:

  • Prefer read-only tools (workspace connectors only). Workspace connectors let you disable individual tools — for non-OAuth servers during setup, and for OAuth-backed servers in edit mode right after the consent flow. Personal connections expose the server's full tool set with no selection controls; if a server you want to connect personally exposes sensitive write tools, use a workspace connector instead.
  • For OAuth connections, review tools before the connector is used. OAuth servers go live as part of the consent flow — the agent can call all exposed tools the moment the connection is established. Edit the connection right after setup to limit tool scope.
  • Use the allow list for anything sensitive. A connector restricted to three people is safer than a connector nobody dares enable.
  • Prefer personal connections for per-user scope. If the right answer depends on who is asking, a shared workspace identity is the wrong mechanism.
  • Review what the server actually returns. An MCP tool that returns whole customer records into a review thread is a data-exposure decision, not just an integration decision.

Frequently Asked Questions

What is MCP in code review?

MCP (Model Context Protocol) is an open standard for exposing tools to AI agents. In code review it lets the reviewing agent call external systems — error trackers, observability tools, issue trackers, internal APIs — so it can consider production context alongside the diff.

Does Macroscope support MCP servers?

Yes. Macroscope supports both workspace-scoped MCP connectors, configured by admins from Settings → Connections → MCP Servers, and personal MCP connections that individual users set up themselves from Settings → Personal.

Do I need to be an admin to connect an MCP server?

Not for personal connections. Personal MCP connections are set up from Settings → Personal with no admin required. Workspace-wide MCP connectors are admin-only.

Do I need OAuth client credentials for a personal MCP connection?

No. Personal connections support public HTTPS servers implementing OAuth 2.1 with RFC 7591 dynamic client registration; Macroscope uses DCR to register itself automatically. You paste the server URL and complete the consent flow. Servers without RFC 7591 DCR support are rejected during setup and cannot be used as personal connections.

Can I restrict which users can use an MCP connector?

Yes. Open the connection in edit mode, switch to the Access tab, and add users to the allow list. Only those users can invoke the connector's tools, and restricted connections are badged in the connection list.

Can I control which tools an MCP server exposes to the agent?

For workspace connectors, yes — but the timing depends on the authentication method. For servers using header or no authentication, Macroscope shows the tool list before you click Connect and you can toggle off tools at that point. For OAuth-backed servers, the connection goes live during the consent flow, so you must open the connection in edit mode immediately after setup to review and disable tools. Personal connections expose the server's full tool set with no selection controls available.

What MCP servers work well for code review?

Error trackers (Sentry), observability platforms (Datadog), incident tools (PagerDuty), issue trackers (Linear, Jira), and your own internal APIs. The common thread is that each answers a question the repository cannot.

Does MCP replace the need for good code analysis?

No. MCP widens what a reviewer can consult; it does not improve its reasoning about code. A reviewer that cannot trace a call across files will still miss cross-file bugs with every MCP server in the world connected.