Transit Agent
This guide demonstrates how to build an Agentic AI system using Google's Agent Development Kit (ADK) and the Model Context Protocol (MCP).
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
Maintainer
Works with
Installation
Manual Installation
npx transit-agentConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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.comObtain 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.
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-agentSet 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"' > .envBuild 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 --buildAccess 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.
Transit Agent Alternatives — Similar Coding Agents Servers
Looking for alternatives to Transit Agent? Here are other popular coding agents servers you can use with Claude, Cursor, and VS Code.
Dify
★ 142.2kProduction-ready platform for agentic workflow development.
Ruflo
★ 54.0k🌊 The leading agent orchestration platform for Claude. Deploy intelligent multi-agent swarms, coordinate autonomous workflows, and build conversational AI systems. Features enterprise-grade architecture, self-learning swarm intelligence, RAG integrat
Goose
★ 45.7kan open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
Antigravity Awesome Skills
★ 38.3kInstallable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.
AgentScope
★ 25.5kBuild and run agents you can see, understand and trust.
Serena
★ 24.5kA coding agent toolkit that provides IDE-like semantic code retrieval and editing tools, enabling LLMs to efficiently navigate and modify codebases using symbol-level operations instead of basic file reading and string replacements.
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.
Set Up Transit Agent in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.