Get the FREE Ultimate OpenClaw Setup Guide →

Directions2Music

A SpeedGeeking project for the Esri European Dev & Tech Summit 2025 in Frankfurt 😎 This is not quite a live demo (because usage requires paid accounts), but you can skip through an archive of generated songs from routing instructions. Enjoy!

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio pnolle-directions2music node index.js \
  --env PORT="3000" \
  --env CLIENT_PORT="3001" \
  --env elevenLabsApiKey="YOUR_ELEVENLABS_API_KEY_HERE" \
  --env googleGenAIApiKey="YOUR_GOOGLE_GENAI_API_KEY_HERE"

How to use

Directions2Music converts GPS routing directions into personalized musical compositions. The MCP server performs AI-powered style detection to infer musical flavor from the route context and uses ElevenLabs infrastructure to generate the corresponding audio. The system serves the resulting MP3s via a web API, enabling playback in a client or browser. You can interact with the orchestration endpoint to trigger the full pipeline, or use the server's audio file serving capabilities to retrieve generated tracks. The architecture includes a web client and two Node.js servers: the MCP server (handling AI processing and music generation) and the Client Express server (exposing endpoints like /orchestrate and static /audio). To operate, ensure your API keys for Google Gemini and ElevenLabs are configured in config.json (gitignored), then start both servers and use the /orchestrate endpoint to generate music from provided directions.

How to install

Prerequisites:

  • Node.js (LTS) and npm installed
  • Git installed
  • API keys for Google Gemini (style detection) and ElevenLabs (music generation)

Step-by-step installation:

  1. Clone the repository
  1. Install dependencies for both MCP server and client server
  • cd MCP/server

  • npm install

  • cd ../client

  • npm install

  1. Configure API keys
  • Copy the template config into place and edit with your keys
  • cd MCP/server
  • cp config.json.template config.json
  • Edit config.json to include your Google Gemini and ElevenLabs API keys, for example: { "googleGenAIApiKey": "YOUR_GOOGLE_GENAI_API_KEY_HERE", "elevenLabsApiKey": "YOUR_ELEVENLABS_API_KEY_HERE" }
  1. Run the system
  • Start MCP server (port 3000 by default) cd MCP/server npm start

  • Start Client Express server (port 3001 by default) cd MCP/client npm start

  1. Verify operation

Notes:

  • Ensure that config.json is gitignored to protect keys.
  • If ports 3000/3001 are in use, adjust the ports in config and re-run.

Additional notes

Tips and common issues:

  • Ensure config.json exists in MCP/server/ and contains valid API keys formatted without extra quotes or spaces.
  • If you see "Could not read config file" verify file path and permissions.
  • If API keys are invalid or out of credits, regenerate or verify access in the respective dashboards.
  • For testing without API usage, you can enable dummyMode via the orchestration payload (as shown in the README) to use pre-recorded responses.
  • The system serves generated MP3s under /audio-files and each audio file path is provided in the response payloads (status.audioUrl).

Related MCP Servers

Sponsor this space

Reach thousands of developers