Skip to main content
Glama
Program-Integrity-Alliance

PIA MCP Server

Official

Python Version Tests License: MIT

MCP Server

The Program Integrity Alliance (PIA) aims to make working with U.S. Government datasets easier and AI-friendly. We have ingested hundreds of thousands of documents and articles across a range of sources, and this list is growing. This MCP server enables AIs to search this data at a more detailed level than on most source websites, for example, searching within PDF reports to find the exact pages where text and images appear.

Full attribution is given to the amazing open federal data sources, and all links in the data provided by PIA will always direct back to the original source.

Currently, the list of datasets includes:

  1. U.S. Government Accountability Office (GAO) - 10k Federal Reports since 2010 and 5.5k Open Oversight Recommendations

  2. Oversight.gov - 28k OIG Federal Reports since 2010, and 29k Open Oversight Recommendations

  3. U.S. Congress - Bill texts for sessions 118 and 119

  4. Department of Justice (DOJ) - 195k Press Releases since 2000

  5. Federal Agency annual reports - Congressional Justification, Financial Report, Performance Report - 139 reports across 10 priority agencies, with best coverage in 2024.

  6. All Congression Research Service reports - 22k reports provided by EveryCRSReport.com

  7. U.S. Presidential Executive Orders - Order for the last 7 presidencies as provided by the Federal Register.

This data is updated weekly, and we will be adding more datasets and tools soon.

If you have any questions, or requests for other datasets, we look forward to hearing from you by raising an issue here.

For more information on how to use PIA's MCP resources in platforms like Claude and ChatGPT, see PIA Connect.

๐Ÿค Contribute โ€ข ๐Ÿ“ Report Bugs or Questions

โœจ Core Features

  • ๐Ÿ”Ž Document Search: Query PIA database with comprehensive OData filtering options

  • ๐Ÿ“Š Faceted Search: Discover available filter fields and values

  • ๐Ÿ“ AI Instruction Prompts: Prompts that instruct LLMs on how to summarize search results and use search tools

Related MCP server: EzBiz Government Contracting MCP Server

๐Ÿš€ Quick Start

Getting a PIA API Key

  1. Go to https://programintegrity.org/ and register for a free PIA account (or log in if you already have one)

  2. Once logged in, click the user icon (top right) and choose API/MCP key (this opens the API / MCP Keys page at /account/api-keys)

  3. Generate a new key, then copy it โ€” you'll provide it to the MCP server via the X-API-KEY header / --api-key argument

  1. Download and run the latest version of Docker Desktop

  2. Navigate to 'MCP Toolkit'

  3. Search for 'Program Integrity Alliance'

  4. Add as a server by clicking '+'

  5. Under 'Configuration' enter your key

  6. In 'MCP Toolkit' navigate to 'Clients'

  7. Choose one, eg 'Claude Desktop'

  8. Start your Client

  9. You should now see 'pia_search' and other tools

Installing via Smithery

To install PIA Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install pia-mcp-server --client claude

Installing Manually

Install using uv:

uv tool install pia-mcp-server

Refreshing Tool Specs (No API Key Needed for Listing)

Tool listing in this local server is served from a local snapshot, so tools are discoverable even without an API key. To refresh the snapshot from the remote server, run:

PIA_API_KEY=your_key python utils/refresh_tools.py

For development:

# 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]"

For Docker:

# Build the Docker image if you want to use a local image
git clone https://github.com/Program-Integrity-Alliance/pia-mcp-local.git
cd pia-mcp-local
docker build -t pia-mcp-server:latest .

๐Ÿ”Œ MCP Integration

Add this configuration to your MCP client config file:

{
    "mcpServers": {
        "pia-mcp-server": {
            "command": "uv",
            "args": [
                "tool",
                "run",
                "pia-mcp-server",
                "--api-key", "YOUR_API_KEY"
            ],
            "cwd": "/path/to/your/pia-mcp-local"
        }
    }
}

For Docker:

You must build the Docker image ...

docker build -t pia-mcp-server:latest .

Then add this to your Client, eg Claude ...

{
    "mcpServers": {
        "pia-mcp-server": {
            "command": "docker",
            "args": [
                "run",
                "--rm",
                "-i",
                "pia-mcp-server:latest",
                "--api-key", "YOUR_API_KEY"
            ]
        }
    }
}

๐Ÿ’ก Available Tools

The server provides 2 tools, forwarded verbatim to the Program Integrity Alliance (PIA) MCP server:

1. pia_search

Purpose: Primary search over the PIA database of government oversight reports, recommendations, and related documents.

Description: Returns ranked results with snippets, citations, embedded facets, and a govquery_url, with full OData filtering. Consolidates the former per-dataset and agency-specific search tools into one.

