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.
- 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
This project consists of two main components:
- 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
- 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
- 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)
- 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.
- 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
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.
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")
{
"type": "event",
"keyword": "Taylor Swift",
"city": "New York",
"stateCode": "NY",
"startDate": "2024-01-01",
"endDate": "2024-12-31"
}
{
"type": "venue",
"keyword": "Madison Square Garden",
"city": "New York"
}
{
"type": "attraction",
"keyword": "Lakers",
"classificationName": "Sports"
}
The server returns structured data including:
- Event ID, name, and URL
- Date and time information
- Price ranges
- Venue and attraction details
- Images and multimedia content
- Venue ID, name, and address
- Location coordinates
- City, state, and country information
- Capacity and facility details
- Attraction ID and name
- Classification (genre, segment)
- Images and promotional content
- Associated events and venues
Server:
PORT
: Server port (default: 3000)
Client:
TICKETMASTER_API_KEY
: Required for client operation (passed to server)GEMINI_API_KEY
: Required for client example
The project includes a smithery.yaml
file for MCP server configuration:
startCommand:
type: http
configSchema:
type: object
properties: {}
exampleConfig: {}
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
- 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
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
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
- 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
ISC License - see package.json files for details.
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
- 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
- Initial release
- Event, venue, and attraction search functionality
- HTTP transport implementation
- Docker support
- Example client with Google Gemini integration