mcp-emtrafesa
Health Uyari
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 8 GitHub stars
Code Uyari
- network request — Outbound network request in src/infrastructure/http/emtrafesa-http.repository.ts
Permissions Gecti
- Permissions — No dangerous permissions requested
This server provides an MCP interface to access Peru's Emtrafesa bus transportation system. It allows AI assistants to query bus terminals, check schedules, look up purchased tickets, and retrieve travel FAQs.
Security Assessment
The overall risk is Low. The tool makes outbound network requests to the Emtrafesa API, which is expected given its purpose of fetching live bus schedules and ticket data. Because it accepts passenger identifiers like DNI (a national ID) and email to look up tickets, it handles personally identifiable information (PII). However, the rule-based scan found no hardcoded secrets, no requests for dangerous local permissions, and no execution of shell commands. Your sensitive search data goes directly to the bus company's servers rather than being stored locally by the tool.
Quality Assessment
The project is actively maintained, with its most recent code push occurring today. It uses standard, reliable technologies like TypeScript and Bun, and features automated CI and Codecov integrations, indicating good development practices. It is fully licensed under the permissive MIT license. However, it has low community visibility. With only 8 stars on GitHub, the tool has not been widely tested or reviewed by the broader open-source community, meaning you are relying heavily on the primary developer's code quality.
Verdict
Safe to use, but keep in mind that it handles PII and has not been broadly reviewed by the community.
A Model Context Protocol (MCP) server for accessing Emtrafesa bus transportation services in Peru
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.json - Windows:
%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 install
Then 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-terminals |
Get all bus terminals in Peru | None |
get-arrival-terminals |
Get destination terminals for a given origin | departureTerminalId |
get-departure-schedules |
Get schedules between two terminals | departureTerminalId, arrivalTerminalId, date? |
get-latest-purchased-tickets |
Search your purchased tickets | DNI, email |
get-ticket-pdf |
Download your ticket as a PDF file | ticketCode |
get-frequently-asked-questions |
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 [email protected]"
- "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.json
Development
# Format code
bun run format
# Check formatting
bunx biome check
Contributing
- 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
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi