Skip to main content
Glama
MSPFE2019

data.gov MCP server

by MSPFE2019

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 .gov or .mil API.

  • get_rate_limit_info: Call an endpoint and expose the X-RateLimit-* headers.

Related MCP server: US Government Open Data MCP

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_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).

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.

  1. Open the agent in Copilot Studio.

  2. Turn on Generative orchestration.

  3. Open Tools and select Add a tool > New tool > Model Context Protocol.

  4. 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

  5. Select API key authentication.

  6. Select Header and set the header name to X-MCP-API-Key.

  7. Enter the same value configured in the deployment's MCP_SERVER_API_KEY.

  8. Select Create, choose Create a new connection, then select Add to agent.

  9. 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.

  • The Copilot Studio-facing endpoint requires X-MCP-API-Key.

  • 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:

F
license - not found
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Access US federal award, recipient, agency, and spending analytics data from USAspending.gov.

  • Data.gov MCP — wraps Data.gov CKAN API (catalog.data.gov/api/3)

  • HealthData.gov MCP — wraps HealthData.gov CKAN API (free, no auth)

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MSPFE2019/data-gov-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server