Access Audius Music Platform via LLM
An MCP server for the Audius music platform using two meta-tools, search and execute, instead of 100+ individual API tools.
2.0.0Add to Favorites
Why it matters
Integrate with the Audius music platform using an LLM-powered MCP server. Access comprehensive API functionalities for music discovery, streaming, content management, and social interactions.
Outcomes
What it gets done
Search and stream tracks with advanced filtering.
Manage music content including uploads and playlist creation.
Engage with the Audius community through following and commenting.
Analyze trending music and artist data.
Source
Get it from source
Spark does not host a copy of it.
Open sourceReports
Agent outcome reports
No reports yet
Capabilities
Tools your agent gets
Search for tracks with various filters on Audius
Discover what's trending on Audius platform
Find artists similar to the ones you like
Add new tracks to Audius platform
Create collections of tracks on Audius
Subscribe to other users on Audius
Save and show appreciation for music tracks
Add comments to tracks on Audius
Overview
Audius MCP Server
A Code Mode MCP server for the Audius music platform. It replaces a large fixed tool catalog with two meta-tools, search and execute, that discover endpoints and run LLM-written JavaScript in a sandboxed environment against the real Audius API. Use it when an LLM needs to query or act on Audius or Open Audio Protocol on-chain data conversationally; the subgraph tool additionally requires a separate Graph API key.
What it does
This is a "Code Mode" MCP server that gives an LLM access to the Audius music platform and the underlying Open Audio Protocol. Instead of exposing 100+ individual tools for every API endpoint, it compresses the whole Audius API into two meta-tools that fit in about 1,000 tokens of context: search, which discovers API endpoints by tag, path, method, or keyword, and execute, which runs LLM-written JavaScript against the Audius API inside a QuickJS WASM sandbox. The workflow is: the LLM calls search("trending tracks") to discover an endpoint such as GET /tracks/trending, then calls execute("audius.request(...)") to actually run the request in the sandbox and get results back. Two more tools round out the set: play, which opens a track in the Audius desktop app or browser, and subgraph, which queries on-chain protocol data (staking, governance, nodes) through The Graph. The server is built with Effect-TS, with every component implemented as an Effect service (Context.Tag) composed via Layer.
When to use - and when NOT to
Use it when an LLM needs to query or act on Audius data (trending tracks, user search, track metadata, plays) or on-chain Open Audio Protocol data (staking, governance, node info) without exposing a large, fixed tool surface. It is well suited to open-ended, conversational queries, since the LLM writes its own request code rather than being limited to pre-defined endpoint wrappers. It is not the right fit for write operations without also configuring an API Secret (uploads and favorites need that in addition to the base API key), and the subgraph tool specifically will not work without a separate Graph API key - the other three tools function fine without one.
Capabilities
Beyond search and execute, the sandbox executes generated code against an authenticated audius.request() client with no filesystem, network, or environment-variable access, and no raw fetch - only audius.request() is available, hardcoded to api.audius.co. It enforces SSRF protection (request paths must start with / and cannot contain @), a 64MB memory cap per execution, a 30s default timeout (configurable per call), and no state leakage between executions. The server implements MCP protocol version 2025-11-25 over Streamable HTTP at POST /mcp, with sessions tracked via an MCP-Session-Id header, in-memory. Example usage shown in the source includes discovering trending tracks, searching for a user by name and pulling their top tracks sorted by play count, and a GraphQL subgraph query for total $AUDIO staked, delegated, and total supply.
How to install
# Install
git clone https://github.com/glassBead-tc/audius-mcp-atris.git
cd audius-mcp-atris
pnpm install
# Configure
echo 'AUDIUS_API_KEY=your_key_here' > .env
# Build & run
pnpm dev
An Audius API key is required: create one at audius.co/settings under Developer Apps (or at api.audius.co/plans), and copy the API Key into .env as AUDIUS_API_KEY. Copy the API Secret too if you plan to do write operations. A Graph API key is optional, needed only for the subgraph tool, obtained at thegraph.com/studio and set as GRAPH_API_KEY; without it the other tools still work, only subgraph returns an auth error. Other environment variables: PORT (optional, defaults to 3000). To connect from Claude Code, add an entry to .mcp.json pointing at the running HTTP server (type: "http", url: "http://localhost:3000/mcp"); Claude Desktop instead runs the compiled server directly via a command/args entry in claude_mcp_config.json, passing AUDIUS_API_KEY through its env block.
Who it's for
Developers building LLM integrations against Audius or the Open Audio Protocol who want the model to query and act on the API conversationally, without maintaining a large fixed catalog of individual API-wrapping tools. Licensed MIT.
Source README
Audius MCP Server (Code Mode)
A Code Mode MCP server that gives LLMs full access to the Audius music platform and Open Audio Protocol. Instead of 100+ individual tools, it uses two meta-tools - search and execute - to compress the entire Audius API into ~1,000 tokens of context.
Built with Effect-TS. Runs a QuickJS WASM sandbox for secure code execution.
How It Works
LLM ──► search("trending tracks") → discovers GET /tracks/trending
──► execute("audius.request(...)") → runs code in sandbox, returns results
The LLM writes JavaScript that runs in an isolated sandbox with an authenticated audius.request() client. No API keys in the prompt, no tool explosion, no round-trip overhead.
Tools
| Tool | What it does |
|---|---|
| search | Discover API endpoints by tag, path, method, or keyword |
| execute | Run JavaScript against the Audius API in a QuickJS sandbox |
| play | Open a track in the Audius desktop app or browser |
| subgraph | Query on-chain protocol data (staking, governance, nodes) via The Graph |
Quick Start
# Install
git clone https://github.com/glassBead-tc/audius-mcp-atris.git
cd audius-mcp-atris
pnpm install
# Configure
echo 'AUDIUS_API_KEY=your_key_here' > .env
# Build & run
pnpm dev
Getting API Keys
Audius API Key (required)
- Go to audius.co/settings and sign in (or create an account)
- Scroll to Developer Apps and create a new app
- Copy the API Key - this goes in your
.envasAUDIUS_API_KEY - Optionally copy the API Secret if you plan to do write operations (uploads, favorites)
Alternatively, get credentials at api.audius.co/plans.
The Graph API Key (optional, for subgraph tool)
The subgraph tool queries on-chain protocol data (staking, governance, nodes). It requires a Graph API key:
- Go to thegraph.com/studio and sign in
- Create an API key (video tutorial)
- Add it to your
.envasGRAPH_API_KEY
Without this key, the subgraph tool will return an auth error. All other tools work fine without it.
Connect to Claude
Claude Code
Add to your project's .mcp.json:
{
"mcpServers": {
"audius-mcp": {
"type": "http",
"url": "http://localhost:3000/mcp"
}
}
}
Claude Desktop
Add to claude_mcp_config.json:
{
"mcpServers": {
"audius": {
"command": "node",
"args": ["/path/to/audius-mcp-atris/dist/index.js"],
"env": {
"AUDIUS_API_KEY": "your_key_here"
}
}
}
}
Example Conversations
"What's trending on Audius right now?"
// LLM calls search({ tag: "tracks" }), then:
return await audius.request('GET', '/tracks/trending', { query: { limit: 5 } })
"Find deadmau5 and show me his top tracks"
const users = await audius.request('GET', '/users/search', { query: { query: 'deadmau5' } })
const userId = users.data[0].id
const tracks = await audius.request('GET', '/users/' + userId + '/tracks', { query: { sort: 'plays' } })
return tracks.data.map(t => ({ title: t.title, plays: t.play_count }))
"How much $AUDIO is staked in the protocol?"
{ audiusNetworks(first: 1) { totalTokensStaked totalTokensDelegated totalSupply } }
Architecture
src/
├── index.ts # Entry point — Effect layers, HTTP server
├── AppConfig.ts # Env var config (AUDIUS_API_KEY, PORT)
├── mcp/
│ ├── McpSchema.ts # MCP 2025-11-25 protocol (Effect Schema)
│ ├── McpSerialization.ts # JSON-RPC ↔ Effect RPC bridge
│ ├── McpServer.ts # Request dispatch (initialize, tools/*)
│ └── McpServerTransport.ts # Streamable HTTP on /mcp
├── api/
│ ├── SpecLoader.ts # Fetch + resolve Audius swagger.yaml
│ ├── SpecIndex.ts # Searchable index over parsed spec
│ └── AudiusClient.ts # Authenticated HTTP client
├── tools/
│ ├── SearchTool.ts # search tool
│ ├── ExecuteTool.ts # execute tool
│ ├── PlayTool.ts # play tool
│ └── SubgraphTool.ts # subgraph tool
└── sandbox/
├── Sandbox.ts # QuickJS WASM sandbox
└── TypeGenerator.ts # TS declarations from spec
Every component is an Effect service (Context.Tag) composed via Layer. The sandbox uses QuickJSDeferredPromise to support unlimited chained await calls.
Environment Variables
| Variable | Required | Description |
|---|---|---|
AUDIUS_API_KEY |
Yes | API key from audius.co/settings |
PORT |
No | HTTP server port (default: 3000) |
GRAPH_API_KEY |
No | The Graph API key for subgraph queries |
Development
pnpm build # Compile TypeScript
pnpm start # Run compiled server
pnpm dev # Build + run
pnpm test # Run tests
Security
- Sandbox isolation: LLM-generated code runs in QuickJS WASM - no filesystem, no network, no env vars
- No raw fetch: Only
audius.request()is available, hardcoded toapi.audius.co - SSRF protection: API paths must start with
/and cannot contain@ - Memory cap: 64MB per execution
- Timeout: 30s default, configurable per call
- Fresh context: No state leaks between executions
Protocol
- MCP version: 2025-11-25
- Transport: Streamable HTTP at
POST /mcp - Sessions:
MCP-Session-Idheader, in-memory (stateless-ready)
Open Audio Protocol
This server is built on the Open Audio Protocol - the decentralized global music database. Audius is one application layer on top of OAP. The subgraph tool provides direct access to on-chain protocol data.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.