# Connect Claude Desktop to SAM.gov data

To connect Claude Desktop to SAM.gov data, open Settings, Connectors, add a custom connector with the URL https://samgovapi.io/api/mcp and your API key as an Authorization request header. Claude Desktop shares connectors with your Claude account; as a fallback, claude_desktop_config.json can run the mcp-remote bridge with the same header.

Claude Desktop is where most non-developers meet MCP: a contracts manager can ask about a teaming partner's registration in plain English and get a dated answer with the SAM.gov link. Custom connectors now accept fixed request headers, which is how this server's key is sent.

- Connects with: MCP
- MCP server: https://samgovapi.io/api/mcp
- REST base: https://samgovapi.io/api/v1
- Auth: Authorization: Bearer <key>, kept in SAMGOVAPI_API_KEY
- Tested: mcp-remote 0.16.6 with --transport http-only: tools/list and a call reached the server with the header (2026-11-13)

## Get a key

Free key at https://samgovapi.io/sign-up, or have the agent call start_signup and approve the link it shows you. The connector stores the header encrypted with your account. With mcp-remote, the key sits in the env block of the config file, which does not read your shell environment.

## Set up Claude Desktop

1. Add a custom connector: Settings, Connectors, Add custom connector. Enter samgovapi as the name and the server URL. Under the authentication options choose request headers and add Authorization with the value Bearer followed by your key.

Connector fields:

```
Name: samgovapi
Remote MCP server URL: https://samgovapi.io/api/mcp
Request header: Authorization
Value: Bearer sg_...
```

2. Turn it on in a chat: Open the + menu in a chat, Connectors, and switch samgovapi on. Individual tools appear under search and tools.

3. Fallback: mcp-remote in the config file: claude_desktop_config.json runs local (stdio) servers. The open-source mcp-remote bridge turns this remote server into one. The header has no space after the colon because some clients do not escape spaces in args.

claude_desktop_config.json:

```json
{
  "mcpServers": {
    "samgovapi": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://samgovapi.io/api/mcp",
        "--transport",
        "http-only",
        "--header",
        "Authorization:${AUTH_HEADER}"
      ],
      "env": {
        "AUTH_HEADER": "Bearer sg_..."
      }
    }
  }
}
```

## Finish account setup once

Data tools unlock after the account answers its onboarding questions: ask the agent to set up your samgovapi account (get_onboarding_questions, then answer_onboarding). Free.

## Check that it works

Ask: "Is UEI ZXBCU6K5KL99 registered in SAM.gov, and when does its registration expire?"

Expected tool call:

```json
{"name":"registration_status","arguments":{"id":"ZXBCU6K5KL99","user_request":"check a registration and its expiry"}}
```

## Things to know

- Custom connectors are called from Anthropic's cloud, so they work with this public server but not with a server on your own laptop.
- mcp-remote is a third-party package; it needs Node.js installed.

## Troubleshooting

- The connector shows no tools: Open the connector settings and check the URL ends in /api/mcp and the header value starts with Bearer.
- mcp-remote exits immediately: Run the same npx command in a terminal to see the error; most often Node.js is missing or the header is malformed.
- ONBOARDING_REQUIRED: Ask Claude to set up your samgovapi account; it answers the onboarding questions once.

## Questions

### Do I need the config file at all?

No. The custom connector is enough on current Claude Desktop builds; the config file route is for setups that prefer local bridges.

## Official documentation

- Claude Help: custom connectors with remote MCP: https://support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp
- MCP: connect to remote servers: https://modelcontextprotocol.io/docs/develop/connect-remote-servers
- mcp-remote README: https://github.com/geelen/mcp-remote

Checked 2026-11-13. All guides: https://samgovapi.io/agents.md

Independent. Not affiliated with, endorsed by or sponsored by GSA, SAM.gov or any U.S. government agency. Registering in SAM.gov is free at sam.gov.
