@ray0404/juce-audio-mcp
v1.1.0
Published
MCP server providing instant access to JUCE framework documentation with online fetching capabilities
Maintainers
Readme
JUCE Audio MCP Server
An MCP (Model Context Protocol) server that provides instant access to JUCE framework documentation with online fetching capabilities.
Overview
This project implements an MCP server that serves as a queryable reference for the JUCE framework, enabling AI assistants and developers to search and navigate JUCE documentation efficiently. The server provides:
- Tool-based queries for classes, modules, tutorials, and documentation search
- Resource URIs for direct documentation access
- Prompt templates for common JUCE development patterns
- Online/offline fallback for robust documentation access
- Request caching for improved performance
Features
- 🔍 Search JUCE classes by name or partial match
- 📚 Get detailed documentation for specific JUCE classes including methods
- 🧩 Retrieve information about JUCE modules and their classes
- 📖 Search across all JUCE documentation (classes, modules, tutorials)
- 💡 Get topic-specific help for areas like audio, DSP, GUI, etc.
- 🌐 Automatic fallback to online documentation when local index is incomplete
- ⚡ Caching mechanism for improved performance on repeated queries
- 📋 Pre-built prompt templates for common JUCE development tasks
Installation
Prerequisites
- Node.js >= 18.0.0
- npm or yarn package manager
Install from npm
npm install -g @ray0404/juce-audio-mcpInstall from source
git clone https://github.com/ray0404/juce-audio-mcp.git
cd juce-audio-mcp
npm install
npm run buildUsage
As a Command Line Tool
After installation, you can start the MCP server:
juce-audio-mcpThe server will start and wait for MCP connections on stdio.
Development Mode
For development and testing:
npm run devBuilding
To build the TypeScript source:
npm run buildTesting
Run the test suite:
npm testLinting
Check code quality with ESLint:
npm run lintMCP Server Capabilities
Once connected, the server provides the following capabilities through the MCP protocol:
Tools
search_classes
Search for JUCE classes by name.
Parameters:
query(string, required): Search query to find JUCE classeslimit(number, optional, default: 20): Maximum number of results to returnmodule(string, optional): Filter by module name (e.g., "juce_audio_basics")
Example:
{
"query": "AudioProcessor",
"limit": 10
}get_class
Get detailed documentation for a specific JUCE class.
Parameters:
className(string, required): Name of the JUCE class to retrieveincludeMethods(boolean, optional, default: true): Include class methods
Example:
{
"className": "AudioProcessor",
"includeMethods": true
}search_docs
Search across all JUCE documentation.
Parameters:
query(string, required): Search query for JUCE documentationtype(string, optional, default: "all"): Type of documentation to search ('all', 'classes', 'modules', 'tutorials')limit(number, optional, default: 10): Maximum results per type
Example:
{
"query": "filter",
"type": "classes",
"limit": 5
}get_module
Get information about a specific JUCE module.
Parameters:
moduleName(string, required): Name of the JUCE module (with or without juce_ prefix)includeClasses(boolean, optional, default: true): Include classes in this module
Example:
{
"moduleName": "juce_dsp",
"includeClasses": true
}get_topic_help
Get help and overview for a specific JUCE topic.
Parameters:
topic(string, required): Topic to get help on (e.g., "audio", "dsp", "gui")includeExamples(boolean, optional, default: false): Include example references
Example:
{
"topic": "dsp",
"includeExamples": true
}Resources
The server provides resource URIs for direct access to documentation:
juce://class/{className}- Access specific class documentationjuce://module/{moduleName}- Access specific module documentation
Prompts
Pre-built prompt templates for common JUCE development patterns:
get_audio_processor_class- Get documentation for an AudioProcessor classfind_dsp_class- Find a DSP class for a specific purposecreate_plugin- Get started creating an audio plugin with JUCEcomponent_guide- Get help creating a GUI component
Architecture
Local Documentation Index
The server maintains a local index of JUCE classes and modules for fast offline access. This index is generated from the JUCE documentation and includes:
- Class names, full names, and inheritance information
- Module associations
- Brief descriptions
- Documentation URLs
Online Fallback
When information is not found in the local index, the server automatically falls back to fetching documentation from the official JUCE documentation website.
Caching
Frequently accessed documentation is cached to improve performance and reduce external requests.
Configuration
The server uses the following constants (found in src/constants.js):
JUCE_DOCS_BASE: Base URL for JUCE documentation (default: https://docs.juce.com/master/)JUCE_TUTORIALS_BASE: Base URL for JUCE tutorialsJUCE_FORUM_BASE: Base URL for JUCE forumSERVER_NAME: Name of the MCP serverSERVER_VERSION: Version of the MCP server
Project Structure
juce-audio-mcp/
├── src/ # TypeScript source files
│ ├── index.ts # MCP server implementation
│ ├── tools.ts # Tool implementations
│ ├── fetcher.js # Documentation fetching logic
│ ├── schemas.js # Zod schemas for tool parameters
│ └── constants.js # Configuration constants
├── tests/ # Test files
├── site/ # Generated documentation site
├── package.json # Project metadata and dependencies
├── tsconfig.json # TypeScript configuration
└── README.md # This fileDependencies
Production Dependencies
@modelcontextprotocol/sdk: MCP SDK for server implementationaxios: HTTP client for fetching online documentationcheerio: HTML parser for extracting documentation contentzod: Schema validation for tool parameters
Development Dependencies
@types/node: TypeScript definitions for Node.jstypescript: TypeScript compilertsx: TypeScript execution for developmentvitest: Testing frameworkeslint: Linting tool@typescript-eslint/eslint-plugin: TypeScript ESLint plugin@typescript-eslint/parser: TypeScript ESLint parser
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- The JUCE framework team for their excellent audio application framework
- The Model Context Protocol team for enabling standardized AI-tool interactions
- All contributors to the open-source projects used in this implementation
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing-feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please make sure to update tests as appropriate and follow the existing code style.
Contact
Ray0404 - GitHub Profile
Project Link: https://github.com/ray0404/juce-audio-mcp
