Grant Hunter MCP
Auto-drafts personalized emails to grant officers with funding pitch content.
Automatically creates calendar events for grant application deadlines.
Generates AI-powered funding pitches using Gemini 2.0 Flash model with a structured triple-horizon framework for grant applications.
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., "@Grant Hunter MCPfind grants for AI healthcare startups and draft a pitch"
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.
Grant Hunter MCP
Grant Hunter MCP is a FastAPI-based Model Context Protocol (MCP) service for grant discovery and pitch drafting.
Repository Role
This repository contains the public MCP server layer of the Grant Hunter product. It exposes HTTP endpoints that any MCP-compatible client can call to search for grants, generate pitches, and interact with Google Workspace.
The private product layer—user-facing UI, workflow orchestration, and end-user authentication—lives in a separate private repository. This public repo exists so that external developers and MCP clients can integrate with the server independently.
For a visual overview of how the public MCP server relates to the broader product, see the architecture diagram in TECHNICAL.md.
Non-Goals
The following are not part of this repository:
User-facing UI or frontend components
End-to-end product workflows spanning the private product layer
User account management, billing, or tenancy logic
Full OAuth2 token lifecycle service
Kubernetes/Helm deployment templates
Any private product business logic not directly tied to MCP endpoints
Verified Capabilities
POST /query_grantsSearches Grants.gov by keyword.
Uses async
httpxcall path with retry/backoff.Applies optional
focus_areafiltering over returned opportunities.Deduplicates by opportunity number.
Sorts by close date.
Falls back to mock grants if upstream lookup fails, with response metadata (
fallback_used,data_source).
POST /generate_pitchGenerates a draft pitch using Gemini (
gemini-2.0-flashthengemini-2.0-flash-lite).Falls back to a deterministic template when generation fails or no API key is set.
POST /manage_google_servicesCreates a Gmail draft and a Calendar event from request inputs.
Returns a typed response contract (
GoogleServicesOutput).Supports optional server-side OAuth access token refresh when
refresh_token,client_id, andclient_secretare provided.Supports
oauth_session_idto use persisted server-side OAuth credentials.
POST /oauth_sessionsPersists OAuth credentials server-side and returns a
session_id.
DELETE /oauth_sessions/{session_id}Deletes a persisted OAuth session.
Supports
DEMO_MODE=TRUEto simulate success.
GET /healthBasic health endpoint.
Request observability
Adds
x-request-idcorrelation header to every response.Emits structured request completion logs and external Grants.gov call timing logs.
Current Limitations
Partial async migration:
Grants lookup is async.
Google API SDK calls are sync and currently executed via route-level thread offload.
Contract drift:
focus_areais now applied as a simple substring filter; advanced semantic filtering is not implemented yet.
OAuth lifecycle:
Access-token-only mode is still supported.
Server-side refresh is now supported per request when refresh credentials are provided.
Persisted session storage is SQLite-backed and intended for backend service use.
Encryption-at-rest and external secret-manager integration are not implemented yet.
Date safety:
Deadline dates are now validated; accepted formats are
%B %d, %Yor%Y-%m-%d.
Delivery posture:
Test suite and CI are planned but not yet implemented.
Docker usage is documented as roadmap; no Dockerfile is currently present in this repository.
Architecture Docs
TECHNICAL.md: current architecture and component behavior.
ARCHITECTURE_REVIEW.md: structured architecture review, risk matrix, and remediation backlog.
TODO.md: prioritized roadmap and issue-linked backlog.
Setup (Local)
Prerequisites
Python 3.11+
Gemini API key for AI pitch generation
Install
pip install -r requirements.txtConfigure
cp .env.example .envSet at least:
GEMINI_API_KEY(required for live AI generation)
Optional:
MCP_SERVER_URLLOG_LEVELDEMO_MODE
Run
uvicorn main:app --reload --host 0.0.0.0 --port 8000Docs:
http://localhost:8000/docs
API Reference
GET /health
Returns service health status.
POST /query_grants
Request:
{
"keyword": "clean energy",
"max_results": 20,
"focus_area": "renewable energy"
}Response includes:
fallback_used:truewhen fallback data is useddata_source:grants_govormock_fallbackIf
focus_areais provided, results are filtered by matching text in grant title/description/category/agency.
POST /generate_pitch
Request:
{
"startup_name": "CleanTech Solutions",
"focus_area": "Renewable Energy",
"grant_title": "Clean Energy Innovation Grant"
}POST /manage_google_services
Request:
{
"grant_title": "Clean Energy Innovation Grant",
"deadline_date": "December 15, 2025",
"oauth_token": "oauth_access_token",
"refresh_token": "optional_refresh_token",
"client_id": "optional_client_id",
"client_secret": "optional_client_secret",
"token_uri": "https://oauth2.googleapis.com/token"
}Or session-based request:
{
"grant_title": "Clean Energy Innovation Grant",
"deadline_date": "December 15, 2025",
"oauth_session_id": "session_id_from_oauth_sessions"
}Error Contract
Error responses are standardized with:
{
"code": "MACHINE_READABLE_CODE",
"message": "Human readable message",
"details": { "optional": "context" }
}Issue Automation
The repository includes automatic TODO issue creation:
Workflow:
.github/workflows/create-todo-issues.ymlScript:
scripts/create_todo_issues.py
Run manually via GitHub Actions workflow_dispatch or on push to main when TODO/script changes.
Security Notes
Never commit
.env.Avoid logging tokens or generated sensitive content.
Input validation is enforced through Pydantic models.
Contributing
See CONTRIBUTING.md for the full contribution guide, including expected PR types, non-goals, and code style notes.
Quick checklist:
Review
TODO.mdandARCHITECTURE_REVIEW.md.Keep behavior and docs in sync.
Add tests for new behavior whenever possible.
Do not commit secrets.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/vitor-giacomelli/mcp-grant-hunter'
If you have feedback or need assistance with the MCP directory API, please join our Discord server