GunSpec
Connecting

Sign in, or send a key

Two ways a client authenticates with the MCP server. Signing in is the one with no key in it: the client opens your browser, you approve it once, and it holds a token. A key in a header is the one for anything that cannot run a browser, and for the clients that do not support signing in yet.

Both reach the same tools, the same plan gates and the same allowance. They differ only in how the caller proves who it is.

A client finds the flow by calling the endpoint without a credential: the 401 names a metadata document, that document names the authorization server, and the server's own metadata names where to authorize, exchange a token and register. Dynamic client registration is open, because an MCP client has no relationship with this server before the first connection.

Terminal
bash
# Discovery starts at the endpoint, which answers 401 with a challengecurl -i https://mcp.gunspec.io/mcp-oauth # The challenge names this document, which names the authorization servercurl -s https://mcp.gunspec.io/.well-known/oauth-protected-resourcecurl -s https://mcp.gunspec.io/.well-known/oauth-authorization-server

The keyed endpoints are untouched by any of this. They read X-API-Key as they always have, and their 401 does not advertise a Bearer challenge, so a client already sending a key never enters the flow.

Four steps, one of which is you.

  1. 1

    The client asks

    It registers itself, then sends you to the authorization endpoint. The MCP server checks the client and the address it wants to return to before anybody is asked anything.

  2. 2

    You approve it

    The consent screen is in your account, because that is the only place that knows who you are. It names the client, the account, and the address the approval returns to. The name is what the client called itself; the return address is the one thing on that screen we checked.

  3. 3

    A key is minted for it

    A key of its own, which you are never shown and never paste anywhere. It is what the grant carries, so from the moment a tool call leaves the server it is indistinguishable from a call made with your own key.

  4. 4

    The client calls with a token

    It exchanges its code for an access token and a refresh token, and sends the access token as a bearer credential. Your plan, your rate limit and your MCP daily cap apply exactly as they do to a key.

  • It is read-only, like every tool on this server. Nothing a connected agent does can change your account, your saved records or your billing.
  • It spends your plan's allowance and counts against the same MCP daily cap per key as anything else.
  • It does not use up one of the API keys your plan allows, and it never appears in your keys table: there is nothing to copy.
  • You can end one at any time from Connected agents in your account. The next call that agent makes is refused.
  • Reconnecting the same client reuses its existing key rather than leaving a live credential behind on every reconnect.

Every client has its own: a one line `mcp add`, a config file, an install link, or a settings pane. They are listed one page per client in your account, with the check that proves the connection worked.

Connect an agent