> The index of all pages is at https://docs.afffast.com/llms.txt.

# Claude Desktop

Connect Claude Desktop to the MCP server with mcp-remote.

Claude Desktop has custom connectors for remote servers. A custom connector asks for a URL and then starts an authentication flow, which is often OAuth. Our server does not have OAuth. It uses an API key in a header. So use the package `mcp-remote`. It runs on your computer, and it sends the header to our server. You need Node.js.

## Install

1. Make a test key in the dashboard. A test key starts with `sk_test_`.
2. In Claude Desktop, open **Settings**, then **Developer**, then **Edit Config**. This opens `claude_desktop_config.json`. The file is here:
   - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
   - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
   - Linux: `~/.config/Claude/claude_desktop_config.json`
3. Add the server:

   ```json
   {
     "mcpServers": {
       "afffast": {
         "command": "npx",
         "args": [
           "-y",
           "mcp-remote",
           "https://api.afffast.com/mcp",
           "--header",
           "Authorization:${AUTH_HEADER}"
         ],
         "env": { "AUTH_HEADER": "Bearer sk_test_..." }
       }
     }
   }
   ```

4. Quit Claude Desktop completely. Start it again.

There is no space after `Authorization:` in the argument. Claude Desktop on Windows does not escape spaces in `args`. The space is in the `env` value, where it is safe.

Claude Desktop reads the key from this file. Claude Desktop does not read your shell variables for this server. So the key is in the file. Protect the file: do not share it, and do not put it in a repository. Use a test key.

## Check that it works

Open a new chat. Select the **+** button at the bottom left of the message box, then **Connectors**. The server `afffast` must be there with its tools. Claude asks you to approve each tool call.

## Example prompts

- "Show the revenue by network for this year as a table."
- "Which conversions are pending for more than 60 days?"
- "List my networks and tell me which connections have an error."

## Troubleshooting

- **The server does not show.** Check that the JSON is valid. Quit Claude Desktop completely and start it again.
- **An `npx` error.** Install Node.js. Run `npx -y mcp-remote --help` in a terminal to test it.
- **A 401 error.** The key is wrong or revoked. Make a new key.
- **More details.** Read the logs. On macOS: `tail -n 20 -f ~/Library/Logs/Claude/mcp*.log`. On Windows, look in `%APPDATA%\Claude\logs`.
- **The tools are missing.** The key decides the tools. A read-only key has no write tools.

## Security

- Never paste a key into a chat.
- Start with a test key. A test key reads and writes test data only.
- Use a read-only key if the tool must only read.
- The key is in a file on your computer. Restrict who can read the file. Revoke the key if the computer is shared or lost.
