Connect to Claude (API)
This guide walks you through connecting GovTribe MCP (Beta) to the Anthropic Claude API.
Last updated
Was this helpful?
This guide walks you through connecting GovTribe MCP (Beta) to the Anthropic Claude API.
Last updated
Was this helpful?
Was this helpful?
curl https://api.anthropic.com/v1/messages \
-H "Content-Type: application/json" \
-H "X-API-Key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: mcp-client-2025-11-20" \
-d '{
"model": "claude-sonnet-4-5",
"max_tokens": 1000,
"messages": [{"role": "user", "content": "What tools do you have available?"}],
"mcp_servers": [
{
"type": "url",
"url": "https://govtribe.com/mcp",
"name": "govtribe-mcp",
"authorization_token": "$GOVTRIBE_API_KEY"
}
],
"tools": [
{
"type": "mcp_toolset",
"mcp_server_name": "govtribe-mcp"
}
]
}'curl https://api.anthropic.com/v1/messages \
-H "Content-Type: application/json" \
-H "X-API-Key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: mcp-client-2025-11-20" \
-d '{
"model": "claude-sonnet-4-5",
"max_tokens": 1000,
"messages": [{"role": "user", "content": "Could you find me exactly one federal contract opportunity?"}],
"mcp_servers": [
{
"type": "url",
"url": "https://govtribe.com/mcp",
"name": "govtribe-mcp",
"authorization_token": "$GOVTRIBE_API_KEY"
}
],
"tools": [
{
"type": "mcp_toolset",
"mcp_server_name": "govtribe-mcp"
}
]
}'