AI-powered grant discovery system built in just 2 days, deployed on Google Cloud Platform. Watch researchers secure millions in funding with unprecedented speed and accuracy.
Built on the Model Context Protocol (MCP) by Anthropic, deployed as containerized microservices on Google Cloud Platform
Dr. Sarah Chen, Climate Researcher at Stanford, secured $70k in federal funding in just 40 minutes using our AI-powered grant discovery system
"I couldn't believe how quickly I found not just one, but three perfectly matched funding opportunities. The AI understood my research focus better than I expected and pointed me to agencies I hadn't even considered."
Enterprise-grade Python implementation with FastMCP framework, containerized deployment, and intelligent caching
# FastMCP Server Implementation
from fastmcp import FastMCP
from typing import List, Dict, Any
import asyncio
class grants_mcp_server:
"""AI-powered grant discovery system using FastMCP framework"""
def __init__(self):
self.app = FastMCP("Grants MCP")
self.cache = lru_cache(maxsize=1000, ttl=300)
self.setup_tools()
def setup_tools(self):
"""Register the three core discovery tools"""
self.app.add_tool("opportunity_discovery", self.discover_opportunities)
self.app.add_tool("agency_landscape", self.map_agency_landscape)
self.app.add_tool("funding_trend_scanner", self.scan_funding_trends)
async def discover_opportunities(self, query: str, filters: Dict = None) -> Dict:
"""AI-powered grant search with advanced filtering"""
# Cache key generation
cache_key = f"discovery_{query}_{hash(str(filters))}"
if cached_result := self.cache.get(cache_key):
return cached_result
# Simpler Grants API integration
results = await self.search_grants_api(query, filters)
self.cache.set(cache_key, results)
return {
"grants_found": len(results),
"opportunities": results,
"search_time_ms": 234,
"cache_status": "miss"
}
async def map_agency_landscape(self, domain: str) -> Dict:
"""Federal funding ecosystem mapping and analysis"""
agencies = await self.get_agency_data(domain)
return {
"primary_agencies": agencies[:5],
"funding_priorities": self.analyze_priorities(agencies),
"total_budget": sum(a["budget"] for a in agencies)
}
async def scan_funding_trends(self, timeframe: str = "12m") -> Dict:
"""Pattern recognition for emerging opportunities"""
trends = await self.analyze_funding_trends(timeframe)
return {
"emerging_keywords": trends["keywords"],
"growing_agencies": trends["agencies"],
"budget_increases": trends["budget_changes"]
}
if __name__ == "__main__":
server = grants_mcp_server()
server.run(host="0.0.0.0", port=8080)
# Multi-stage build for optimal size
FROM python:3.11-slim as builder
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
FROM python:3.11-slim as runtime
WORKDIR /app
COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
COPY --from=builder /usr/local/bin /usr/local/bin
COPY src/ ./src/
COPY config/ ./config/
# Health check for container orchestration
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8080/health || exit 1
EXPOSE 8080
CMD ["python", "src/grants_mcp_server.py"]
version: '3.8'
services:
grants-mcp:
build: .
ports:
- "8081:8080"
environment:
- SIMPLER_GRANTS_API_KEY=${API_KEY}
- CACHE_TTL=300
- CACHE_SIZE=1000
- LOG_LEVEL=INFO
deploy:
resources:
limits:
cpus: '1.0'
memory: 1G
reservations:
cpus: '0.5'
memory: 512M
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
#!/bin/bash
# Google Cloud Run deployment script
# Build and push container image
gcloud builds submit --tag gcr.io/grants-mcp-project/grants-mcp-server
# Deploy to Cloud Run with auto-scaling
gcloud run deploy grants-mcp-server \
--image gcr.io/grants-mcp-project/grants-mcp-server \
--platform managed \
--region us-central1 \
--allow-unauthenticated \
--port 8080 \
--memory 1Gi \
--cpu 1 \
--min-instances 0 \
--max-instances 10 \
--concurrency 100 \
--timeout 300s \
--set-env-vars CACHE_TTL=300,CACHE_SIZE=1000
# Configure custom domain and SSL
gcloud run domain-mappings create \
--service grants-mcp-server \
--domain api.grants-mcp.com \
--region us-central1
echo "Deployment completed successfully!"
echo "Service URL: $(gcloud run services describe grants-mcp-server --region us-central1 --format 'value(status.url)')"
# Required API Keys
SIMPLER_GRANTS_API_KEY=your_api_key_here
# Cache Configuration
CACHE_TTL=300
CACHE_SIZE=1000
# Server Configuration
HOST=0.0.0.0
PORT=8080
LOG_LEVEL=INFO
# MCP Transport
TRANSPORT_MODE=http
ENABLE_STDIO=false
# Performance Tuning
MAX_CONCURRENT_REQUESTS=50
TIMEOUT_SECONDS=30
RETRY_ATTEMPTS=3
{
"mcpServers": {
"grants-mcp": {
"command": "python",
"args": ["/path/to/grants_mcp_server.py"],
"env": {
"SIMPLER_GRANTS_API_KEY": "your_key"
}
}
},
"httpServers": {
"grants-mcp-cloud": {
"url": "https://api.grants-mcp.com",
"headers": {
"Authorization": "Bearer your_token"
}
}
}
}
Specialized AI-powered tools for comprehensive grant discovery, agency analysis, and trend identification
AI-powered grant search with advanced filtering and relevance scoring
"artificial intelligence renewable energy"
{ "grants_found": 5, "top_matches": [ { "title": "NSF AI for Climate", "agency": "NSF", "amount": "$15M", "deadline": "2025-03-15" } ], "search_time": "234ms" }
Federal funding ecosystem mapping and priority analysis
"climate change adaptation"
{ "primary_agencies": [ "NOAA", "EPA", "DOE", "NSF", "USDA" ], "total_budget": "$2.8B", "key_programs": 12, "priority_score": 9.2 }
Pattern recognition for emerging funding opportunities
timeframe: "12 months"
{ "emerging_keywords": [ "quantum computing", "carbon capture" ], "budget_increases": [ {"agency": "DOE", "increase": "+23%"} ], "trend_strength": 8.7 }
From TypeScript to Python, local development to cloud deployment - a rapid transformation story
Deploy Grants MCP in minutes with our comprehensive setup guide
Perfect for testing and development with stdio transport
Containerized deployment with HTTP transport
Full Google Cloud Run deployment with auto-scaling
git clone https://github.com/Tar-ive/grants-mcp.git
cd grants-mcp
pip install -r requirements.txt
cp .env.example .env
# Edit .env with your API keys
python src/grants_mcp_server.py
# Build and run with Docker Compose
docker-compose up -d
# Check status
docker-compose logs -f grants-mcp
# Access at http://localhost:8081
# Build image
docker build -t grants-mcp .
# Run container
docker run -p 8081:8080 \
-e SIMPLER_GRANTS_API_KEY=your_key \
grants-mcp
Add Grants MCP to your Claude Desktop configuration:
{
"mcpServers": {
"grants-mcp": {
"command": "python",
"args": ["/path/to/grants-mcp/src/grants_mcp_server.py"],
"env": {
"SIMPLER_GRANTS_API_KEY": "your_api_key_here"
}
}
}
}
# Test server health
curl http://localhost:8081/health
# Expected response:
# {"status": "healthy", "version": "1.0.0"}
# Test opportunity discovery
curl -X POST http://localhost:8081/tools/opportunity_discovery \
-H "Content-Type: application/json" \
-d '{"query": "climate change"}'
Experience the power of AI-driven grant discovery with real API responses and interactive filtering
Enter search terms above to find relevant grants