1.0.0 • Published 10 months ago

audius-mcp-atris v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Atris MCP for Audius

An MCP (Model Context Protocol) server that provides access to the Audius music platform via LLMs (Large Language Models).

Features

  • Tools: Access tracks, users, playlists, albums, and perform searches on Audius
  • Content Creation: Upload tracks, create playlists, manage your Audius content
  • Social Features: Follow users, favorite tracks, comment on content
  • Monetization: Access premium content, purchase tracks, send tips to artists
  • Analytics: Track play counts, trending data, and listener insights
  • Resources: Access track, user, playlist, and album data as structured resources
  • Prompts: Use guided experiences for music discovery, curation, and analysis

Prerequisites

  • Node.js 16 or higher
  • An Audius API key (optional, but recommended for production use)

Installation

NPM Installation (Recommended)

Install directly from npm:

npm install audius-mcp-atris

Or with yarn:

yarn add audius-mcp-atris

Manual Installation

  1. Clone this repository:
git clone https://github.com/glassBead/audius-mcp-atris.git
cd audius-mcp-atris
  1. Install dependencies:
npm install
  1. Build the TypeScript code:
npm run build

Configuration

Create a .env file in the root directory based on the provided .env.example:

# Audius API Configuration
AUDIUS_API_KEY=your_api_key_here
AUDIUS_API_SECRET=your_api_secret_here
AUDIUS_ENVIRONMENT=production # or staging, development

# MCP Server Configuration
SERVER_NAME=audius-mcp
SERVER_VERSION=1.0.0

Usage

Running the Server

Start the server:

npm start

For development with automatic rebuilding:

npm run dev

Connecting to Claude

To use this server with Claude:

  1. Install Claude for Desktop or Claude CLI

For the Claude CLI using npm package:

claude mcp add audius npx audius-mcp-atris

Or with a local installation:

claude mcp add audius node /path/to/audius-mcp-atris/build/index.js

For Claude Desktop, edit the configuration file:

{
  "mcpServers": {
    "audius": {
      "command": "npx",
      "args": [
        "audius-mcp-atris"
      ],
      "env": {
        "AUDIUS_API_KEY": "your_api_key_here",
        "AUDIUS_API_SECRET": "your_api_secret_here"
      }
    }
  }
}

Available Tools

The server provides the following functionality:

Discovery Tools

  • Search: Find tracks, users, playlists with various filters
  • Advanced Search: Search with genre, mood, BPM, and other filters
  • Trending Discovery: Get trending or underground tracks
  • Similar Artists: Find artists similar to those you like

Track Tools

  • Get Track Info: Detailed track information by ID
  • Search Tracks: Find tracks with various filters
  • Trending Tracks: Discover what's hot on Audius
  • Track Comments: View and add comments on tracks
  • Track Analytics: Listen counts, trending data, audience insights

User Tools

  • User Profiles: Get detailed user information
  • User Tracks: List tracks uploaded by a user
  • Follow User: Follow other users
  • User Analytics: Track play metrics, supporters, and more

Content Creation

  • Upload Track: Add new tracks to Audius
  • Update Track: Modify existing track metadata
  • Create Playlist: Build collections of tracks
  • Playlist Management: Add, remove, and reorder tracks

Social Interaction

  • Follow Artists: Connect with favorite creators
  • Favorite Tracks: Save and show appreciation for music
  • Comments: Add comments to tracks
  • Reposts: See who has reposted content
  • Messaging: Send and receive direct messages

Monetization

  • Premium Content: Access and purchase gated content
  • NFT-Gated Content: Check and verify NFT-based access
  • Purchase Tracks: Buy premium content with various payment options
  • Send Tips: Support artists directly
  • Track Transactions: View tip history and stats

Blockchain & Wallet

  • Wallet Management: Manage Ethereum and Solana wallets
  • Token Balances: Check cryptocurrency balances
  • Transactions: View history and execute transfers
  • Rewards: Access Audius platform rewards and challenges

Resources

