beatport-mcp

beatport-mcp

An MCP server that lets Claude search the Beatport catalog and manage your Beatport playlists, including adding tracks to playlists by name.

Category
访问服务器

README

beatport-mcp

An MCP (Model Context Protocol) server that lets Claude search the Beatport catalog and manage your Beatport playlists. Hand Claude a list of track names and say "add these to my Sunset Set playlist" — it resolves each one to a Beatport track and writes them to the playlist for you.

Beatport has no obtainable official API access, so this server uses the same auth workaround as the beets-beatport4 plugin: it borrows the public client_id from Beatport's own /v4/docs/ page and runs a cookie-session authorization_code OAuth flow against your own account.

Disclaimer: This is an unsanctioned workaround in a ToS grey area. Use it for personal, non-commercial purposes on your own account only. It can break without notice whenever Beatport changes their docs page or API.

Use cases

  • Tracklist → playlist. Paste a tracklist from 1001Tracklists, a radio show, a festival set, or a screenshot, and have Claude rebuild it as a Beatport playlist ready to buy from.
  • Migrate playlists from other platforms. Export a Spotify/Apple Music playlist (or a rekordbox collection) as text and let Claude re-match every track on Beatport.
  • Set prep with BPM/key data. Search results include BPM and musical key, so you can ask for things like "find these tracks and add the ones between 122–126 BPM, prefer extended mixes" — useful for harmonic mixing prep.
  • Digging assistant. "Search Beatport for the new remixes of X and stage anything interesting in my 'To Review' playlist" — Claude searches, filters, and files them.
  • Crate building by brief. Describe a vibe ("peak-time melodic techno, 128–132"), let Claude propose tracks it knows, verify each exists on Beatport, and build the playlist in one conversation.

Tools

Tool Description
whoami Returns the authenticated account. Auth smoke test.
search_tracks Search the catalog. Returns id, title, mix, artists, BPM, key, release per match.
list_playlists List all your playlists (id, name, track count, visibility).
create_playlist Create a playlist by name.
add_tracks_to_playlist Batch-add tracks (by id) to a playlist (by id).

Tools are deliberately atomic — the "list of songs → playlist" orchestration happens in the model at runtime: it searches each line, picks the best match, then makes one add call.

Requirements

  • Bun ≥ 1.0 (curl -fsSL https://bun.sh/install | bash)
  • A Beatport account (username + password)
  • Claude Code or Claude Desktop (or any other MCP client)

Install

git clone https://github.com/BadWasabeee/beatport-mcp.git
cd beatport-mcp
bun install
cp .env.example .env   # then edit .env with your Beatport credentials

.env lives in the project root and is read by the server itself, so your credentials never need to appear in any MCP client config:

BEATPORT_USERNAME=you@example.com
BEATPORT_PASSWORD=your-password

Verify it works

bun run smoke "Bicep Glue"

Expected output: your account name, then five candidate tracks with BPM and key. This exercises the full auth flow plus catalog search.

Register with Claude

Claude Code:

claude mcp add --scope user beatport -- bun run /ABSOLUTE/PATH/TO/beatport-mcp/src/index.ts

Claude Desktop — add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "beatport": {
      "command": "/ABSOLUTE/PATH/TO/bun",
      "args": ["run", "/ABSOLUTE/PATH/TO/beatport-mcp/src/index.ts"]
    }
  }
}

Use the absolute path to bun (which bun) — Claude Desktop doesn't inherit your shell's PATH. Fully quit and relaunch Claude Desktop afterwards, then start a new conversation.

Local MCP servers only work in clients running on the same machine (Claude Code, Claude Desktop). They are not reachable from claude.ai in a web browser or the mobile apps.

Usage

In a fresh Claude session:

Add these to my Sunset Set playlist: Bicep — Glue, Charlotte de Witte — Doppler, Overmono — So U Kno

Claude will search each track, pick the best match (asking you when it's ambiguous), and batch-add them. If the playlist doesn't exist, ask it to create one first.

How auth works

  1. Scrapes the public client_id from the script bundles on api.beatport.com/v4/docs/ (override with BEATPORT_CLIENT_ID if the scrape breaks).
  2. POST /auth/login/ with your credentials establishes a cookie session.
  3. GET /auth/o/authorize/ with those cookies yields an authorization code.
  4. POST /auth/o/token/ exchanges the code for access + refresh tokens.

Tokens persist to ~/.beatport-mcp/token.json (chmod 600, override the path with BEATPORT_TOKEN_PATH) and refresh automatically on expiry, falling back to a full re-login if the refresh is rejected. Credentials and tokens are never logged.

Troubleshooting

  • "BEATPORT_USERNAME and BEATPORT_PASSWORD must be set" — no .env in the project root and no env vars passed by the MCP client.
  • "Beatport login failed (HTTP 4xx)" — wrong credentials, or Beatport is challenging the login (try logging into the website once, then retry).
  • "API_CLIENT_ID not found in any /docs/ script bundle" — Beatport changed their docs page. Find the new client id (DevTools → Network on the docs page) and set BEATPORT_CLIENT_ID in .env.
  • Stale auth weirdness — delete ~/.beatport-mcp/token.json; the next call re-runs the full flow.

Development

bun run start        # start the stdio MCP server
bun run smoke [q]    # auth smoke test + optional catalog search
bunx tsc --noEmit    # typecheck
  • src/auth.ts — OAuth flow, token persistence/refresh
  • src/client.ts — Beatport API client (search, playlists)
  • src/index.ts — MCP server and tool definitions
  • src/smoke.ts — standalone CLI check, no MCP client needed

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选