data.gov MCP server
Read-only access to approved federal APIs using the data.gov API gateway. Provides tools to call federal APIs and retrieve rate limit information.
README
data.gov MCP server for Copilot Studio
This MCP server gives Microsoft Copilot Studio agents read-only access to federal APIs that use the api.data.gov authentication model.
The GitHub repository contains the source code only. Copilot Studio cannot connect directly to a GitHub repository; deploy the server to a public HTTPS host first.
MCP tools
call_federal_api: Make a guarded HTTPS GET request to a.govor.milAPI.get_rate_limit_info: Call an endpoint and expose theX-RateLimit-*headers.
Required environment variables
| Variable | Purpose |
|---|---|
DATA_GOV_API_KEY |
Your outbound data.gov key. Use DEMO_KEY only for light testing. |
MCP_SERVER_API_KEY |
A separate secret that Copilot Studio sends to this MCP server. |
MCP_TRANSPORT |
Set to streamable-http for Copilot Studio. |
Optional variables include MCP_HOST (default 127.0.0.1), MCP_PORT (default 8000), MCP_PATH (default /mcp), MCP_ALLOWED_HOSTS (comma-separated host allowlist), and DATA_GOV_ALLOWED_HOSTS (comma-separated federal API host allowlist). Set MCP_HOST=0.0.0.0 only inside a container behind HTTPS ingress.
Do not use the data.gov key as the MCP server key. Store both as deployment secrets.
Deploy with Docker
Build and run locally:
docker build -t data-gov-mcp .
docker run --rm -p 8000:8000 `
-e MCP_TRANSPORT=streamable-http `
-e MCP_SERVER_API_KEY="replace-with-a-long-random-secret" `
-e DATA_GOV_API_KEY="your-data-gov-key" `
data-gov-mcp
The local MCP endpoint is:
http://localhost:8000/mcp
Copilot Studio requires a publicly reachable HTTPS endpoint. Azure Container Apps, Azure App Service, or another HTTPS container host can run the included Dockerfile. Configure the deployment to expose port 8000, set the required environment variables as secrets, and use the resulting URL ending in /mcp.
For production, set MCP_ALLOWED_HOSTS to the exact public host and keep MCP_SERVER_API_KEY out of source control and container images.
Add the server to Microsoft Copilot Studio
Microsoft currently supports the Streamable HTTP transport for existing MCP servers. SSE is no longer supported for Copilot Studio.
- Open the agent in Copilot Studio.
- Turn on Generative orchestration.
- Open Tools and select Add a tool > New tool > Model Context Protocol.
- Enter:
- Server name:
data.gov Federal APIs - Description:
Read-only access to approved federal APIs using the data.gov API gateway. - Server URL:
https://YOUR_PUBLIC_HOST/mcp
- Server name:
- Select API key authentication.
- Select Header and set the header name to
X-MCP-API-Key. - Enter the same value configured in the deployment's
MCP_SERVER_API_KEY. - Select Create, choose Create a new connection, then select Add to agent.
- Review the discovered tools and test the agent with a narrow request, such as asking for one current record from a known federal API.
The server uses its private DATA_GOV_API_KEY when calling the downstream federal API. Do not ask Copilot Studio users to provide that key.
Local stdio mode
For local MCP clients that launch a process directly, stdio remains available:
py -m venv .venv
.\.venv\Scripts\Activate.ps1
py -m pip install -r requirements.txt
$env:DATA_GOV_API_KEY = "DEMO_KEY"
py server.py
Leave MCP_TRANSPORT unset for stdio mode. Use MCP_TRANSPORT=streamable-http only when running as a network service.
Security notes
- Only HTTPS federal hosts are allowed by default for downstream requests.
- Private, loopback, link-local, multicast, and reserved downstream addresses are rejected.
- Responses are limited to 5 MB to protect server and agent memory.
- The Copilot Studio-facing endpoint requires
X-MCP-API-Key. - Caller-supplied
api_keyquery parameters are rejected; only the server-held key is used. - The data.gov API key is sent only from the server to the downstream API and is never returned as a tool result.
- Apply Power Platform data policies to control external connector access in Copilot Studio.
References:
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.