How it works
An MCP host spawnsclay mcp, which runs as a long-running server over stdio and forwards the host’s tool calls to Clay. It authenticates with the same credentials as the rest of the CLI — the session from clay login, or the CLAY_API_KEY environment variable. You do not put an API key into the host config.
Workspace pinning
An MCP connection is pinned to whichever workspace the stored credential was scoped to when the server started. Re-runningclay login only updates the credential on disk — the running MCP server keeps using the workspace it loaded at startup. To switch workspaces, sign in to the new workspace and then have the host restart the server so it picks up the new credential.

