Opair

The coding harness that eschews autonomy

MCP

This guide is for Opair users. If you want to write or maintain a server integration, see the MCP reference instead.

What is MCP?

MCP lets Opair talk to services outside your computer, like GitHub and Atlassian. Each service offers a set of tools that the agent can call on your behalf.

What you get out of the box

Opair ships with three servers ready to go:

GitHub's sign-in unfortunately grants write access to repositories by default, there's no read-only scope available. But Opair treats it as read-only all the same and never exposes writable tools to the agent.

Both need you to sign in once before they work. That's the next section.

Where servers live

Each server is one JSON file in your Opair config directory:

Opair reads every JSON file in that folder when it starts and whenever a file changes. You don't need to restart Opair to pick up config edits.

Connecting a server

Connecting means signing in. You can do it from inside Opair or from your terminal.

From inside Opair:

/mcp auth github

From the terminal:

opair mcp auth github

Both do the same thing. Your web browser opens and you sign in to the service. After that, you're connected.

For GitHub you'll get a short code on screen. Type it into the web page the browser opens. For Atlassian and GitLab the browser handles everything and sends you back automatically.

You only sign in once per server. Opair keeps you signed in from then on.

GitHub with a personal access token

If you'd rather not sign in through the browser, GitHub also works with a personal access token.

  1. Create a token at github.com/settings/tokens.
  2. Put the token in an environment variable, e.g. GITHUB_PERSONAL_ACCESS_TOKEN.
  3. Edit github.json in your MCP directory. Delete the auth, authFlow, clientId and scopes lines. Add a header instead:
{
  "name": "github",
  "transport": "http",
  "url": "https://api.githubcopilot.com/mcp/",
  "headers": {
    "Authorization": "Bearer $GITHUB_PERSONAL_ACCESS_TOKEN"
  }
}

Text inside headers that starts with $ is replaced with the environment variable of the same name, so the token itself never lives in the JSON file. No signing in is needed for this setup.

GitLab

GitLab's MCP endpoint is disabled unless MCP access is explicitly enabled on a GitLab group. Go to GroupSettingsGeneralMCP client access to enable it. If you don't have a group yet, you can create a private one and do it there.

After you connect

New tools only appear when Opair starts a fresh session. After authenticating, restart Opair or start a new session.

Using the tools

Tools from a server are named after it, e.g. mcp__github__create_issue.

The agent always asks before it runs an MCP tool. Nothing happens without your approval. If you approve a call, Opair can skip asking again for the rest of the session.

Your tokens

Opair saves your sign-in tokens in mcp-tokens.json, next to your MCP directory. The file is private; only your user account can read it.

When a token gets old, Opair fetches a fresh one automatically. You don't have to do anything.

To sign out of a server, delete its entry from mcp-tokens.json. Deleting the whole file signs you out of everything.

Troubleshooting