# Connect Cline to SAM.gov data

To connect Cline to SAM.gov data, open Configure MCP Servers and add a samgovapi entry with "type": "streamableHttp", url https://samgovapi.io/api/mcp and headers {"Authorization": "Bearer <your key>"}. Set the type explicitly: without it Cline uses legacy SSE, which this server does not offer.

Cline's Remote Servers form has no field for headers, so authenticated servers go in the JSON settings file. The type field matters more here than in other clients: leaving it out selects the old SSE transport.

- 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

## 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 key sits in cline_mcp_settings.json. Do not commit that file.

## Set up Cline

1. Open the settings file: In the Cline panel, open the MCP Servers view, then Configure MCP Servers. The Cline CLI keeps the same file at ~/.cline/data/settings/cline_mcp_settings.json.

2. Add the server: Paste your key in place of the placeholder; Cline does not document environment variable expansion.

cline_mcp_settings.json:

```json
{
  "mcpServers": {
    "samgovapi": {
      "type": "streamableHttp",
      "url": "https://samgovapi.io/api/mcp",
      "headers": {
        "Authorization": "Bearer sg_..."
      }
    }
  }
}
```

3. Check the tools: The MCP Servers view lists the samgovapi tools once connected.

## 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

- The Remote Servers tab cannot add headers; edit the JSON.

## Troubleshooting

- Connection fails with 405: type is missing or set to sse. Set "type": "streamableHttp".
- Tools list but calls fail: Check the Authorization value starts with Bearer and a space.
- ONBOARDING_REQUIRED: Ask Cline to answer the samgovapi onboarding questions once.

## Questions

### Can Cline auto-approve these tools?

Yes, per tool in the MCP Servers view. Read-only lookups are safe to auto-approve; they still spend credits.

## Official documentation

- Cline: connecting to a remote server: https://docs.cline.bot/mcp/connecting-to-a-remote-server
- Cline: configuring MCP servers: https://docs.cline.bot/mcp/configuring-mcp-servers

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.
