Pick your agent below. Each tab shows how to connect with OAuth (sign in) and with an API key.
Every example uses the hosted server address:
https://fly.appfly.dev/mcpIf you use another Appfly address, copy yours from MCP setup.
Before you start
- OAuth: nothing to prepare. You sign in in your browser.
- API key: create a key on the Developer API page. Then save it in an environment variable, so it does not end up in a config file or in Git:
export APPFLY_API_KEY="af_live_..."Choose your agent
OAuth
claude mcp add --transport http appfly https://fly.appfly.dev/mcpThen sign in. Inside Claude Code run /mcp, choose appfly, and follow the browser sign-in. Or run this in your shell:
claude mcp login appflyAPI key
claude mcp add --transport http appfly https://fly.appfly.dev/mcp \
--header "Authorization: Bearer $APPFLY_API_KEY"Share it with a project (optional)
Add --scope project to save the server in .mcp.json. Use a variable so the key is not written into the file:
{
"mcpServers": {
"appfly": {
"type": "http",
"url": "https://fly.appfly.dev/mcp",
"headers": { "Authorization": "Bearer ${APPFLY_API_KEY}" }
}
}
}Check it
claude mcp listYou should see appfly as connected.
The Claude app and claude.ai use custom connectors. They connect with OAuth.
- Open Settings, then Connectors.
- Choose Add custom connector.
- Enter the name
Appflyand the server addresshttps://fly.appfly.dev/mcp. - Click Add, then Connect. Sign in to Appfly and click Allow.
Claude on the web needs an address it can reach from the internet. It cannot reach localhost.
Custom connectors are not on every Claude plan. If you do not see the option, check your plan or ask your workspace admin.
OAuth
Add the server to .cursor/mcp.json in your project, or to ~/.cursor/mcp.json for all projects:
{
"mcpServers": {
"appfly": {
"url": "https://fly.appfly.dev/mcp"
}
}
}Cursor shows a sign-in prompt for the server. Click it and allow access in your browser.
API key
Cursor can read environment variables in headers:
{
"mcpServers": {
"appfly": {
"url": "https://fly.appfly.dev/mcp",
"headers": { "Authorization": "Bearer ${env:APPFLY_API_KEY}" }
}
}
}Start Cursor from a shell where APPFLY_API_KEY is set, or the variable will be empty.
You can also add the server in Cursor under Settings, then MCP.
OAuth
codex mcp add appfly --url https://fly.appfly.dev/mcp
codex mcp login appflyThe second command opens your browser. Sign in and click Allow.
API key
Add the server to ~/.codex/config.toml, or to .codex/config.toml in a project you trust:
[mcp_servers.appfly]
url = "https://fly.appfly.dev/mcp"
bearer_token_env_var = "APPFLY_API_KEY"Codex reads the key from the APPFLY_API_KEY environment variable. The key itself is not stored in the file.
Check it
codex mcp listVS Code uses GitHub Copilot’s agent mode for MCP.
OAuth
Run this in a terminal. It adds the server to your VS Code user profile:
code --add-mcp '{"name":"appfly","type":"http","url":"https://fly.appfly.dev/mcp"}'Or open the Command Palette and run MCP: Add Server, choose HTTP, and enter the address. VS Code asks you to sign in when it first connects.
API key
Add this to .vscode/mcp.json. VS Code asks for the key the first time the server starts, and stores it safely:
{
"inputs": [
{
"type": "promptString",
"id": "appfly-key",
"description": "Appfly API key",
"password": true
}
],
"servers": {
"appfly": {
"type": "http",
"url": "https://fly.appfly.dev/mcp",
"headers": { "Authorization": "Bearer ${input:appfly-key}" }
}
}
}The top-level key is servers, not mcpServers.
OAuth
gemini mcp add --transport http appfly https://fly.appfly.dev/mcpThen start Gemini CLI and run:
/mcp auth appflyOAuth needs a browser on the same computer. It does not work over plain SSH or in a container with no browser. Use an API key there.
API key
gemini mcp add --transport http appfly https://fly.appfly.dev/mcp \
--header "Authorization: Bearer $APPFLY_API_KEY"This saves the key in your Gemini settings file. By default the server is saved for the current project. Add --scope user to save it for all projects.
Check it
gemini mcp listAny agent that supports remote MCP over Streamable HTTP can connect. You need two things:
- The server address:
https://fly.appfly.dev/mcp. - A way to sign in: OAuth, or the header
Authorization: Bearer YOUR_API_KEY.
If your agent supports OAuth, add the server with no header. The agent gets a 401 answer, finds the sign-in page, and opens your browser.
If it only supports headers, add the header with an API key.
If your agent only supports local (stdio) MCP servers, it cannot connect to Appfly directly. Use a bridge tool that turns a remote server into a local one, such as mcp-remote:
npx -y mcp-remote https://fly.appfly.dev/mcpFor the exact details of how the server checks credentials, see Authentication.
Check that it works
After you connect, ask your agent:
Check my Appfly plan and list my apps.
It should call get_account and list_apps. Then try an example workflow.
If something goes wrong
- A
401or a sign-in loop: see MCP troubleshooting. - OAuth problems: see Connect with OAuth.
- Key problems: see Connect with an API key.