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?
- What you get out of the box
- Where servers live
- Connecting a server
- After you connect
- Using the tools
- Your tokens
- Troubleshooting
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: read-only access to repositories, issues and pull requests.
-
GitLab: read-only access to repositories, issues and merge requests.
-
Atlassian: read-only access to Jira, Confluence and Compass.
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:
- MacOS:
~/Library/Application Support/opair/mcp/ - Linux:
$XDG_CONFIG_HOME/opair/mcp/
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.
- Create a token at github.com/settings/tokens.
- Put the token in an environment variable,
e.g.
GITHUB_PERSONAL_ACCESS_TOKEN. - Edit
github.jsonin your MCP directory. Delete theauth,authFlow,clientIdandscopeslines. 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 Group → Settings → General → MCP 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
-
A server's tools are missing. Did you sign in? Run
/mcp auth {server}. Did you sign in just now? Restart Opair — new tools need a fresh session. -
Sign-in worked before but stopped. Your tokens may have expired beyond repair or been revoked. Sign in again:
/mcp auth {server}. -
Opair says a server isn't configured. Check the server's JSON file exists in your MCP directory and that its
namematches what you typed. -
Opair asks for more permissions than before. A server may offer new kinds of tools that need fresh permission from you. Sign in again:
/mcp auth {server}. -
Something else is wrong. Try the mcpprobe tool. It connects to a server and reports what it finds.