PIA
- python
3
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You can query a growing Program Integrity Alliance data lake from your own MCP client. This MCP Server lets you search across multiple federal data sources, with full citations and easy integration into chat or agent workflows. It supports fast title searches, deep content searches, and source-specific query tools to help you find the exact documents you need, with up-to-date executive orders and government reports.
How to use
Use an MCP client to connect to the pia-mcp-server and run searches against the Program Integrity Alliance data. You can perform comprehensive content searches, title searches, and targeted queries for GAO, OIG, CRS, DOJ, Congress.gov, and Federal Register materials. Leverage the built‑in facets to refine results and get precise filter values, then fetch full documents or citations as needed.
How to install
Prerequisites you need before installation:
# Install prerequisites as needed
# Node-based tooling and Python are commonly used in MCP workflows
# Ensure you have a runtime for your chosen installation method
Choose one of the following installation methods to set up the pia-mcp-server.
# Install using Smithery (CLI install path)
npx -y @smithery/cli install pia-mcp-server --client claude
Install manually using uv (universal installer) and run in a virtual environment.
# Clone and set up development environment
git clone https://github.com/Program-Integrity-Alliance/pia-mcp-local.git
cd pia-mcp-local
# Create and activate virtual environment
uv venv
source .venv/bin/activate
# Install with test dependencies
uv pip install -e ".[test]"
If you prefer Docker, build the local image and run the server container.
# Build the Docker image for local use
git clone https://github.com/Program-Integrity-Alliance/pia-mcp-local.git
cd pia-mcp-local
docker build -t pia-mcp-server:latest .
Configure your MCP client to connect to the pia-mcp-server using the provided examples.
{
"mcpServers": {
"pia-mcp-server": {
"command": "uv",
"args": [
"tool",
"run",
"pia-mcp-server",
"--api-key", "YOUR_API_KEY"
],
"cwd": "/path/to/your/pia-mcp-local"
}
}
}
Configuration and MCP connections
The MCP client connects to the server using an API key and a defined command. The API key is supplied as part of the command when running the server locally, and you can also run the server via a Docker container with the appropriate key passed to the container.
Examples of client configurations you can apply include the following MCP server definitions.
{
"mcpServers": {
"pia-mcp-server": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"pia-mcp-server:latest",
"--api-key", "YOUR_API_KEY"
]
}
}
}
Testing the server
Run the test suite to ensure the server and its tools are functioning correctly. Use the Python test framework to execute unit and integration tests, with coverage reporting as needed.
python -m pytest
python -m pytest --cov=pia_mcp_server
Notes and troubleshooting
- Ensure your API key is kept secure and not shared publicly. Use environment isolation for sensitive credentials. - If a search returns no results, try broadening the query or removing filters to perform an unfiltered search first. - For Docker users, verify that the image tag pia-mcp-server:latest exists locally or in your registry before running the container.
Security considerations
Treat the MCP server as an exposed data access point. Use least-privilege network access, rotate API keys periodically, and monitor access logs for unusual activity. Keep dependencies up to date to mitigate known vulnerabilities.
Available tools
pia_search_content
Comprehensive search tool for querying document content and recommendations in the PIA database. Returns comprehensive results with full citation information and clickable links for proper attribution.
pia_search_content_facets
Get available facets (filter values) for content searches to understand which filters you can apply.
pia_search_titles
Search the PIA database for document titles only, returning metadata without full content.
pia_search_titles_facets
Get available facets for title searches to understand filter values for document titles.
pia_search_content_gao
Search for GAO document content and recommendations with automatic GAO filtering.
pia_search_content_oig
Search for OIG document content and recommendations with automatic Oversight.gov filtering.
pia_search_content_crs
Search for CRS document content and recommendations with automatic CRS filtering.
pia_search_content_doj
Search for DOJ document content and recommendations with automatic DOJ filtering.
pia_search_content_congress
Search for Congress.gov document content and recommendations with automatic Congress.gov filtering.
pia_search_content_executive_orders
Search for Executive Orders from Federal Register with automatic Federal Register filtering.
search
Simple search interface for ChatGPT Connectors to query the PIA database.
fetch
Retrieve full contents of a specific document by ID for ChatGPT Connectors.