Fastmcp Quickstart 20251023 Yan1
FastMCP quickstart example - ready to deploy!
Ask AI about Fastmcp Quickstart 20251023 Yan1
Powered by Claude Β· Grounded in docs
I know everything about Fastmcp Quickstart 20251023 Yan1. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Google Ads MCP Server
Enterprise-grade Google Ads API access via FastMCP with zero-configuration OAuth.
π Quick Start (3 Steps)
1. Install Dependencies
pip install -r requirements.txt
2. Set Environment Variables
export GOOGLE_OAUTH_CLIENT_ID="your-id.apps.googleusercontent.com"
export GOOGLE_OAUTH_CLIENT_SECRET="GOCSPX-your-secret"
export GOOGLE_ADS_DEVELOPER_TOKEN="your-developer-token"
export RENDER_EXTERNAL_URL="http://localhost:7070"
3. Run Server
python googleads_final.py
Test it:
python example_client.py
Browser will open for Google sign-in. After authentication, your Google Ads accounts will be displayed!
β¨ Features
- β
Zero-Config OAuth - Just pass
auth="oauth"to connect - β Automatic Token Refresh - Never worry about expired tokens
- β Enterprise Security - FastMCP's battle-tested authentication
- β Claude Desktop Ready - One-line configuration
- β Python Client - Simple async API access
π Usage
Python Client
from fastmcp import Client
async with Client("http://localhost:7070/mcp", auth="oauth") as client:
accounts = await client.call_tool("list_accessible_accounts")
print(accounts)
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"google-ads": {
"url": "http://localhost:7070/mcp",
"auth": "oauth"
}
}
}
π οΈ Available Tools
list_accessible_accounts()- List all accessible Google Ads accountsget_account_summary(customer_id, days=30)- Get performance metricsget_campaigns(customer_id, days=30, limit=100)- Get campaignsget_keywords(customer_id, campaign_id?, days=30, limit=100)- Get keywords
π Documentation
- Deployment Guide - Complete deployment instructions
- Authentication Guide - FastMCP auth explained
- Implementation Summary - Architecture overview
π Security
This server uses FastMCP's enterprise-grade authentication:
- β Persistent token storage with encryption
- β Automatic token refresh
- β Full OIDC compliance
- β Comprehensive error handling
- β Production-ready security
Same system used by major corporations for OAuth authentication.
π― Why FastMCP?
| Feature | Manual OAuth | FastMCP |
|---|---|---|
| Setup | 100+ lines | 2 lines |
| Token Refresh | Manual | Automatic |
| Client Config | Complex JSON | auth="oauth" |
| Security Audit | Required | Pre-audited |
| Production Ready | Testing needed | Battle-tested |
π Troubleshooting
"redirect_uri_mismatch"
β Add http://localhost:7070/auth/callback to Google Cloud Console
"Not authenticated"
β Delete ~/.fastmcp/tokens/ and re-run
"Invalid developer token" β Check token is approved in Google Ads API Center
π Learn More
- FastMCP: https://gofastmcp.com/
- Google Ads API: https://developers.google.com/google-ads/api
- MCP Protocol: https://modelcontextprotocol.io/
π Ready to Deploy?
See DEPLOYMENT_GUIDE.md for production deployment instructions.
Questions? Open an issue or check the FastMCP documentation.
