# Connect Continue to SAM.gov data

To connect Continue to SAM.gov data, add an entry under mcpServers in config.yaml with type streamable-http, url https://samgovapi.io/api/mcp and requestOptions.headers.Authorization set to Bearer ${{ secrets.SAMGOVAPI_API_KEY }}. Continue reads the secret from a .env file and the tools appear in agent mode.

Continue uses the same requestOptions block for MCP servers as for models, and its secrets syntax keeps keys out of the YAML. MCP tools are only available in agent mode.

- 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. ${{ secrets.SAMGOVAPI_API_KEY }} resolves from Continue's .env files, so config.yaml holds no key.

## Set up Continue

1. Store the secret: Continue reads secrets from .env files such as ~/.continue/.env.

~/.continue/.env:

```bash
SAMGOVAPI_API_KEY=sg_...
```

2. Add the server: The type value is case sensitive.

~/.continue/config.yaml:

```yaml
mcpServers:
  - name: samgovapi
    type: streamable-http
    url: https://samgovapi.io/api/mcp
    requestOptions:
      headers:
        Authorization: Bearer ${{ secrets.SAMGOVAPI_API_KEY }}
```

3. Use agent mode: Switch the Continue chat to agent mode and ask which samgovapi tools are available.

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

- Continue's reference documents requestOptions for streamable-http servers with the same format as model requestOptions; its docs do not show an MCP header example, so check the first call.

## Troubleshooting

- No tools in chat: MCP works in agent mode only.
- INVALID_API_KEY: The secret did not resolve. Check the .env file name and location, then reload the window.
- ONBOARDING_REQUIRED: Ask the agent to answer the samgovapi onboarding questions once.

## Questions

### Can a workspace carry its own server file?

Yes. Put a YAML file in .continue/mcpServers/ at the workspace root.

## Official documentation

- Continue: MCP deep dive: https://docs.continue.dev/customize/deep-dives/mcp
- Continue: config.yaml reference: https://docs.continue.dev/reference

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.