Parameters:

  • query (required): Search query text

  • filter (optional): OData filter expression supporting complex boolean logic

  • Additional optional paging / facet / mode parameters โ€” see the tool's inputSchema

2. pia_oversight_recommendations

Purpose: Search the Open Recommendations dataset (GAO + Oversight.gov) with facets enabled by default.

Parameters:

  • query (required): Search query text

  • filter (optional): OData filter expression

The remote also exposes search and fetch (OpenAI ChatGPT MCP spec) โ€” this proxy intentionally does not expose them; use pia_search instead. They are excluded by the sync script (utils/refresh_tools.py).

Search Modes

pia_search supports OData filtering and faceting. The filter parameter uses standard OData query syntax.

Example Filter Expressions:

  • Basic filter: "SourceDocumentDataSource eq 'GAO'"

  • Multiple conditions: "SourceDocumentDataSource eq 'GAO' or SourceDocumentDataSource eq 'Oversight.gov'"

  • Complex grouping: "SourceDocumentDataSource eq 'GAO' and RecStatus ne 'Closed'"

  • Negation: "SourceDocumentDataSource ne 'Department of Justice' and not (RecStatus eq 'Closed')"

  • List membership: "IsIntegrityRelated eq 'Yes' and RecPriorityFlag in ('High', 'Critical')"

  • Date ranges: "SourceDocumentPublishDate ge '2020-01-01' and SourceDocumentPublishDate le '2024-12-31'"

  • Boolean grouping: "(SourceDocumentDataSource eq 'GAO' or SourceDocumentDataSource eq 'Oversight.gov') and RecStatus eq 'Open'"

OData Filter Operators:

  • eq - equals: field eq 'value'

  • ne - not equals: field ne 'value'

  • gt - greater than: amount gt 1000

  • ge - greater than or equal: date ge '2023-01-01'

  • lt - less than: amount lt 5000

  • le - less than or equal: date le '2023-12-31'

  • in - value in list: status in ('Active', 'Pending')

OData Logical Operators:

  • and - logical AND: field1 eq 'value' and field2 gt 100

  • or - logical OR: status eq 'Active' or status eq 'Pending'

  • not - logical NOT: not (status eq 'Inactive')

  • () - grouping: (field1 eq 'A' or field1 eq 'B') and field2 gt 0

OData String Functions:

  • contains(field, 'text') - field contains text

  • startswith(field, 'prefix') - field starts with prefix

  • endswith(field, 'suffix') - field ends with suffix

2. PIA Search Facets

Discover available field names and values for filtering.

Tool Name: pia_search_facets

Parameters:

  • query (optional): Optional query to get facets for (default: "")

Purpose:

  • Discover available field names (e.g., data_source, document_type, agency)

  • Find possible field values (e.g., "OIG", "GAO", "audit_report")

  • Understand data types for each field (string, date, number)

This information helps you construct proper filter expressions for the search tools.

๐Ÿ” Filter Discovery Workflow

To effectively use OData filters, follow this workflow:

Step 1: Discover Available Fields

Use the pia_search_facets tool to explore what fields are available for filtering. You can provide a query to get facets relevant to your search topic, or omit the query to see all available fields.

Step 2: Examine Field Values

The facets response will show available fields and their possible values:

{
  "SourceDocumentDataSource": ["Oversight.gov", "GAO", "CMS", "FBI"],
  "RecStatus": ["Open", "Closed", "In Progress"],
  "RecPriorityFlag": ["High", "Medium", "Low", "Critical"],
  "IsIntegrityRelated": ["Yes", "No"],
  "SourceDocumentPublishDate": "2020-01-01 to 2024-12-31"
}

Use the pia_search tool with discovered fields to create precise OData filters:

Basic Example:

Query: "Medicare fraud"
Filter: "SourceDocumentDataSource eq 'GAO' and SourceDocumentPublishDate ge '2023-01-01' and IsIntegrityRelated eq 'Yes'"

Complex Example:

Query: "healthcare violations"
Filter: "(SourceDocumentDataSource eq 'Oversight.gov' or SourceDocumentDataSource eq 'CMS') and RecPriorityFlag in ('High', 'Critical') and SourceDocumentPublishDate ge '2023-01-01'"

๐Ÿ“ AI Instruction Prompts

The server exposes one prompt that instructs the calling LLM how to use the PIA tools and format responses:

pia_assistant_guidance

Comprehensive guidance for an LLM using the PIA (GovQuery) tools: search strategy, citation format, and response structure.

Arguments: None (reusable guidance)

โš™๏ธ Configuration

