Set up any MCP client
Connect any MCP-compatible client to GovData using the Streamable HTTP transport.
Before you start
- Create a GovData account (free)
- Go to your console and create an agent
- Copy the agent's API key — it starts with
gd_live_orgd_test_
1.Connection details
Configure your MCP client with these settings:
| Server URL | https://mcp.govdata.dev/mcp |
| Transport | Streamable HTTP (POST to the URL) |
| Authentication | Authorization: Bearer YOUR_API_KEY |
| Content-Type | application/json |
| Protocol version | 2025-03-26 |
2.Initialize the connection
Send an initialize request to establish the session:
{ "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2025-03-26", "capabilities": {}, "clientInfo": { "name": "my-app", "version": "1.0" } } }
POST this as JSON to https://mcp.govdata.dev/mcp with your API key in the Authorization header.
3.Call a tool
Once initialized, you can call any GovData tool. For example, to calculate income tax:
{ "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "calculate_income_tax", "arguments": { "gross_income": 55000 } } }
4.Test with cURL
You can test the MCP endpoint directly from your terminal:
# List available tools curl -X POST https://mcp.govdata.dev/mcp \\ -H "Authorization: Bearer YOUR_API_KEY" \\ -H "Content-Type: application/json" \\ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' # Call a tool curl -X POST https://mcp.govdata.dev/mcp \\ -H "Authorization: Bearer YOUR_API_KEY" \\ -H "Content-Type: application/json" \\ -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"calculate_income_tax","arguments":{"gross_income":55000}}}'
Generic JSON config
Most MCP clients accept a JSON configuration like this:
{ "govdata": { "url": "https://mcp.govdata.dev/mcp", "transport": "streamable-http", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } }
What's next?
- MCP Reference — full list of tools, resources, and prompts
- Authentication guide — test vs live keys, key rotation
- Rate limits — understand credit usage and limits