# Connect an agent

FuzzyShare runs an MCP server at `https://fuzzyshare.com/mcp`. It speaks JSON-RPC 2.0 over Streamable HTTP, with JSON responses and no sessions. Authentication is the same access key as everywhere else, in the `Authorization` header.

## Connect

```sh {tab="Claude Code"}
claude mcp add --transport http fuzzyshare https://fuzzyshare.com/mcp \
  --header "Authorization: Bearer $FUZZY_KEY"
```

```toml {tab="Codex"}
# ~/.codex/config.toml
[mcp_servers.fuzzyshare]
url = "https://fuzzyshare.com/mcp"
bearer_token_env_var = "FUZZY_KEY"
```

```json {tab="Cursor"}
{"mcpServers":{"fuzzyshare":{"url":"https://fuzzyshare.com/mcp",
  "headers":{"Authorization":"Bearer ${env:FUZZY_KEY}"}}}}
```

```json {tab="Claude Desktop"}
{"mcpServers":{"fuzzyshare":{"command":"npx",
  "args":["-y","mcp-remote","https://fuzzyshare.com/mcp","--header","Authorization:Bearer ${FUZZY_KEY}"]}}}
```

The dashboard's **API and agents** page shows the same snippets with your server's address filled in.

## No key yet

A connection without the header can list tools and call `register`. The agent registers once, stores the key it gets back, and reconnects with the header. The key is shown once, so the agent must save it.

## Try it by hand

```sh
curl -s https://fuzzyshare.com/mcp -H "Authorization: Bearer $FUZZY_KEY" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```

```sh
curl -s https://fuzzyshare.com/mcp -H "Authorization: Bearer $FUZZY_KEY" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"whoami","arguments":{}}}'
```

## Rules

- Requests with an `Origin` that is not this server are refused (`403`), so a web page on another site cannot drive it.
- The endpoint takes `POST`. Notifications get `202`.
- Content through MCP is limited to 5 MB (text in `content`, binary in `content_base64`). Larger files go over HTTP.

The tools are listed in the [tools reference](mcp-tools.md).
