API & MCP
Connect Mirror Ai to your AI tools
Create a key, paste one snippet, and ask your assistant for Mirror Ai research directly.
What this is
MCP is a standard way for an AI assistant to use an outside source of data. Connecting Mirror Ai over MCP lets the assistant you already work in pull Mirror Ai research itself, instead of you copying numbers out of the workspace and pasting them into a chat.
Once connected, your assistant can reach 48 Mirror Ai tools across five areas:
- Market data. Live prices, price history, OHLCV candles, technical indicators, momentum and volatility, DEX trading signals and cross-venue arbitrage.
- DeFi. Protocols, liquidity pools, pool performance, yield opportunities and DEX liquidity comparisons.
- Research. Case files, the evidence behind a finding, findings by token, pattern analysis and whitepaper research.
- Security. Token scans, address reputation, holder analysis, contract source, high-risk tokens, threat feed, and your own watchlist and alerts.
- Compliance. Regulatory documents, rules by jurisdiction, jurisdiction scores, regulatory timelines and per-token regulatory risk.
Before you start
You need an active Mirror Ai plan or trial, and one of the tools listed in Step 2 installed on your computer.
Step 1, create your key
A key is how your AI tool proves it is you. You make one inside Mirror Ai, in three clicks.
- Open your Mirror Ai workspace and choose API & MCP in the left rail. It is also linked from your profile page.
- Select Create key.
- Give it a name and choose when it expires, then select Create key again.
Name the key after the machine or the tool it is for, so that "Work laptop, Claude Code" tells you what stops working if you ever revoke it. Expiry defaults to 90 days, and 30 days and 365 days are the other two choices.
The key is shown once. It appears in full on that screen and nowhere else, ever again. Copy it into your password manager before you close the panel. If you lose it, you do not recover it, you rotate the key and get a new one.
A Mirror Ai key always begins gl_mcp_ followed by a long random string. Throughout this page that key is written as gl_mcp_YOUR_KEY: everywhere you see it, paste your own key in its place, including the gl_mcp_ part.
Step 2, connect your tool
Find your tool below and follow the one set of instructions for it. Every snippet has a Copy button, and the label above each snippet says where it goes.
Terminal tools
Claude Code and Codex are set up by typing one line into a terminal. A terminal is a plain window where you type commands instead of clicking. If you have never opened one:
- On a Mac, press Cmd and Space together, type
Terminal, and press Return. - On Windows, select the Start button, type
PowerShell, and select Windows PowerShell.
A window opens with a blinking cursor. Paste the line for your tool, press Return, and that is the whole setup.
Claude Code
claude mcp add --transport http --scope user mirror https://mcp.mirror.glasslane.io/mcp --header "Authorization: Bearer gl_mcp_YOUR_KEY"
--scope user is what makes the connection available in every project rather than only in the folder you happen to be in. Leave it in.
Codex
Codex reads the key from an environment variable rather than from its config file. Set the variable first, in the same terminal window:
export MIRROR_MCP_KEY="gl_mcp_YOUR_KEY"
setx MIRROR_MCP_KEY "gl_mcp_YOUR_KEY"
Then add the server:
codex mcp add mirror --url https://mcp.mirror.glasslane.io/mcp --bearer-token-env-var MIRROR_MCP_KEY
If you would rather edit the file by hand, the same thing written into ~/.codex/config.toml on macOS, or %USERPROFILE%\.codex\config.toml on Windows, is:
[mcp_servers.mirror]
url = "https://mcp.mirror.glasslane.io/mcp"
bearer_token_env_var = "MIRROR_MCP_KEY"
On macOS, export sets the variable for that terminal window only. To keep it, add the same line to the end of ~/.zshrc. On Windows, setx keeps it for good, but only in terminal windows opened after you run it, so close the window and open a new one.
Editor tools
Cursor, VS Code and Windsurf are set up by putting a small block of text into a settings file. Each one below says exactly which file and where to find it. If the file does not exist yet, create it with that name, and paste the whole block in including the outer { and }. If the file already has something in it, ask whoever set the tool up for you, because merging two of these blocks by hand is the one step on this page that is easy to get wrong.
Cursor
{
"mcpServers": {
"mirror": {
"url": "https://mcp.mirror.glasslane.io/mcp",
"headers": {
"Authorization": "Bearer gl_mcp_YOUR_KEY"
}
}
}
}
Save the file and restart Cursor. On a Mac, ~ means your home folder; press Cmd Shift G in Finder and type ~/.cursor to get there, because folders whose name starts with a dot are hidden by default.
VS Code
Open the Command Palette with Cmd Shift P on a Mac, or Ctrl Shift P on Windows, type MCP: Open User Configuration, and press Return. That opens the right file wherever it lives, so you never have to find it yourself. Paste this in:
{
"servers": {
"mirror": {
"type": "http",
"url": "https://mcp.mirror.glasslane.io/mcp",
"headers": {
"Authorization": "Bearer ${input:mirror-key}"
}
}
},
"inputs": [
{
"type": "promptString",
"id": "mirror-key",
"description": "Mirror Ai MCP key",
"password": true
}
]
}
There is no key in that block on purpose. VS Code asks you for it the first time it connects and then stores it in the system keychain, so your key never sits in a file at all. Paste the key when it asks.
Windsurf
{
"mcpServers": {
"mirror": {
"serverUrl": "https://mcp.mirror.glasslane.io/mcp",
"headers": {
"Authorization": "Bearer gl_mcp_YOUR_KEY"
}
}
}
}
Windsurf spells it serverUrl, not url. It is the only tool on this page that does. Copy the block above rather than adapting the Cursor one, because a Windsurf entry with url in it fails without saying why.
Step 3, check it worked
Restart the tool first. None of these read their settings again while they are running, so nothing you just pasted takes effect until you quit the application completely and open it again.
Then ask the tool itself whether it sees Mirror Ai:
- Claude Code. Run
claude mcp listin a terminal.mirrorshould be listed and marked as connected. - Codex. Run
codex mcp list.mirrorshould be listed. - Cursor. Settings, then MCP.
mirrorshould show a green dot and a tool count. - VS Code. Command Palette, then
MCP: List Servers. Selectmirrorto see whether it is running. - Windsurf. Open the Cascade panel and its MCP or plugins list.
mirrorshould appear with its tools.
A green light means the tool connected. It does not yet mean your key works, because the tool list is not gated on your subscription. So ask a question that has to go through Mirror Ai to be answered:
Use the mirror server to get current market data for ETH.
A good answer names the tool it used and comes back with figures, roughly like this:
I used the mirror server's get_current_market_data tool. ETH is trading at $2,847.12, down 1.8% over 24 hours, with $14.2B of 24 hour volume and a market cap of $342.7B. Data as at 2026-09-16 04:12 UTC.
If the assistant answers from memory instead, with no tool named and no timestamp, it has not used Mirror Ai. Ask again and say "use the mirror server". If it says it has no such tool, or the call is refused, go to If something goes wrong.
What you can ask for
Ask in plain language and name the server. Your assistant decides which of the 48 tools to call, and it can chain several in one answer. These are the shapes that work well:
Market and trading
- Use the mirror server to chart SOL's hourly candles for the last week and tell me where volatility spiked.
- Use the mirror server to compare momentum for BTC, ETH and SOL over 1, 4 and 24 hours, and say which is diverging.
- Use the mirror server to find arbitrage opportunities above 0.5% right now and tell me which of them clear their own gas cost.
DeFi and liquidity
- Use the mirror server to find stablecoin yield opportunities above 6% and show me the TVL behind each one.
- Use the mirror server to compare DEX liquidity for this token across protocols and tell me where a $250k order moves the price least.
Security and diligence
- Use the mirror server to scan this contract address, check its holder concentration, and summarise what a fund should worry about.
- Use the mirror server to check the reputation of this address and tell me whether it appears in the threat feed.
Research and compliance
- Use the mirror server to pull the research findings for this token and cite the evidence behind each one.
- Use the mirror server to summarise the regulatory rules that apply to a staking product in Australia and Singapore, and note where they conflict.
Two habits worth keeping. Name the server in the request, because an assistant that is not told will often answer from memory. And ask for the evidence, because every Mirror Ai research answer can name its source and an answer that will not is an answer worth checking.
Keeping your key safe
- A key is a password to your Mirror Ai account. Anyone holding it can read everything your plan covers, without your email address or your password.
- Never send it in an email, a chat message or a screenshot. Put it in a password manager, or in the tool's own secret storage, and nowhere else.
- One key per machine. They are free, and separate keys are what lets you turn off a lost laptop without touching anything else.
- Revoking a key affects only that key. Your other keys, your login, and everyone else on your team carry on working. If you think a key has leaked, revoke it immediately and make a new one.
- Leave your tool's approval prompts on. An AI assistant reads web pages, documents and files, and text inside those can carry instructions aimed at the assistant rather than at you. The prompt that asks before a tool runs is what stops that turning into an action on your account.
If something goes wrong
Find what you are seeing. Each one says what is happening and what to do.
The tool says the key is invalid, and you are sure you copied it
Why. Almost always a stray space, a line break, or half a key. Copying from a screen rather than with the Copy button often takes a trailing space, and a key that is too short was truncated when it was pasted.
Fix. Check the key in your config starts with gl_mcp_ and is one unbroken run of characters with no spaces and no line break in the middle. Quotation marks around it in JSON are correct and stay. If in doubt, rotate the key in the console and paste the fresh one with the Copy button.
You saved everything and nothing changed
Why. The tool is still running with the settings it read when it started. This is the single most common cause, and it looks exactly like a broken key.
Fix. Quit the application completely, not just the window, and open it again. On a Mac that is Cmd Q; closing the window is not enough. For Claude Code and Codex, close the terminal window and open a new one.
It says connected, but there are no tools
Why. The server accepts the connection before it checks your key, so "connected" is not the same as "authorised". A connection with no tools behind it usually means the key was not sent at all, which means the Authorization header did not survive the paste.
Fix. Check that the header line reads "Authorization": "Bearer gl_mcp_...", with the word Bearer, one space, then the key. Missing Bearer, or a missing space after it, produces exactly this.
It worked yesterday and stopped today
Why. The key expired, or it was revoked, or the subscription behind it lapsed. Keys are not revoked when a plan lapses, but every call made with one is refused until the plan is active again.
Fix. Open API & MCP in your workspace and look at the key's status column. Expired or Revoked means make a new key. Active means check your plan on the subscription page; a resumed plan starts working again within about five minutes.
The address is refused, or nothing responds at all
Why. The address is wrong. The most common version of this is dropping the /mcp at the end, which leaves you pointing at the server's front door instead of at the MCP entrance.
Fix. The address is exactly https://mcp.mirror.glasslane.io/mcp. All lower case, https not http, no slash on the end, and /mcp present.
Windsurf will not connect, and the same settings work elsewhere
Why. Windsurf expects serverUrl where every other tool on this page expects url. A Windsurf entry with url in it is not an error to Windsurf, it is a server with no address, so it fails silently.
Fix. Open mcp_config.json and check the line reads "serverUrl". Copy the Windsurf block from Step 2 rather than adapting another one.
Codex cannot find the key you set
Why. An environment variable belongs to the terminal window it was set in. Codex only sees MIRROR_MCP_KEY if it was started from a window where that variable exists, so setting it in one window and launching Codex from another, or from the Dock or the Start menu, leaves Codex with nothing.
Fix. On a Mac, add the export line to the end of ~/.zshrc, then close every terminal window and open a new one. On Windows, setx already saved it, but only windows opened after that command can see it, so close the window and open a new one.
It works at home and not on the office network
Why. Corporate networks commonly block outbound connections to addresses they do not recognise, and an MCP connection is an ordinary outbound HTTPS connection to a domain your IT team has probably never seen.
Fix. Ask your IT team to allow mcp.mirror.glasslane.io on port 443. That is the whole request; no inbound access and no other host is involved.
Still stuck? Contact us with the name of your tool, what you see, and the first eight characters of the key (gl_mcp_ and one more). Never send the whole key.
Limits
- Requests a minute
- 60
- Requests a day
- 10,000
- Active keys per account
- 20
- Key lifetime
- 30, 90 or 365 days
The two request limits are stamped onto each key when you create it, so a key keeps the limits it was made with. Normal research does not come close to them: one question typically spends between one and five requests.
The cap of 20 counts keys that are still active. A revoked key does not count, so if you reach the limit, revoke one you no longer use and create the new one.
What is coming
claude.ai and ChatGPT cannot connect to Mirror Ai yet. Those two sign in to an outside service with your account rather than with a key, which is a different mechanism from everything on this page. It is built and waiting to be released, and there is no field in either product you can paste a Mirror Ai key into in the meantime, so please do not go looking for one.
Every tool listed in Step 2 works today. This section is updated the day the other two do.
Changelog
- First published. Covers Claude Code, Codex, Cursor, VS Code and Windsurf.