MCP ExplorerExplorer

Genkit Mcp Google Maps Sample

@nozomi-koborinaion 10 months ago
2 MIT
FreeCommunity
AI Systems
A sample project integrating Google Maps API with Genkit via MCP.

Overview

What is Genkit Mcp Google Maps Sample

genkit-mcp-google-maps-sample is a sample project that integrates Google Maps API with Genkit, allowing access to Google Maps features through Gemini AI models via the Model Context Protocol (MCP).

Use cases

Use cases include building applications that provide location search, route planning, distance calculations, and integrating geographical information into AI-driven solutions.

How to use

To use genkit-mcp-google-maps-sample, clone the project from GitHub, install the necessary dependencies, set up environment variables for Google API keys, and run the local development server using Genkit Developer UI.

Key features

Key features include geocoding and reverse geocoding, searching for nearby places, retrieving detailed place information, calculating distances and travel times, retrieving elevation data, and getting directions.

Where to use

genkit-mcp-google-maps-sample can be used in various fields such as location-based services, travel applications, logistics, and any application requiring geographical data integration.

Content

genkit-mcp-google-maps-sample

A sample project that integrates Google Maps API with Genkit. Access Google Maps features from Gemini AI models through the Model Context Protocol (MCP).

Google Maps MCP Server

tools dev-ui-trace

Features

This sample provides access to the following Google Maps features:

  • Get coordinates from addresses (maps_geocode)
  • Get addresses from coordinates (maps_reverse_geocode)
  • Search for nearby places (maps_search_places)
  • Get detailed place information (maps_place_details)
  • Calculate distance and travel time between two points (maps_distance_matrix)
  • Retrieve elevation data (maps_elevation)
  • Get directions (maps_directions)

Setup

Requirements

  • Node.js 20 or higher
  • Firebase CLI
  • Genkit CLI
  • Access to a Google Cloud (Firebase) Project
  • Google Maps Platform API key
  • Google AI API key

Installation

# Clone the project
git clone https://github.com/nozomi-koborinai/genkit-mcp-google-maps-sample
cd genkit-mcp-google-maps-sample

# Install dependencies
npm install

# Install development tools
npm install --save-dev genkit-cli@latest

Environment Variables

Set the following secrets in Firebase Secret Manager:

  • GOOGLE_GENAI_API_KEY: Google AI API key
  • GOOGLE_MAPS_API_KEY: Google Maps API key
export GOOGLE_GENAI_API_KEY=your_genai_api_key
export GOOGLE_MAPS_API_KEY=your_maps_api_key

Usage

Local Development

Open Genkit Develoer UI.

npx genkit start -o -- tsx --watch src/index.ts

Deployment

firebase deploy --only functions

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers