Metadata-Version: 2.4
Name: mcp-server-bugpk-music
Version: 0.1.1
Summary: MCP server that wraps the BugPk music aggregation API (QQ Music / NetEase) for song resolution.
Author: Ocean Li
License-Expression: MIT
Keywords: mcp,music,qqmusic,netease,bugpk,model-context-protocol
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: mcp<2,>=1.2
Requires-Dist: requests>=2.32

# mcp-server-bugpk-music

A [Model Context Protocol](https://modelcontextprotocol.io) server that wraps the
[BugPk music aggregation API](https://api.bugpk.com/doc-music.html), exposing song
resolution (direct audio URL, cover, lyrics) as MCP tools for AI agents.

Supports **QQ Music** (`tencent`) and **NetEase Cloud Music** (`netease`).

## Tools

| Tool | Description |
|------|-------------|
| `resolve_music(id, media, type)` | Core resolver. Returns name / url / cover / author / lyrics |
| `resolve_song(id, media)` | Structured song fields only |
| `fetch_lyrics(id, media)` | LRC lyrics only |

- `id`: QQ Music uses the `songmid`/`media_mid` (e.g. `0039MnYb0qxYhV`); NetEase uses the numeric song id.
- `media`: `tencent` | `netease`
- `type`: `song` | `mv` | `url`

## Install & run

```bash
pip install mcp-server-bugpk-music
# or from source:
pip install -e .
```

```bash
# stdio (default) — what imcp.pro / Claude etc. use as a command
bugpk-music

# Streamable HTTP (self-host)
bugpk-music --transport http --port 8080
```

## Client config example

```json
{
  "mcpServers": {
    "bugpk-music": {
      "command": "uvx",
      "args": ["mcp-server-bugpk-music"]
    }
  }
}
```

## Notes

- The BugPk aggregator depends on the upstream QQ / NetEase services. When its
  upstream is unstable it may return `{"error":"API返回非JSON格式数据"}`; the server
  passes that through transparently instead of crashing.
- When a song id is not found it returns `{"code":0,"msg":"未找到对应数据"}`.

## License

MIT
