内容
# MCP Live Events Server
`mcp-live-events` 是一个模型上下文协议(Model Context Protocol, MCP)服务器,集成了 Ticketmaster API,以提供实时事件数据。它允许 AI 代理动态获取音乐会和事件的详细信息。
## 特性
- 🎟️ 集成 Ticketmaster API 以搜索事件
- 🗣️ 格式化 API 响应,以便于 LLM(大语言模型)解释
## 设置
### 先决条件
确保您已安装以下内容:
- [uv](https://github.com/astral-sh/uv)(用于包管理)
- Python 3.13+
- 一个 [Ticketmaster](https://developer.ticketmaster.com/explore/) API 密钥(免费使用,但有速率限制)
### 安装
1. 克隆代码库:
```sh
git clone https://github.com/mmmaaatttttt/mcp-live-events.git
cd mcp-live-events
```
2. 安装依赖:
```sh
uv venv
uv sync
```
3. 设置您的环境变量,即 Ticketmaster API 密钥。可以将其放置在此代码库中的 `.env` 文件中,遵循 `.env.example` 文件的模式,或者可以放置在您 MCP 客户端的此服务器配置的 "env" 部分。
请注意,在 Ticketmaster 开发者门户中,API 密钥被称为 "Consumer Key"。
### 运行服务器
```sh
uv run mcp-live-events
```
如果成功,您应该在终端中看到 `MCP Live Event server is running!` 的输出。
## 资源
- [介绍模型上下文协议](https://www.anthropic.com/news/model-context-protocol)
- [模型上下文协议文档](https://modelcontextprotocol.io/introduction)
- [MCP 服务器演示快速入门](https://modelcontextprotocol.io/quickstart/server)