GitHub - mochow13/ticketmaster-mcp-server: An MCP server for TicketMaster Discovery API implemented in Streamable HTTP transport protocol (original) (raw)

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

Architecture

This project consists of two main components:

Server (/server)

Client (/client)

Installation

Prerequisites

Server Setup

  1. Navigate to the server directory:
  2. Install dependencies:
  3. Build the project:
  4. Start the server:

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)

  1. Navigate to the client directory:
  2. Install dependencies:
  3. Build the client:
  4. Set up environment variables:

export GEMINI_API_KEY="your_gemini_api_key_here" export TICKETMASTER_API_KEY="your_ticketmaster_api_key_here"

  1. Run the client:

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:

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

Venues

Attractions

Configuration

Environment Variables

Server:

Client:

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

  1. Clone the repository:

git clone https://github.com/mochow13/ticketmaster-mcp-server.git cd ticketmaster-mcp-server

  1. Build the server:

cd server npm install npm run build

  1. Build the client (optional):

cd ../client npm install npm run build

Key Dependencies

Server:

Client:

Error Handling

The server includes comprehensive error handling:

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes and add tests
  4. Ensure TypeScript compilation: npm run build
  5. Submit a pull request

License

ISC License - see package.json files for details.

Support

For issues related to:

Changelog

v1.1.0

v1.0.0