mochow13/ticketmaster-mcp-server
If you are the rightful owner of ticketmaster-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Ticketmaster MCP Server is a Model Context Protocol server that integrates with the Ticketmaster Discovery API to provide AI assistants with access to a vast database of entertainment events and venues.
Ticketmaster MCP Server
A Model Context Protocol (MCP) server that provides tools to search for events, venues, and attractions using the Ticketmaster Discovery API. This server enables AI assistants to access Ticketmaster's extensive database of entertainment events and venues.
Features
- Event Search: Find upcoming events by keyword, date range, location, and more
- Venue Search: Discover venues by name, location, or specific criteria
- Attraction Search: Search for artists, sports teams, and other attractions
- Comprehensive Filtering: Filter results by date, location, venue, attraction, and classification
- MCP Compatible: Fully compliant with the Model Context Protocol specification
- HTTP Transport: Uses streamable HTTP transport for real-time communication
Architecture
This project consists of two main components:
Server (/server
)
- MCP Server: Implements the Model Context Protocol server using
@modelcontextprotocol/sdk
- Ticketmaster Integration: Custom client for the Ticketmaster Discovery API
- HTTP Transport: Express.js server with streamable HTTP transport
- TypeScript: Fully typed implementation with comprehensive error handling
Client (/client
)
- MCP Client: Example client implementation using
@modelcontextprotocol/sdk
- AI Integration: Uses Google's Gemini AI model for natural language queries
- Interactive Chat: Command-line interface with conversation history
- Function Calling: Demonstrates AI-powered tool usage
Installation
Prerequisites
- Node.js 16.0.0 or higher
- npm or yarn package manager
- Ticketmaster API key (get one from Ticketmaster Developer Portal)
- Google Gemini API key (for client example)
Server Setup
- Navigate to the server directory:
cd server
- Install dependencies:
npm install
- Build the project:
npm run build
- Start the server:
node build/index.js
The server will start on port 3000 by default.
Note: As of the latest version, the TicketMaster API key is now passed from the client to the server, so no environment variables are required for the server.
Client Setup (Optional)
- Navigate to the client directory:
cd client
- Install dependencies:
npm install
- Build the client:
npm run build
- Set up environment variables:
export GEMINI_API_KEY="your_gemini_api_key_here"
export TICKETMASTER_API_KEY="your_ticketmaster_api_key_here"
- Run the client:
node build/index.js
Docker Deployment
You can also run the server using Docker:
docker build -t ticketmaster-mcp-server .
docker run -p 3000:3000 ticketmaster-mcp-server
Note: No environment variables are needed for the server as API keys are now passed from the client.
API Usage
Available Tools
search_ticketmaster
Search for events, venues, or attractions on Ticketmaster.
Parameters:
type
(required): Type of search -"event"
,"venue"
, or"attraction"
keyword
(optional): Search keyword or termstartDate
(optional): Start date in YYYY-MM-DD formatendDate
(optional): End date in YYYY-MM-DD formatcity
(optional): City namestateCode
(optional): State code (e.g., "NY", "CA")countryCode
(optional): Country code (e.g., "US", "CA")venueId
(optional): Specific venue ID to searchattractionId
(optional): Specific attraction ID to searchclassificationName
(optional): Event classification/category (e.g., "Sports", "Music")
Example Usage
Search for Events
{
"type": "event",
"keyword": "Taylor Swift",
"city": "New York",
"stateCode": "NY",
"startDate": "2024-01-01",
"endDate": "2024-12-31"
}
Search for Venues
{
"type": "venue",
"keyword": "Madison Square Garden",
"city": "New York"
}
Search for Attractions
{
"type": "attraction",
"keyword": "Lakers",
"classificationName": "Sports"
}
Response Format
The server returns structured data including:
Events
- Event ID, name, and URL
- Date and time information
- Price ranges
- Venue and attraction details
- Images and multimedia content
Venues
- Venue ID, name, and address
- Location coordinates
- City, state, and country information
- Capacity and facility details
Attractions
- Attraction ID and name
- Classification (genre, segment)
- Images and promotional content
- Associated events and venues
Configuration
Environment Variables
Server:
PORT
: Server port (default: 3000)
Client:
TICKETMASTER_API_KEY
: Required for client operation (passed to server)GEMINI_API_KEY
: Required for client example
Smithery Configuration
The project includes a smithery.yaml
file for MCP server configuration:
startCommand:
type: http
configSchema:
type: object
properties: {}
exampleConfig: {}
Development
Project Structure
ticketmaster-mcp-server/
āāā server/ # MCP Server implementation
ā āāā src/
ā ā āāā index.ts # Express server entry point
ā ā āāā server.ts # MCP server implementation
ā ā āāā ticketmaster/ # Ticketmaster API integration
ā ā āāā client.ts # API client
ā ā āāā tools.ts # Tool definitions
ā ā āāā types.ts # Type definitions
ā ā āāā formatter.ts # Response formatting
ā āāā package.json
ā āāā tsconfig.json
āāā client/ # Example MCP client
ā āāā index.ts # Client implementation
ā āāā package.json
ā āāā tsconfig.json
āāā Dockerfile # Docker configuration
āāā smithery.yaml # MCP configuration
āāā README.md # This file
Building from Source
- Clone the repository:
git clone https://github.com/mochow13/ticketmaster-mcp-server.git
cd ticketmaster-mcp-server
- Build the server:
cd server
npm install
npm run build
- Build the client (optional):
cd ../client
npm install
npm run build
Key Dependencies
Server:
@modelcontextprotocol/sdk
: MCP protocol implementationaxios
: HTTP client for Ticketmaster APIexpress
: Web server frameworktypescript
: Type-safe JavaScript
Client:
@modelcontextprotocol/sdk
: MCP client implementation@google/genai
: Google Gemini AI integrationdotenv
: Environment variable management
Error Handling
The server includes comprehensive error handling:
- API Errors: Proper handling of Ticketmaster API errors with detailed messages
- Validation: Input parameter validation and type checking
- Network Issues: Retry logic and timeout handling
- Authentication: Clear error messages for missing or invalid API keys
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature-name
- Make your changes and add tests
- Ensure TypeScript compilation:
npm run build
- Submit a pull request
License
ISC License - see package.json files for details.
Support
For issues related to:
- Ticketmaster API: Check the Ticketmaster Developer Documentation
- MCP Protocol: Visit the Model Context Protocol Documentation
- This Project: Open an issue in the GitHub repository
Changelog
v1.1.0
- BREAKING CHANGE: API key architecture changed - TicketMaster API key now passed from client to server
- Updated tool schema to include
apiKey
as required parameter - Removed server environment variable dependency for TicketMaster API key
- Enhanced security by allowing per-request API key specification
- Updated documentation and examples to reflect new architecture
v1.0.0
- Initial release
- Event, venue, and attraction search functionality
- HTTP transport implementation
- Docker support
- Example client with Google Gemini integration