# Connect Claude Code and other MCP clients

Let Claude Code, Cursor or any MCP client ask for approval before it acts, with one command and a sign-in, no API key.

Get started. About 3 minutes. HTML: https://promptcompute.ai/docs/connect-claude-code

## Before you start

- A promptcompute workspace
- Claude Code, Cursor or another client that supports remote MCP servers over HTTP

## Steps

1. **Add the server** In your project folder, add our official MCP server.

```bash
claude mcp add --transport http promptcompute https://mcp.promptcompute.ai/mcp
```

2. **Sign in** In Claude Code, type `/mcp`, choose promptcompute and sign in in the browser window that opens. Pick the workspace and environment the agent should use.

3. **Ask for something risky** Ask Claude to do something that needs a person, such as a refund or a production change. It calls `request_approval` and waits for the decision.

4. **Decide** Approve or reject from the inbox, email, Slack or Teams. Claude gets the decision with `final_args`, the arguments it is allowed to run.

5. **Other clients** Clients configured with JSON take the same URL. In Cursor, add it under Settings, MCP.

```json
{
  "mcpServers": {
    "promptcompute": {
      "type": "http",
      "url": "https://mcp.promptcompute.ai/mcp"
    }
  }
}
```

6. **Or connect the whole family** The line in step 1 is the one the PromptReports family download writes for promptcompute. One connection to the PromptReports family MCP at https://mcp.promptreports.ai/mcp reaches promptcompute and every other family product. To add all six product servers in one step, run `npx -p promptcompute promptreports install --family`; add `--client cursor`, `vscode`, `codex` or `claude-desktop` for another client. A PromptReports Claude Code plugin will do the same once its marketplace is public.

```bash
npx -p promptcompute promptreports install --family
```

## Use cases

### Refunds from a support agent

- Situation: Your support agent can issue refunds, but anything over $50 needs a person.
- What to do: Connect it over MCP and publish a policy that auto-approves refunds up to $50.
- Result: Small refunds run at once; larger ones wait for an approver and run with the approved amount.

### Gate shell commands in Claude Code

- Situation: You want Claude Code to ask before `git push` or `rm -rf`.
- What to do: Run `npx promptcompute hook claude-code` setup from the quickstart; it adds a PreToolUse hook with a gate file.
- Result: Matching commands pause until someone approves them in promptcompute.

## What you will see

Requests from the agent appear in your inbox, and the agent continues only after a decision.

- `/mcp` shows promptcompute as connected
- The request page shows agent mcp and the client's name
- Getting started shows An agent or MCP client is connected as done

What the agent receives after approval:

```json
{
  "status": "approved",
  "final_args": { "order_id": "A-1001", "amount": 80 },
  "decided_by": ["Dana R."],
  "ledger_entry_id": "led_01j..."
}
```

## If something goes wrong

- **The sign-in window does not open.** Run `/mcp` again and choose Authenticate. Some terminals print the link instead; open it yourself.
- **The tool call times out.** Clients without the MCP Tasks extension wait up to 50 seconds, then poll `get_approval`. The request stays open until it is decided or expires.
- **Calls fail with forbidden.** Your organization may have an IP allowlist. Ask an owner to add your network under Org security.

## Related

- [Send requests from code](https://promptcompute.ai/docs/send-requests.md)
- [Write approval policies](https://promptcompute.ai/docs/policies.md)
- [Decide requests](https://promptcompute.ai/docs/decide-requests.md)
