Connect Claude Code or Codex in one command | FetchLayer

Connect your AI agent

npx fetchlayer

That is the whole setup. It finds the agents on your machine, signs you in once in the browser, and connects the ones you pick. Nothing to paste into your agent afterwards.

connects Claude Code·Codex·Cursor·VS Code·Antigravity·OpenCode·Hermes

~ › npx fetchlayer

Read before you paste.

What the command does on your machine, in full.

Package
fetchlayer on npm. One file, no dependencies, MIT licence. Node 18 or newer on macOS, Linux or Windows. Read it on npm before you run it.
Writes
A fetchlayer server entry for each agent you tick, placed through that agent's own config. Agents you leave unticked are not touched.
  • Claude Code claude mcp add
  • Codex codex mcp add
  • Cursor ~/.cursor/mcp.json
  • VS Code code --add-mcp
  • Antigravity ~/.gemini/config/mcp_config.json
  • OpenCode ~/.config/opencode/opencode.json
  • Hermes ~/.hermes/config.yaml
Account
Signing in creates one if you have none. 30 free requests, no card.
Approval
Opening the link does nothing by itself. The page shows the code from your terminal, how long ago it was requested and from where. Nothing is created until you click Approve.
Key
Created when you approve, named after the agents it connects, and listed under API keys in your dashboard. Revoke it there any time.

Would rather not run a package?

Each agent has its own way to add a server. These sign you in through the agent instead.

Claude Code

$ claude mcp add --transport http fetchlayer https://mcp.fetchlayer.dev

Then type /mcp in Claude Code and choose fetchlayer to sign in.

Codex

$ codex mcp add fetchlayer --url https://mcp.fetchlayer.dev && codex mcp login fetchlayer

The second half opens the sign-in page in your browser.

ChatGPT, Perplexity, the Claude app

These keep their connections in your account, not on your machine, so there is no command. Add this address as a custom connector (a remote MCP server) in the app's settings, and sign in when it sends you here.

https://mcp.fetchlayer.dev

Anything else that takes a remote MCP server works the same way. Prefer a key? Set it up from your account.