Transit Agent

v1.0.0Coding Agentsstable

This guide demonstrates how to build an Agentic AI system using Google's Agent Development Kit (ADK) and the Model Context Protocol (MCP).

transit-agentmcpai-integration
Share:
79
Stars
0
Downloads
0
Weekly
0/5

What is Transit Agent?

Transit Agent is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to this guide demonstrates how to build an agentic ai system using google's agent development kit (adk) and the model context protocol (mcp).

This guide demonstrates how to build an Agentic AI system using Google's Agent Development Kit (ADK) and the Model Context Protocol (MCP).

This server falls under the Coding Agents category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • This guide demonstrates how to build an Agentic AI system us

Use Cases

Build agentic AI systems using Google's Agent Development Kit.
ruby-verma

Maintainer

LicenseApache-2.0
Languagepython
Versionv1.0.0
UpdatedMay 13, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx transit-agent

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Transit Agent

Transit Agent is a reference implementation of an autonomous agentic AI system built with Google's Agent Development Kit (ADK) and the Model Context Protocol, demonstrating how to orchestrate a ReAct reasoning loop with Gemini as the intelligence layer and FastMCP as the tool server. The project models a transit customer service scenario where the agent autonomously fetches live delay data, reads business refund policies, and executes transactional workflows — serving the result through a web UI. Developers and AI engineers use it as a learning scaffold for building deterministic, multi-tool agentic systems on Google Cloud.

Prerequisites

  • A Google Cloud project with billing enabled
  • Vertex AI API and Generative Language API enabled in Google Cloud Console
  • A Google Gemini API key from Google AI Studio (https://aistudio.google.com/api-keys)
  • Docker and Docker Compose installed
  • Google Cloud Shell or a local environment with gcloud CLI configured
1

Create a Google Cloud project and enable required APIs

Create a new Google Cloud project in the Cloud Console, enable billing, and activate the two required APIs: Vertex AI and Generative Language.

gcloud services enable aiplatform.googleapis.com generativelanguage.googleapis.com
2

Obtain a Gemini API key

Visit Google AI Studio at aistudio.google.com/api-keys, sign in with your Google account, and generate a new API key. Copy and save this key — it is the single required credential.

3

Clone the repository

Clone the transit-agent repository to your local machine or Google Cloud Shell.

git clone https://github.com/ruby-verma/transit-agent.git
cd transit-agent
4

Set the GOOGLE_API_KEY environment variable

Create a .env file in the project root with your Gemini API key. Docker Compose will load this automatically.

echo 'GOOGLE_API_KEY="YOUR_GEMINI_API_KEY"' > .env
5

Build and launch with Docker Compose

Build the Docker images and start all services. The web UI will be available on port 8000.

docker compose up --build
6

Access the Transit Agent web UI

Open a browser to http://localhost:8000 (or use the Cloud Shell web preview on port 8000). Interact with the agent through the UI — it will autonomously call MCP tools to fetch transit data and apply refund policies.

Transit Agent Examples

Client configuration

The Transit Agent runs as a standalone Docker application with its own MCP server (transit_server.py via FastMCP). The MCP connection is internal to the Docker Compose stack. The single required credential is the Gemini API key.

{
  "mcpServers": {
    "transit-agent": {
      "command": "npx",
      "args": ["transit-agent"],
      "env": {
        "GOOGLE_API_KEY": "your-gemini-api-key"
      }
    }
  }
}

Prompts to try

Interact with the transit agent through its web UI to trigger autonomous tool use.

- "What are the current delays on the main transit line?"
- "I missed my bus due to a delay, can I get a refund?"
- "What is the refund policy for service disruptions?"
- "Process a refund for ticket #TR-20241201-0042 due to a 45-minute delay"

Troubleshooting Transit Agent

Docker Compose build fails with dependency errors

Ensure Docker Desktop is running and up to date. Try 'docker compose down --volumes' to clear cached state, then re-run 'docker compose up --build'. Check that your internet connection can reach PyPI for pip package downloads.

Agent returns 'API key not valid' or Gemini authentication errors

Verify the .env file contains GOOGLE_API_KEY with a valid key from aistudio.google.com/api-keys. Ensure there are no trailing spaces or quote issues: the file should contain exactly: GOOGLE_API_KEY="your-key". Restart Docker Compose after updating .env.

Web UI on port 8000 is not accessible

In Google Cloud Shell, use the web preview button (port 8000) rather than typing localhost. Locally, confirm Docker is mapping the port with 'docker compose ps'. If another process uses port 8000, edit docker-compose.yml to change the host port mapping.

Frequently Asked Questions about Transit Agent

What is Transit Agent?

Transit Agent is a Model Context Protocol (MCP) server that this guide demonstrates how to build an agentic ai system using google's agent development kit (adk) and the model context protocol (mcp). It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Transit Agent?

Follow the installation instructions on the Transit Agent GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Transit Agent?

Transit Agent works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Transit Agent free to use?

Yes, Transit Agent is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.

Browse More Coding Agents MCP Servers

Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "transit-agent": { "command": "npx", "args": ["-y", "transit-agent"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Transit Agent?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides