Skip to main content
Chapter 078 minUpdated Jun 2025

MCP Server & API Keys

Let Claude, Cursor, or Grok run your contracting workflows directly.

On this page

What you can do with MCP

GovPillar exposes its core features as MCP tools. Once connected, any AI client that supports MCP — Claude Desktop, Cursor, Grok, OpenAI Dot, Muse AI — can search opportunities, score bids, read your pipeline, and pull agency spend data without you touching a browser.

Architecture — Agentic MCP Connection
GovPillarMCP Server/api/mcp/runGrokxAI · stdio MCPDotOpenAI · RESTMuse AIstdio MCPClaudeDesktop · stdioCursorstdio MCPSAM.gov CacheGemini AIBearer gp_… API key · SHA-256 verified
You sayWhat the bot does
"Find IT contracts open at DoD under NAICS 541511"Calls search_opportunities and returns a formatted list
"Score the top result against our profile"Runs the match scoring tool and returns dimension scores
"Add it to the pipeline"Calls add_to_pipeline — pauses for your confirmation first
"What's the Air Force's small business percentage?"Fetches USASpending.gov data via get_agency_spend
"Move the DARPA pursuit to In Progress"Calls update_pipeline_status — pauses for confirmation

Step 1 — Generate an API Key

  1. Go to your profile avatar → API Keys & MCP
  2. Give the key a label — use the bot name, e.g. "Claude Desktop" or "Cursor"
  3. Click Generate
  4. Copy the key right now — it's shown once and not stored in a recoverable form

Step 2 — Install the MCP Server

bash
npm install -g govpillar-mcp-server

This installs the govpillar-mcp binary globally. No cloning or building required — the package ships pre-built.

Step 3a — Claude Desktop

Edit the Claude config file — ~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows:

json
{
  "mcpServers": {
    "govpillar": {
      "command": "npx",
      "args": ["govpillar-mcp-server"],
      "env": {
        "GOVPILLAR_API_KEY": "gp_your_key_here"
      }
    }
  }
}

Restart Claude Desktop. GovPillar shows up in the tools panel (the plug icon in the chat bar).

Step 3b — Cursor

Create or edit .cursor/mcp.json in your workspace root (workspace-scoped) or ~/.cursor/mcp.json (applies to all projects):

json
{
  "mcpServers": {
    "govpillar": {
      "command": "npx",
      "args": ["govpillar-mcp-server"],
      "env": {
        "GOVPILLAR_API_KEY": "gp_your_key_here"
      }
    }
  }
}

Step 3c — Grok (xAI)

In Grok's settings, go to External Tools → Add Tool Server and fill in:

FieldValue
Transportstdio
Commandnpx govpillar-mcp-server
GOVPILLAR_API_KEYgp_your_key_here

Step 3d — OpenAI Dot

Dot and other OpenAI-based assistants use the REST dispatcher endpoint rather than the stdio binary:

FieldValue
Endpointhttps://govpillar.com/api/mcp/run
MethodPOST
AuthorizationBearer gp_your_key_here
Content-Typeapplication/json
json
{
  "tool": "score_opportunity",
  "args": {
    "noticeId": "abc123",
    "companyId": "your-company-id"
  }
}

Step 3e — Muse AI

  1. In Muse AI settings, open Tool Integrations → Add MCP Server
  2. Set the command: npx govpillar-mcp-server
  3. Add env variable GOVPILLAR_API_KEY with your key value
  4. Save — GovPillar tools appear in the tool picker

Name your API key after the bot (e.g. "Muse AI — laptop") so the activity log tells you which client made each call.

Available Tools

ToolWhat it does
search_opportunitiesSearch by keyword, NAICS, agency, value range, or set-aside type
get_opportunity_detailReturn full solicitation detail for a given noticeId
score_opportunityRun a match score against your company profile
get_pipelineList your current pipeline items with stage and metadata
add_to_pipelineSave an opportunity to your pipeline (requires confirmation)
update_pipeline_statusMove to a new stage, assign, set deadline, or record outcome
get_agency_spendPull spend analytics for any agency from USASpending.gov
shred_rfpExtract Section L/M requirements and FAR risk flags from a solicitation

Security

  • Only a SHA-256 hash is stored — the key itself is never persisted
  • Each key is scoped to your account — it can't access any other tenant's data
  • Revoking a key takes effect immediately
  • All write operations require you to confirm before anything changes

Troubleshooting

SymptomFix
The AI client says GovPillar has no API keyOpen your client's config file, find the "env" block inside the govpillar server entry, and add your API key as the value for GOVPILLAR_API_KEY. Save and restart the client.
The AI client says the key is invalid or unauthorisedYour key may be expired or mistyped. Go to your profile avatar → API Keys & MCP, revoke the old key, generate a new one, and paste it into your config.
Scoring or RFP Shredder returns a subscription errorThese features require a paid plan. Upgrade at profile avatar → Billing & Subscription.
The AI can't find an opportunity you mentionedAsk the AI to search for it first ("search for NAICS 541511 IT contracts") — then use the noticeId it returns in any follow-up request.
GovPillar tools don't appear in the AI client at allRestart the AI client after saving its config file. If using npx, confirm Node 18 or later is installed by running node --version in a terminal.
Requests to the REST endpoint return 401Double-check the Authorization header — it must be exactly: Bearer gp_your_key with no extra spaces or quotes.