Google Services MCP Server
Enables interaction with multiple Google services including Maps, Finance, Flights, Gmail, and Calendar through a unified interface. Provides comprehensive access to geocoding, stock data, flight information, email management, and calendar operations.
README
Google MCP Server
A comprehensive Model Context Protocol (MCP) server that provides access to Google services including Maps, Finance, Flights, Gmail, and Calendar through a unified API.
Features
🗺️ Google Maps & Places
- Geocoding: Convert addresses to coordinates and vice versa
- Places Search: Find businesses, landmarks, and points of interest
- Directions: Get turn-by-turn directions between locations
- Distance Matrix: Calculate travel time and distance between multiple points
- Place Details: Get detailed information about specific places
📈 Google Finance
- Stock Search: Search for stocks, indices, mutual funds, currencies, and futures
- Market Data: Get current prices, movement, and market information
- Financial News: Access top financial news related to securities
✈️ Google Flights
- Airport Search: Find flights and airport information
- Flight Pricing: Get flight prices and insights
- Multi-city Trips: Support for complex multi-destination journeys
📧 Gmail
- Send Emails: Send emails with subject, body, CC, and BCC
- Read Emails: List and search emails with Gmail query syntax
- Email Details: Get full email content by message ID
- Label Management: Access Gmail labels and organization
📅 Google Calendar
- Event Management: Create, read, update, and delete calendar events
- Multi-Calendar Support: Work with multiple calendars (Personal, Work, Travel)
- Event Listing: List events with filters and date ranges
- Calendar Management: List and access different calendars
Installation
Prerequisites
- Node.js 18+
- pnpm (recommended) or npm
Setup
-
Clone the repository:
git clone <repository-url> cd google-mcp -
Install dependencies:
pnpm install -
Build the project:
pnpm run build
MCP Client Integration
Install the server to your preferred MCP clients:
# Install to all MCP clients
pnpm run install-server
# Install to specific clients
pnpm run install-desktop # Claude Desktop
pnpm run install-cursor # Cursor IDE
pnpm run install-code # Claude Code
pnpm run install-mcp # Local .mcp.json only
Configuration
Environment Variables
Create a .env.local file in the project root with your Google API credentials:
GOOGLE_MAPS_API_KEY=your_google_maps_api_key
GOOGLE_CLIENT_ID=your_oauth_client_id
GOOGLE_CLIENT_SECRET=your_oauth_client_secret
GOOGLE_REFRESH_TOKEN=your_refresh_token
Google API Setup
- Google Maps API: Enable Maps, Places, and Directions APIs in Google Cloud Console
- Gmail/Calendar: Set up OAuth 2.0 credentials and obtain refresh tokens
- Finance/Flights: Uses Google's public APIs (no additional setup required)
Usage
Running the Server
# Start the compiled server
pnpm start
# Or run in development mode
node dist/index.js
Available Tools
Maps & Places
geocode- Convert address to coordinatesreverse-geocode- Convert coordinates to addressplaces-search- Search for places by text queryget-directions- Get directions between locationsdistance-matrix- Calculate distances between multiple pointsplace-details- Get detailed place information
Finance
finance-search- Search stocks, currencies, and financial instruments
Flights
airports-search- Search flights and airport information
Gmail
gmail-send-email- Send emailsgmail-read-emails- List/search emailsgmail-get-email- Get specific email by IDgmail-get-labels- List Gmail labels
Calendar
calendar-create-event- Create new eventscalendar-list-events- List events with filterscalendar-get-event- Get specific event detailscalendar-update-event- Update existing eventscalendar-delete-event- Delete eventscalendar-list-calendars- List available calendars
Development
Project Structure
src/
├── index.ts # Main MCP server implementation
├── maps.ts # Google Maps & Places functionality
├── finance.ts # Google Finance integration
├── airports.ts # Google Flights integration
├── gmail.ts # Gmail API integration
└── calendar.ts # Google Calendar integration
scripts/
└── update-config.js # MCP client configuration installer
dist/ # Compiled JavaScript output
Key Technologies
- MCP SDK:
@modelcontextprotocol/sdkfor protocol implementation - Schema Validation: Zod for runtime type checking
- Google APIs: Official Google client libraries
- TypeScript: Full type safety with ES2022 target
- Transport: StdioServerTransport for MCP communication
Development Workflow
- Make changes to TypeScript files in
src/ - Build:
pnpm run build - Test:
pnpm start - Install to clients:
pnpm run install-server - Restart MCP clients to load changes
Adding New Tools
- Define Zod schema for parameters
- Implement handler function
- Register tool in
src/index.tsusingserver.tool() - Build and reinstall to test
Architecture
This MCP server follows these design patterns:
- Modular Design: Each Google service is in its own module
- Schema Validation: All parameters validated with Zod schemas
- Error Handling: Comprehensive error handling with meaningful messages
- Type Safety: Full TypeScript coverage with strict mode
- Transport Agnostic: Uses MCP's standard transport layer
License
[License information]
Contributing
[Contribution guidelines]
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。