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!
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:
- Clone the repository
- git clone https://github.com/your-repo/pnolle-directions2music.git
- cd pnolle-directions2music
- Install dependencies for both MCP server and client server
-
cd MCP/server
-
npm install
-
cd ../client
-
npm install
- 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" }
- 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
- Verify operation
- Access health and orchestration endpoints via the client server, e.g. http://localhost:3001/orchestrate
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
dify
Production-ready platform for agentic workflow development.
gemini-cli
An open-source AI agent that brings the power of Gemini directly into your terminal.
repomix
📦 Repomix is a powerful tool that packs your entire repository into a single, AI-friendly file. Perfect for when you need to feed your codebase to Large Language Models (LLMs) or other AI tools like Claude, ChatGPT, DeepSeek, Perplexity, Gemini, Gemma, Llama, Grok, and more.
adk-go
An open-source, code-first Go toolkit for building, evaluating, and deploying sophisticated AI agents with flexibility and control.
easy-vibe
vibe coding from 0 to 1 | vibecoding 零基础教程 | 产品原型、AI 能力集成、前后端开发、多平台应用开发教程
c4-genai-suite
c4 GenAI Suite