The API key is always provided via the MCP server configuration. Additional settings can be configured through environment variables:

Variable

Purpose

Default

PIA_API_URL

PIA API endpoint

https://www.programintegrity.org/mcp

REQUEST_TIMEOUT

API request timeout (seconds)

60

MAX_RESULTS

Maximum results per query

50

MCP Configuration

The API key must be provided in your MCP client configuration using the --api-key argument. See Getting a PIA API Key above to create one.

{
    "mcpServers": {
        "pia-mcp-server": {
            "command": "pia-mcp-server",
            "args": ["--api-key", "YOUR_API_KEY"]
        }
    }
}

Replace YOUR_API_KEY with your actual PIA API key.

๐Ÿงช Testing

Run the test suite:

python -m pytest

Run with coverage:

python -m pytest --cov=pia_mcp_server

๐Ÿ“„ License

Released under the MIT License. See the LICENSE file for details.


Made with โค๏ธ for Government Transparency and Accountability

Available Tools

2 tools
pia_oversight_recommendationsA

Search oversight recommendations (Open Recommendations dataset) with facets enabled by default. Today's date is 2026-06-25. This dataset contains recommendations from GAO and Oversight.gov only โ€” SourceDocumentDataSource filters for any other source will be ignored. Do NOT filter by SourceDocumentDataSet โ€” this tool already targets the 'Open Recommendations' dataset automatically. IMPORTANT: When a text query is provided, do NOT add a referenced_agencies filter โ€” the query handles relevance matching. Only use referenced_agencies when the query is empty (pure filter/facet lookups). total_count is the number of OPEN recommendations matching the query and all applied filters โ€” report it as that count. The results are a representative sample to summarize, and facets break the set down by status, priority, agency, and theme. Counts from free-text queries are approximate (semantic matching); pure filter or agency lookups are exact. Recommendations have no per-document citations, so it is very important to always include the govquery_url for the full set in Rec Spotlight rather than citing individual rows.

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (default: 1)
limitNoMaximum results limit
queryYesSearch query text
filterNoOptional OData filter expression supporting complex boolean logic. AVAILABLE FIELDS: โ€ข SourceDocumentDataSource: Data source/agency that published the document. Major sources (>1k documents): 'Department of Justice', 'Congress.gov', 'Oversight.gov', 'CRS', 'GAO', 'Federal Register' โ€ข SourceDocumentDataSet: Dataset or collection the document belongs to. Values include: 'reports', 'federal-reports', 'press-releases', 'executive orders', 'Open Recommendations'. Note: the value is 'Open Recommendations' (not 'recommendations'). Values: 'press-releases', 'bills-and-laws', 'reports', 'federal-reports', 'executive orders', 'state-and-local-reports', 'annual-financial-reports', 'congressional-justification-reports', 'performance-and-accountability-reports' โ€ข SourceDocumentTitle: Document title - use contains, eq for text matching โ€ข SourceDocumentPublishDate: Publication date - ISO 8601 format YYYY-MM-DD (e.g., '2023-01-01'). Use ge/le for ranges โ€ข RecStatus: Recommendation status โ€ข RecPriorityFlag: Priority flag for recommendations โ€ข SourceDocumentIsRecDoc: Whether the document contains recommendations. Values: 'No', 'Yes' โ€ข RecFraudRiskManagementThemePIA: Fraud risk management theme classification โ€ข RecMatterForCongressPIA: Whether the matter is for Congressional attention โ€ข RecRecommendation: Recommendation text - use contains, eq for text matching โ€ข RecAgencyComments: Agency comments on recommendations - use contains, eq for text matching โ€ข referenced_agencies: Agencies referenced by documents (collection field). IMPORTANT: Only use this filter when the query is empty (pure filter/facet lookups). Do NOT combine with a text query โ€” the query already handles relevance matching. Example: (referenced_agencies/any(a: a eq 'Department of Defense (DOD)') or referenced_agencies/any(a: a eq 'Department of Justice (DOJ)')) - for single agency omit outer parentheses and 'or'. Get all values via pia_search with facets_only=true. OPERATORS: โ€ข Text: contains, eq, ne, startswith, endswith โ€ข Exact: eq (equals), ne (not equals), in (in list) โ€ข Date: ge (greater/equal), le (less/equal), eq (equals) โ€ข Logic: and, or, not, parentheses for grouping EXAMPLES: โ€ข "SourceDocumentDataSource eq 'GAO'" โ€ข "SourceDocumentDataSource eq 'GAO' and RecStatus ne 'Closed'" โ€ข "(SourceDocumentDataSource eq 'GAO' or SourceDocumentDataSource eq 'OIG') and RecStatus eq 'Open'" โ€ข "SourceDocumentPublishDate ge '2020-01-01' and SourceDocumentPublishDate le '2024-12-31'" TIP: Use pia_search with facets_only=true to get the most current available values. COMMON AGENCY NAMES (use EXACT spelling for referenced_agencies): Department of Defense (DOD), Department of Health and Human Services (HHS), Department of Homeland Security (DHS), Department of Justice (DOJ), Department of Education (ED), Department of Veterans Affairs (VA), Department of the Treasury, Department of Agriculture (USDA), Department of the Interior (DOI), Department of Transportation (DOT), Department of Energy (DOE), Department of State, Department of Labor (DOL), Department of Commerce (DOC), Department of Housing and Urban Development (HUD), Environmental Protection Agency (EPA), National Aeronautics and Space Administration (NASA), Social Security Administration (SSA), Small Business Administration (SBA), Office of Personnel Management (OPM), General Services Administration (GSA)
page_sizeNoResults per page (default: 100)
facets_onlyNoReturn ONLY the facet breakdown + total_count + Rec Spotlight govquery_url, omitting the individual recommendation rows โ€” to see the open-rec population broken down by status/priority/agency/theme without pulling rows.
search_modeNoSearch mode (default: content)content
include_facetsNoInclude facets in results (default: true)

