MCP Integration
Connect BidStacker to Claude Desktop, Claude Code, or any MCP-compatible AI agent for hands-free proposal management.
infoWhat is MCP?
The Model Context Protocol (MCP) is a standard for giving AI agents access to external tools and data. BidStacker's MCP server exposes 29 tools that let AI agents search RFPs, create proposals, run compliance checks, and more — all through natural language.
buildSetup
1. Install the MCP Server
2. Configure for Claude Code
Create a .mcp.json in your project root and authenticate with a scoped personal access token (PAT):
{
"mcpServers": {
"bidstacker": {
"command": "node",
"args": ["packages/mcp-server/dist/bin/bidstacker-mcp.js"],
"env": {
"NEXT_PUBLIC_SUPABASE_URL": "https://YOUR_PROJECT.supabase.co",
"ANTHROPIC_API_KEY": "sk-ant-YOUR_KEY",
"BIDSTACKER_API_URL": "https://www.bidstacker.xyz",
"BIDSTACKER_PAT": "pat_YOUR_PERSONAL_ACCESS_TOKEN"
}
}
}
}Authenticate with a scoped personal access token (sent as Authorization: Bearer pat_...), never a Supabase service-role key. Scoped tokens are tenant-isolated and respect row-level security. Create and manage tokens under Settings → Integrations.
3. HTTP Transport (Optional)
For web-based integrations, run the HTTP server. Every /mcp request must carry an Authorization: Bearer pat_... header — unauthenticated requests are rejected with 401.
keyEnvironment Variables
| Variable | Required | Description |
|---|---|---|
| NEXT_PUBLIC_SUPABASE_URL | Yes | Supabase project URL (validated at startup) |
| ANTHROPIC_API_KEY | Yes | Anthropic API key for the AI generation tools |
| BIDSTACKER_PAT | PAT mode | Scoped personal access token (tenant-isolated; in PAT mode it determines the org for every tool) |
| BIDSTACKER_API_URL | PAT mode | BidStacker API base URL the PAT authenticates against (e.g. https://www.bidstacker.xyz) |
| SUPABASE_SERVICE_ROLE_KEY | Local only | Service-role key for the legacy single-tenant/local server — never use for hosted or multi-tenant deployments |
| SAM_GOV_API_KEY | No | SAM.gov API key — needed by sync_federal |
| BIDSTACKER_DEFAULT_ORG_ID | No | Default org outside PAT mode (ignored in PAT mode, where the token scopes the org) |
| NEXT_PUBLIC_SUPABASE_ANON_KEY | No | Enables the auth_login email/password tool |
| MCP_HTTP_PORT | No | HTTP transport port (default 3100) |
NEXT_PUBLIC_SUPABASE_URLRequiredSupabase project URL (validated at startup)
ANTHROPIC_API_KEYRequiredAnthropic API key for the AI generation tools
BIDSTACKER_PATPAT modeScoped personal access token (tenant-isolated; in PAT mode it determines the org for every tool)
BIDSTACKER_API_URLPAT modeBidStacker API base URL the PAT authenticates against (e.g. https://www.bidstacker.xyz)
SUPABASE_SERVICE_ROLE_KEYLocal onlyService-role key for the legacy single-tenant/local server — never use for hosted or multi-tenant deployments
SAM_GOV_API_KEYOptionalSAM.gov API key — needed by sync_federal
BIDSTACKER_DEFAULT_ORG_IDOptionalDefault org outside PAT mode (ignored in PAT mode, where the token scopes the org)
NEXT_PUBLIC_SUPABASE_ANON_KEYOptionalEnables the auth_login email/password tool
MCP_HTTP_PORTOptionalHTTP transport port (default 3100)
constructionAvailable Tools (29)
search_rfpsSearch RFPs by keyword, state, agency, NAICS, set-aside, deadline, or match score
get_rfpGet full details of a specific RFP
get_rfp_classificationGet AI classification breakdown (NAICS sectors, keywords, categories)
get_matchesGet top RFP matches for your organization sorted by score
score_rfp_for_orgCalculate or recalculate match score for a specific RFP
list_proposalsList proposals filtered by status or linked RFP
get_proposalGet full proposal details including all sections
create_proposalCreate a new proposal, optionally from a template
update_proposal_sectionUpdate a section title and/or body
add_proposal_sectionAdd a new section at a specific position
set_proposal_statusChange proposal status (draft/review/submitted/awarded/lost)
get_organizationGet organization profile including capabilities and matching framework
update_organizationUpdate organization profile fields
generate_matching_frameworkUse AI to generate an optimized matching framework
generate_proposal_draftGenerate content for all empty sections in a proposal
generate_sectionGenerate content for a single proposal section
ai_improveImprove, shorten, expand, or summarize text
run_compliance_checkRun compliance analysis on a proposal
list_templatesList available proposal templates
get_templateGet template details including sections
apply_templateApply a template to an existing proposal
sync_federalSync federal opportunities from SAM.gov
sync_stateSync state/local government opportunities
get_sync_statusGet recent sync history and statistics
list_reference_docsList reference documents for your organization
get_reference_docGet a reference document with content
create_reference_docCreate a new reference document
delete_reference_docDelete a reference document
find_and_generateFind best matches and optionally auto-generate a proposal
play_circleExample Workflows
Find and Bid on Contracts
1. search_rfps — Find matching opportunities
2. get_rfp — Review full details
3. create_proposal — Start a proposal from template
4. generate_proposal_draft — AI-generate all sections
5. run_compliance_check — Verify compliance
One-Click Bid (Composite)
Use find_and_generate with auto_generate: true to find the top match and automatically create a full proposal draft in one step.