Grants Search MCP Server
The Grants Search MCP Server allows users to search for government grants via keywords and paginate results.
Search for grants: Query government grants by keywords using the 'search-grants' tool
Pagination: Control results by specifying page number and grants per page
Detailed grant information: Retrieve comprehensive details about each grant, including title, funding information, eligibility, and more
API integration: Interacts with the Simpler Grants API to fetch and display grant data
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Grants Search MCP Serverfind grants for small business technology innovation"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Grants MCP Server
A Model Context Protocol (MCP) server for comprehensive government grants discovery and analysis, powered by the Simpler Grants API.
Overview
The Grants MCP Server is a Python-based MCP implementation using FastMCP that provides intelligent tools for discovering, analyzing, and tracking government grant opportunities. It offers multiple specialized tools for different aspects of grant research, from opportunity discovery to funding trend analysis and agency landscape mapping.
Related MCP server: Startup Concierge Go MCP Server
Features
š Core Capabilities
Grant Opportunity Discovery: Search and filter grants based on keywords, agencies, funding categories, and eligibility criteria
Funding Trend Analysis: Analyze historical funding patterns and identify emerging opportunities
Agency Landscape Mapping: Understand the grant ecosystem across different government agencies
Intelligent Caching: Built-in caching system to optimize API calls and improve response times
Comprehensive Grant Details: Access detailed information including funding amounts, deadlines, eligibility requirements, and contact information
š ļø Technical Features
Built with FastMCP for robust MCP server implementation
Asynchronous Python architecture for high performance
Dual Transport Support: stdio (local) and HTTP (containerized)
Docker Support: Ready-to-deploy containerized version
Configurable caching with TTL and size limits
Retry logic and error handling for API resilience
Environment-based configuration management
Comprehensive test suite with unit, integration, and live tests
Quick Start with Docker š³
Prerequisites
Docker and Docker Compose installed
Simpler Grants API key (see Obtaining API Key)
1. Clone the Repository
git clone https://github.com/Tar-ive/grants-mcp.git
cd grants-mcp2. Configure API Key
Important: You must provide your own API key. Never commit API keys to version control.
Option A - Using .env file (Recommended):
# Copy the example file
cp .env.example .env
# Edit .env and add your actual API key
# SIMPLER_GRANTS_API_KEY=your_actual_api_key_hereOption B - Edit docker-compose.yml directly:
environment:
- SIMPLER_GRANTS_API_KEY=your_actual_api_key_here3. Build and Run
# Build the Docker image
docker-compose build
# Start the container
docker-compose up -d
# Check if it's running
docker ps | grep grants-mcp
# View logs
docker logs grants-mcp-server4. Test the Server
# Test with curl
curl -X POST http://localhost:8081/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
# Or use the provided test script
python scripts/test_http_local.py5. Configure Claude Desktop
Copy the Docker configuration to Claude Desktop:
# For macOS
cp claude_desktop_configs/config_local_docker.json \
~/Library/Application\ Support/Claude/claude_desktop_config.json
# For Windows
cp claude_desktop_configs/config_local_docker.json \
%APPDATA%\Claude\claude_desktop_config.jsonThen restart Claude Desktop to connect to your containerized MCP server.
Architecture
grants-mcp/
āāā src/
ā āāā mcp_server/
ā āāā server.py # Main server implementation
ā āāā config/ # Configuration management
ā ā āāā settings.py
ā āāā models/ # Data models and schemas
ā ā āāā grants_schemas.py
ā āāā tools/
ā ā āāā discovery/ # Grant discovery tools
ā ā ā āāā opportunity_discovery_tool.py
ā ā ā āāā agency_landscape_tool.py
ā ā ā āāā funding_trend_scanner_tool.py
ā ā āāā utils/ # Utility modules
ā ā āāā api_client.py
ā ā āāā cache_manager.py
ā ā āāā cache_utils.py
ā āāā prompts/ # System prompts
āāā scripts/ # Testing and deployment scripts
ā āāā test_http_local.py # Test HTTP endpoint
ā āāā test_http_no_docker.py # Run HTTP server locally
ā āāā debug_connection.sh # Debug connectivity
āāā claude_desktop_configs/ # Claude Desktop configurations
ā āāā config_local_stdio.json # Direct Python execution
ā āāā config_local_docker.json # Docker via mcp-remote
ā āāā config_both.json # Both options
āāā docker-compose.yml # Docker Compose configuration
āāā Dockerfile # Container definition
āāā tests/ # Comprehensive test suiteDeployment Options
Option 1: Docker (Recommended for Production)
The Docker deployment provides:
Consistent environment across platforms
Easy scaling and deployment
Isolation from system dependencies
Ready for cloud deployment (Google Cloud Run, AWS ECS, etc.)
# Quick start
docker-compose up -d
# Stop the server
docker-compose down
# View logs
docker logs grants-mcp-server --follow
# Rebuild after code changes
docker-compose build && docker-compose up -dOption 2: Local Python Installation
For development and testing:
# Install dependencies
pip install -r requirements.txt
# Run with stdio transport (for direct integration)
SIMPLER_GRANTS_API_KEY=your_key python main.py
# Run with HTTP transport (for testing containerization locally)
MCP_TRANSPORT=http PORT=8080 SIMPLER_GRANTS_API_KEY=your_key python main.pyObtaining API Key
The Simpler Grants API key is required for this MCP server to function. To get your API key:
Visit Simpler Grants API
Sign up for an account or log in
Navigate to your API settings/dashboard
Generate or copy your API key
Keep this key secure - you'll need it for configuration
Configuration
Environment Variables
Variable | Description | Default |
| API key for Grants.gov (required) | - |
| Transport mode: |
|
| HTTP server port (container mode) |
|
| Logging level |
|
| Cache time-to-live (seconds) |
|
| Maximum cache entries |
|
Docker Configuration
The docker-compose.yml file includes:
Port mapping: 8081 (host) ā 8080 (container)
Resource limits: 1 CPU, 1GB RAM
Auto-restart policy
Health checks with proper SSE headers
Available Tools
1. opportunity_discovery
Search for grant opportunities with detailed analysis.
Parameters:
query: Search keywords (e.g., "renewable energy", "climate change")filters: Advanced filter parametersmax_results: Maximum number of results (default: 100)page: Page number for paginationgrants_per_page: Grants per page (default: 3)
2. agency_landscape
Map agencies and their funding focus areas.
Parameters:
include_opportunities: Include opportunity analysis (default: true)focus_agencies: Specific agency codes (e.g., ["NSF", "NIH"])funding_category: Filter by categorymax_agencies: Maximum agencies to analyze (default: 10)
3. funding_trend_scanner
Analyze funding trends and patterns.
Parameters:
time_window_days: Analysis period (default: 90)category_filter: Filter by categoryagency_filter: Filter by agencymin_award_amount: Minimum award filterinclude_forecasted: Include forecasted opportunities (default: true)
Claude Desktop Integration
For Docker Deployment
Ensure Docker container is running:
docker-compose up -dInstall mcp-remote if needed:
npm install -g mcp-remoteCopy configuration:
# macOS cp claude_desktop_configs/config_local_docker.json \ ~/Library/Application\ Support/Claude/claude_desktop_config.jsonRestart Claude Desktop
For Local Development
Copy the stdio configuration:
# macOS cp claude_desktop_configs/config_local_stdio.json \ ~/Library/Application\ Support/Claude/claude_desktop_config.jsonUpdate the path in the config to your local installation
Restart Claude Desktop
Testing
Test Docker Deployment
# Run test script
python scripts/test_http_local.py
# Debug connection issues
bash scripts/debug_connection.sh
# Manual test with curl
curl -X POST http://localhost:8081/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'Run Test Suite
# Run all tests
pytest
# Run with coverage
pytest --cov=src --cov-report=html
# Run specific test categories
pytest tests/unit/
pytest tests/integration/
pytest tests/live/ # Requires API keyTroubleshooting
Port Conflicts
If port 8081 is in use:
# Check what's using the port
lsof -i :8081
# Edit docker-compose.yml to use a different port
# Change "8081:8080" to "8082:8080"Container Issues
# Check container status
docker ps -a | grep grants-mcp
# View detailed logs
docker logs grants-mcp-server --tail 100
# Restart container
docker-compose restart
# Rebuild from scratch
docker-compose down
docker-compose build --no-cache
docker-compose up -dAPI Key Issues
Ensure
SIMPLER_GRANTS_API_KEYis set in docker-compose.ymlCheck logs for authentication errors:
docker logs grants-mcp-serverVerify API key is valid at Simpler Grants API
Cloud Deployment
The containerized version is ready for cloud deployment:
Google Cloud Run
# Build and push to Google Container Registry
gcloud builds submit --tag gcr.io/YOUR_PROJECT/grants-mcp
# Deploy to Cloud Run
gcloud run deploy grants-mcp \
--image gcr.io/YOUR_PROJECT/grants-mcp \
--platform managed \
--port 8080 \
--set-env-vars SIMPLER_GRANTS_API_KEY=your_keyAWS ECS / Fargate
See specs/cloud_deployment.md for detailed AWS deployment instructions.
Development
Project Structure
src/mcp_server/: Core server implementationscripts/: Testing and utility scriptstests/: Comprehensive test suitespecs/: Technical specifications and documentationclaude_desktop_configs/: Ready-to-use Claude Desktop configurations
Contributing
Fork the repository
Create a feature branch:
git checkout -b feature/your-featureMake your changes and add tests
Ensure tests pass:
pytestBuild and test Docker image:
docker-compose build && docker-compose up -dCommit with descriptive messages
Push and create a pull request
Roadmap
Phase 1: Python implementation with FastMCP
Phase 2: Enhanced discovery tools
Phase 3: Docker containerization
Phase 4: Intelligent scoring system
Phase 5: Cloud deployment automation
Phase 6: Multi-agency comparison tools
Phase 7: Grant application assistance
License
MIT License - see LICENSE file for details
Acknowledgments
Built with FastMCP
Powered by Simpler Grants API
Model Context Protocol by Anthropic
Support
For issues, questions, or contributions:
Open an issue on GitHub
Check the Deployment Guide for detailed instructions
Review
specs/directory for technical documentation
Note: This is an alpha release. API and features may change. Use in production with caution.# Deployment Test
Service accounts and permissions are now properly configured!
Available Tools
1 toolsearch-grantsC
Search for government grants based on keywords
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query for grants (e.g., 'Artificial intelligence', 'Climate change') | |
| page | No | Page number for pagination (default: 1) | |
| grantsPerPage | No | Number of grants per page (default: 3) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions searching but doesn't describe behavioral traits such as rate limits, authentication needs, response format, error handling, or whether it's read-only or has side effects. For a search tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's function without unnecessary words. It is appropriately sized and front-loaded, making it easy to understand quickly. Every part of the sentence contributes to clarifying the purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of a search tool with no annotations and no output schema, the description is incomplete. It lacks information on behavioral aspects, usage context, and what to expect in return. While the schema covers parameters well, the overall context for effective tool use is insufficient, especially for an agent needing to understand results and limitations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds minimal semantic context beyond the input schema, which has 100% coverage with clear descriptions for all parameters. It implies keyword-based searching but doesn't provide additional details like search scope, result types, or parameter interactions. With high schema coverage, the baseline is 3, as the schema does most of the work.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose as 'Search for government grants based on keywords', which includes a specific verb ('Search'), resource ('government grants'), and mechanism ('based on keywords'). It distinguishes the tool's function well, though without sibling tools, differentiation isn't applicable. The purpose is specific and actionable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, prerequisites, or limitations. It simply states what the tool does without context about appropriate scenarios or constraints. Since there are no sibling tools, this is less critical, but general usage context is still missing.
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 tool update
- First observed
search-grants
TDQS
With only one tool, there is no possibility of ambiguity or overlap between tools. The tool 'search-grants' has a clear, distinct purpose that cannot be confused with any other tool in the set.
The single tool name 'search-grants' follows a consistent verb-noun pattern, and with only one tool, there is no inconsistency or deviation to evaluate. The naming is straightforward and predictable.
A single tool for a grants search server feels thin and under-scoped. While search is a core function, typical grant-related workflows might include operations like filtering, sorting, or retrieving details, making one tool insufficient for comprehensive coverage.
The tool set is severely incomplete for a grants search domain. It only provides a basic search function, with obvious gaps such as no ability to view grant details, filter by criteria, or manage saved searches, which are essential for effective agent interaction.
Maintenance
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
Grants.gov search and USAspending grant data. 4 MCP tools for grant discovery.
Grants.gov MCP ā open federal grant opportunities (free, no auth)
Search verified-open US grants (federal, state, foundation). Read-only MCP for AI agents.
California Grants Portal MCP ā open State of California grant funding opportunities (keyless).
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceModel Context Protocol (MCP) server that provides access to the Grants.gov API for searching and retrieving federal grant opportunities.-
- FlicenseAqualityBmaintenanceAn MCP server that enables searching Korean government startup grants, checking eligibility, scoring applications, and writing business plans with deterministic coaching.13-
- AlicenseAqualityAmaintenanceAn MCP server that searches grant opportunities across multiple CommonGrants-compliant APIs from a single set of tools.3MIT
- FlicenseNot gradedqualityCmaintenanceA paid MCP server that gives AI agents instant, structured access to every open US federal grant and contract opportunity.1-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Tar-ive/grants-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server