Output Schema

ParametersJSON Schema
NameRequiredDescription
outputYes

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden and delivers richly: it discloses that SourceDocumentDataSource filters for non-GAO/Oversight.gov sources are ignored, that free-text counts are approximate while pure filter/agency lookups are exact, and that results are a representative sample with no per-document citations, requiring the govquery_url for the full set.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is fairly long (~400 words) but front-loaded with the core purpose as the first clause. Most sentences earn their place given the tool's complexity, though the referenced_agencies warning in the description partially duplicates what the filter parameter schema already states.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with 8 parameters, an output schema, and tricky usage rules, the description is remarkably complete: it defines total_count semantics, explains results/facets behavior, caveats approximate versus exact counts, and mandates the govquery_url citation rule. No significant gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All 8 parameters already have schema descriptions (100% coverage), so the baseline is 3. The description adds some value by explaining the GAO/Oversight.gov source restriction and reinforcing the query-versus-referenced_agencies interaction, but most parameter semantics are already covered in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'Search oversight recommendations (Open Recommendations dataset)' โ€” a specific verb+resource with clearly defined scope. It distinguishes this tool from the general sibling pia_search by noting it automatically targets the Open Recommendations dataset and that SourceDocumentDataSet filtering is unnecessary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit do/don't guidance: 'Do NOT filter by SourceDocumentDataSet', 'When a text query is provided, do NOT add a referenced_agencies filter', and 'Only use referenced_agencies when the query is empty'. However, it never names the sibling pia_search as an alternative for other use cases, so the when-to-use-vs-alternatives message is incomplete.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv0.1.0
    • First observedpia_oversight_recommendations
    • First observedpia_search

TDQS

A4.2/5.0
Disambiguation4/5

The two tools have distinct focal areas: pia_search provides a general search across all PIA data sources, while pia_oversight_recommendations targets the Open Recommendations dataset specifically. However, since pia_search also includes recommendations, an agent could be uncertain which to use for a recommendation-focused query, though the detailed descriptions mitigate this.

Naming Consistency4/5

Both tools share the 'pia_' prefix, which provides a consistent namespace, but one uses a verb ('search') and the other a noun phrase ('oversight_recommendations'), creating a slight structural inconsistency. With only two tools, the pattern is not fully established, but the names are descriptive and readable.

Tool Count3/5

Two tools is on the thin side for a server covering multiple government data sources and document types, but both tools are highly parameterized and comprehensive in scope, so it is borderline rather than severely under-provisioned. The count feels reasonable if the server's purpose is narrowly focused on searching.

Completeness4/5

The server covers the search domain well, with one tool for broad document search and one for the specialized Open Recommendations dataset, including facets and filter discovery. Gaps include lack of a dedicated tool for retrieving individual documents or covering datasets other than recommendations, but these are workable via pia_search.

Maintenance

ActivityStale
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables access to comprehensive U.S. legislative and governmental data from GovInfo.gov and Congress.gov APIs, including bills, Congressional records, Federal Register documents, member information, and committee activities.
    1
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to search federal contracts, analyze agency spending, track competitor wins, and monitor small business set-aside opportunities using SAM.gov, USASpending.gov, and FPDS data.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides access to US Congress data via the GovTrack API, allowing AI agents to query congressional information without authentication.
    14
    MIT

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/Program-Integrity-Alliance/pia-mcp-local'

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