# Signing in

The server needs to know whose account a search is charged to. There are two ways to tell it, and both end in the same kind of token.

The server needs a [paid plan](https://publicwww.com/prices.html). Before you sign in, the tool list and `read_docs` work, and the first call that needs an account asks you to sign in; a free account also gets `account`, and every other tool answers `plan_required` - see [Limits and errors](https://publicwww.com/docs/mcp/limits/).

## Your client

Page ids for `read_docs`: `mcp/claude`, `mcp/chatgpt`, `mcp/editors` (code editors and command-line agents), `mcp/automation`, `mcp/developers`.

| Client | How it signs in |
| --- | --- |
| [Claude, web and desktop](https://publicwww.com/docs/mcp/claude/) | OAuth |
| [Claude Code](https://publicwww.com/docs/mcp/claude/) | OAuth or token |
| [ChatGPT](https://publicwww.com/docs/mcp/chatgpt/) | OAuth |
| [Codex CLI](https://publicwww.com/docs/mcp/editors/#codex) | OAuth or token |
| [Goose](https://publicwww.com/docs/mcp/editors/#goose) | Token or OAuth |
| [VS Code](https://publicwww.com/docs/mcp/editors/#vscode) | Token |
| [Cursor](https://publicwww.com/docs/mcp/editors/#cursor) | Token |
| [Devin Desktop](https://publicwww.com/docs/mcp/editors/#devin) | Token |
| [Gemini CLI](https://publicwww.com/docs/mcp/editors/#gemini) | Token |
| [opencode](https://publicwww.com/docs/mcp/editors/#opencode) | Token |
| [MiMo Code](https://publicwww.com/docs/mcp/editors/#mimo) | Token |
| [DeepSeek Harness](https://publicwww.com/docs/mcp/editors/#deepseek) | Token |
| [Qwen Code](https://publicwww.com/docs/mcp/editors/#qwen) | Token |
| [n8n, Make, Zapier](https://publicwww.com/docs/mcp/automation/) | Token |
| [Your own code](https://publicwww.com/docs/mcp/developers/) | Token or OAuth |

## Sign in with OAuth

For Claude, ChatGPT and other assistants that offer it. Nothing to copy:

1. Add the server URL `https://api.publicwww.com/mcp` and choose OAuth if the assistant asks how to authenticate.
2. Leave OAuth client ID and client secret empty, if the form has them: PublicWWW does not register clients, it recognises each assistant by a document the assistant publishes on its own site.
3. The assistant opens PublicWWW. Sign in with the one-time code we email you, if you are not signed in already.
4. You see which application is asking, the site that vouches for it and where you will be sent back. Press **Allow**.

The connection then appears on your [profile page](https://publicwww.com/profile/api), tab API / MCP, under **Connected apps**.

## Or use a token

For code editors, command-line agents and your own scripts. Issue a token on your [profile page](https://publicwww.com/profile/api) and give the client this header:

```
Authorization: Bearer <token>
```

It is the same token the [API](https://publicwww.com/docs/api/) uses, and up to ten can exist at once, so give each client its own: if one leaks, delete it alone. Keep tokens out of files you commit - most clients can read the token from an environment variable or ask for it once; the [client pages](https://publicwww.com/docs/mcp/editors/) show how.

A client that offers OAuth may still fail to sign in here: some register themselves with every server first, or expect to return to an address of their own scheme such as `myapp://`. Neither is supported. The first shows as the error `does not support dynamic client registration`. The fix is a token in the header and, in opencode and MiMo Code, `"oauth": false`.

## Without an MCP client

The server speaks JSON-RPC over HTTP. A tool is not a method of its own: list the tools with `tools/list` and call one with `tools/call`, with no handshake first:

```
curl https://api.publicwww.com/mcp \
     -H "Authorization: Bearer $PUBLICWWW_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call",
          "params": {"name": "search",
                     "arguments": {"query": "\"angular.min.js\"", "rows": 5}}}'
```

The answer carries the result as JSON in `structuredContent` and as text in `content` (`read_docs`: Markdown text only). More in [Your own code](https://publicwww.com/docs/mcp/developers/) (`mcp/developers`).

## How long access lasts

Until you take it away: tokens and connected apps do not expire. On your [profile page](https://publicwww.com/profile/api), **Disconnect** an app under Connected apps (it has to ask again) or **Delete** a token, and access ends at once. Removing PublicWWW in the assistant does not always tell us, so disconnect it here too.

## What the assistant gets

All the [tools](https://publicwww.com/docs/mcp/tools/). Only the cluster tools change your account: they create, rename, combine and delete clusters, and extraction spends your points. Searches count against your plan's daily searches as if you ran them yourself. The assistant does not see your email or payments.

Building an application that signs people in? The OAuth flow, the client metadata document and the endpoints are in [OAuth 2.1 for applications](https://publicwww.com/docs/api/authentication/#oauth).

Source: https://publicwww.com/docs/mcp/connecting/