Access Audius data using these URI templates:

  • audius://track/{id}: Track details by ID
  • audius://user/{id}: User profile by ID
  • audius://playlist/{id}: Playlist details by ID
  • audius://album/{id}: Album details by ID

Prompts

The server offers guided experiences for common music-related tasks:

  • Music Discovery: Find recommendations based on preferences
  • Track Analysis: Analyze track characteristics and get insights
  • Artist Profiles: Generate comprehensive artist overviews
  • Music Creation: Assist with track creation and publishing
  • Playlist Curation: Help with creating and promoting playlists
  • Messaging: Guide interactions with other users
  • Analytics: Generate reports and insights on music performance
  • Blockchain: Assist with crypto and token operations
  • Monetization: Guide premium content setup and purchases
  • Notifications: Manage and organize platform notifications

Development

Project Structure

├── src/
│   ├── index.ts          # Entry point
│   ├── server.ts         # MCP server setup
│   ├── config.ts         # Configuration handling
│   ├── sdk-client.ts     # Audius SDK client wrapper
│   ├── tools/            # MCP tool implementations
│   │   ├── tracks.ts               # Track-related tools
│   │   ├── users.ts                # User-related tools
│   │   ├── playlists.ts            # Playlist-related tools
│   │   ├── search.ts               # Search-related tools
│   │   ├── social.ts               # Social interaction tools
│   │   ├── comments.ts             # Comment management tools
│   │   ├── track-management.ts     # Track upload and management
│   │   ├── playlist-management.ts  # Playlist creation and management
│   │   ├── messaging.ts            # Direct messaging tools
│   │   ├── analytics.ts            # Analytics and metrics tools
│   │   ├── blockchain.ts           # Cryptocurrency and blockchain tools
│   │   ├── monetization.ts         # Premium content and payment tools
│   │   └── notifications.ts        # Platform notification tools
│   ├── resources/        # MCP resource implementations
│   │   ├── tracks.ts     # Track-related resources
│   │   ├── users.ts      # User-related resources
│   │   └── playlists.ts  # Playlist-related resources
│   └── prompts/          # MCP prompt implementations
│       ├── music-search.ts      # Music discovery prompts
│       ├── track-info.ts        # Track analysis prompts
│       ├── artist-profile.ts    # Artist profile prompts
│       ├── music-creation.ts    # Music creation prompts
│       ├── playlist-creation.ts # Playlist creation prompts
│       ├── messaging.ts         # Messaging prompts
│       ├── analytics.ts         # Analytics prompts
│       ├── blockchain.ts        # Blockchain prompts
│       ├── monetization.ts      # Monetization prompts
│       └── notifications.ts     # Notification prompts

Example Workflows

Music Discovery

// Search for electronic tracks
search-tracks --query "electronic" --limit 5

// Get trending tracks in a genre
get-trending-tracks --genre "House" --limit 10

// Find artists similar to a specific one
similar-artists --userId "123456"

Content Creation

// Upload a new track
upload-track --userId "123" --title "Summer Vibes" --genre "Electronic" --audioFileUrl "https://example.com/track.mp3"

// Create a playlist
create-playlist --userId "123" --playlistName "Chillout Mix" --description "Perfect for relaxing"

// Add tracks to a playlist
add-tracks-to-playlist --userId "123" --playlistId "456" --trackIds ["789", "101", "102"]

Social Features

// Follow a user
follow-user --userId "123" --followeeId "456"

// Favorite a track
favorite-track --userId "123" --trackId "789"

// Add a comment
add-track-comment --trackId "789" --userId "123" --comment "Great track!"

Monetization

// Check track access gates
track-access-gates --trackId "789"

// View purchase options
purchase-options --contentId "789" --contentType "track"

// Purchase a track
purchase-track --contentId "789" --walletAddress "0x123..." --purchaseOption "option1" --paymentToken "USDC" --amount "4.99" --signerPrivateKey "privateKey"

Testing

For local development testing:

  1. Install the MCP Inspector:
npm install -g @modelcontextprotocol/inspector
  1. Run the inspector with your server:
npx @modelcontextprotocol/inspector node ./build/index.js

License

MIT