# Cursor

Cursor reads MCP servers from `~/.cursor/mcp.json` (every project) or `.cursor/mcp.json` (one project).

## Local server (recommended)

The local server reads files from disk, so the agent can share a folder in one step and the bytes never pass through the model.

```json
{
  "mcpServers": {
    "anyshare": {
      "command": "npx",
      "args": ["-y", "@anyshare/cli", "mcp"]
    }
  }
}
```

## Remote server

No Node.js needed.

```json
{
  "mcpServers": {
    "anyshare": { "url": "https://anyshare.ai/mcp" }
  }
}
```

To publish into your account, add your API key (from `npx -y @anyshare/cli login`, saved in `~/.config/anyshare/auth.json`): `"headers": { "Authorization": "Bearer as_key_…" }` next to `url`.

If the file already has other servers, add the `anyshare` entry inside the existing `mcpServers` object.

## Check it works

Open Cursor Settings, find the MCP section and check that `anyshare` is listed and enabled. Then ask the agent: "share this report with anyshare". It replies with a link like `https://sunny-otter-4821.anyshare.site` and a claim link: without an account the page expires in 1 hour unless you open it and sign in or create a free account (then it lasts 30 days).

## Tips

- Run `npx -y @anyshare/cli login` once and links from the local server go straight into your account, with no claim step.
- With the local server, "update the link" works later because the token is stored in `~/.config/anyshare/sites.json`.
- To share build output, build first: "run the build, then share dist/ with anyshare". anyshare hosts static files and never runs your build.
- `.env` files, keys and other secrets are never uploaded.
