mcp-emtrafesa
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-emtrafesaWhat terminals does Emtrafesa have?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Emtrafesa
A Model Context Protocol (MCP) server for accessing Emtrafesa bus transportation services in Peru
English: README.md (You are here)
Español: README.es.md
MCP Emtrafesa is a Model Context Protocol server that provides AI assistants with seamless access to Peru's Emtrafesa bus transportation system. Query terminals, schedules, tickets, and FAQs through standardized MCP tools.
What can you do with this MCP?
Find bus terminals across Peru
Check schedules between any two cities
Look up your purchased tickets using your DNI and email
Download your ticket as PDF for printing or sharing
Get answers to frequently asked questions
Quick Start
Option 1: Claude Desktop (Recommended)
Open your Claude Desktop configuration file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add the following entry:
{
"mcpServers": {
"mcp-emtrafesa": {
"command": "npx",
"args": ["mcp-emtrafesa@latest"]
}
}
}Restart Claude Desktop. You'll see an MCP indicator in the bottom-right corner of the chat input when the server is connected.
Option 2: Clone and run locally
# Clone the repository
git clone https://github.com/georgegiosue/mcp-emtrafesa.git
cd mcp-emtrafesa
# Install dependencies
bun installThen point your MCP client to the local server:
{
"mcpServers": {
"mcp-emtrafesa": {
"command": "bun",
"args": ["/absolute/path/to/mcp-emtrafesa/src/index.ts"]
}
}
}Tip: Use the MCP Inspector for debugging:
bunx @modelcontextprotocol/inspector bun src/index.ts
Available Tools
Tool | Description | Parameters |
| Get all bus terminals in Peru | None |
| Get destination terminals for a given origin |
|
| Get schedules between two terminals |
|
| Search your purchased tickets |
|
| Download your ticket as a PDF file |
|
| Get FAQs about the service | None |
Usage Examples
Once connected, you can ask Claude naturally:
"What bus terminals does Emtrafesa have?"
"What schedules are available from Chiclayo to Trujillo on 14/07/2025?"
"Look up my tickets with DNI 12345678 and email user@example.com"
"Download the PDF for ticket BP01-123456"
Requirements
Bun v1.2.10+ or Node.js v18+
An MCP-compatible client (Claude Desktop, etc.)
Project Structure
mcp-emtrafesa/
├── src/
│ ├── config/ # API configuration
│ ├── domain/
│ │ ├── models/ # Domain model interfaces
│ │ └── ports/ # Repository interface (contract)
│ ├── infrastructure/
│ │ ├── http/ # HTTP repository implementation
│ │ └── mcp/
│ │ └── tools/
│ │ ├── index.ts # Auto-discovers and registers all tools
│ │ ├── tool.ts # Tool interface + register() helper
│ │ ├── error.ts # Shared errorResponse()
│ │ ├── faq/
│ │ │ └── get-frequently-asked-questions/
│ │ │ ├── constants.ts
│ │ │ └── get-frequently-asked-questions.ts
│ │ ├── schedule/
│ │ │ └── get-departure-schedules/
│ │ │ ├── constants.ts
│ │ │ ├── schema.ts
│ │ │ ├── types.ts
│ │ │ └── get-departure-schedules.ts
│ │ ├── terminal/
│ │ │ ├── get-terminals/
│ │ │ │ ├── constants.ts
│ │ │ │ └── get-terminals.ts
│ │ │ └── get-arrival-terminals/
│ │ │ ├── constants.ts
│ │ │ ├── schema.ts
│ │ │ ├── types.ts
│ │ │ └── get-arrival-terminals.ts
│ │ └── ticket/
│ │ ├── get-latest-purchased-tickets/
│ │ │ ├── constants.ts
│ │ │ ├── schema.ts
│ │ │ ├── types.ts
│ │ │ └── get-latest-purchased-tickets.ts
│ │ └── get-ticket-pdf/
│ │ ├── constants.ts
│ │ ├── schema.ts
│ │ ├── types.ts
│ │ └── get-ticket-pdf.ts
│ ├── shared/ # Shared utilities
│ └── index.ts # MCP server entry point
├── package.json
└── tsconfig.jsonDevelopment
# Format code
bun run format
# Check formatting
bunx biome checkContributing
Fork the repository
Create a feature branch (
git checkout -b feature/new-feature)Format your code (
bun run format)Commit your changes
Open a Pull Request
License
MIT License - see LICENSE for details.
Acknowledgments
Emtrafesa - Transportation API provider
Model Context Protocol - MCP specification
@tecncr - API endpoint insights
Bun - Fast JavaScript runtime
Support
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/georgegiosue/mcp-emtrafesa'
If you have feedback or need assistance with the MCP directory API, please join our Discord server