An MCP (Model Context Protocol) server that provides access to JUCE Framework C++ class documentation.
- Fetch documentation for specific JUCE classes
- List all available JUCE classes
- Search for classes by name
- Format documentation as markdown
- Expose documentation through MCP resources and tools
# Clone the repository
git clone https://github.com/josmithiii/mcp-servers-jos.git
cd mcp-servers-jos/juce-docs-mcp-server
# Install dependencies
npm install
# Build the project
npm run buildnpm startThis starts the MCP server using stdio as the transport mechanism, which allows it to be used with MCP clients like Claude Desktop App, Continue, or other MCP-compatible applications.
- Open Cursor / Settings / Cursor Settings
- Select MCP
- Set the
Nameto JUCE Docs (or whatever), and set theTypetoCommand - Set the
Commandtonode /path/to/juce-docs-mcp-server/dist/index.js, replacing/path/to/juce-docs-mcp-serverwith the actual path into your clone - Restart Cursor to apply the changes (it will internally run
node .../dist/index.js)
Note that Cursor sends MCP requests to your local server that you started with npm start above.
juce://class/{className}- Get documentation for a specific JUCE classjuce://classes- List all available JUCE classes
/search-juce-classes- Search for JUCE classes by name/get-juce-class-docs- Get documentation for a specific JUCE class
explore-juce- Interactive exploration of JUCE framework components- Use without arguments for an overview of main components
- Add a topic to explore specific functionality (e.g.,
explore-juce audio)
In addition to prompts that direct your LLM (such as in Cursor) to use the MCP internally, you can also query it directly via "resource" and "tool" names:
-
Resources look like URLs that directly fetch specific content. They follow a URI-like pattern with the format
protocol://path. These are defined in the server as direct resource endpoints. Example:juce://classes -
Tools use names beginning with
/and support a following argument, i.e.,/tool-name arg-string, and provide interactive commands that perform an action. MCP tools start with/to distinguish them from resources. This is similar to how slash commands work in many applications such asClaude Codeoraider. Note that in an IDE chat, thearg-stringcan include spaces and is terminated by end-of-line (according to Claude 3.7).
In summary, when connected to an MCP client (such as via Cursor chat),
you can access "resources" in the format protocol://path and "tools"
in the format /tool-name arg string.
- List all available classes:
juce://classes - Get documentation for a specific class:
juce://class/ValueTree - Search for all Audio classes:
/search-juce-classes Audio - Get documentation for specific classes:
/get-juce-class-docs AudioProcessor
In juce-docs-mcp-server/src/juce-docs.ts, edit the line
const BASE_URL = 'https://ccrma.stanford.edu/~jos/juce_modules';
More up-to-date possibilities include
const BASE_URL = 'https://docs.juce.com/develop';
const BASE_URL = 'https://docs.juce.com/master';
When working on a JUCE project, here's how to get the most out of the JUCE Documentation MCP Server:
-
Exploring Components
- Start with
/search-juce-classesfollowed by a general category (Audio, GUI, etc.) - Use
explore-juce audio(or other domain) to get an overview of related classes
- Start with
-
Implementation Help
- When implementing a specific feature, use
juce://class/ClassNameto get detailed documentation - Look for code examples in the class documentation
- When implementing a specific feature, use
-
Method Reference
- The class documentation includes all methods with signatures and descriptions
- Use this when you need to understand parameter types or return values
-
Keep Cursor Open Alongside Your IDE
- Have Cursor with the MCP server running in a separate window
- This gives you instant access to documentation without leaving your code editor
-
Use During Planning Phases
- Before implementing a feature, explore available classes with
/search-juce-classes - This helps you understand the JUCE approach before writing code
- Before implementing a feature, explore available classes with
-
Debugging Assistance
- When encountering unexpected behavior, check the class documentation
- Look for notes about edge cases or implementation details
-
Audio Processing
- Start with
AudioProcessorfor plugin development - Use
AudioSourcefor playback applications - Check
dsp::namespace classes for efficient signal processing
- Start with
-
GUI Development
- Base all custom components on the
Componentclass - Use
AudioAppComponentto combine audio and GUI functionality - Look at
LookAndFeelfor styling
- Base all custom components on the
-
Plugin Development
- Reference
AudioProcessorandAudioProcessorEditorfor the core plugin architecture - Check
AudioProcessorValueTreeStatefor parameter management
- Reference
The server fetches documentation from the JUCE documentation hosted at Stanford CCRMA (https://ccrma.stanford.edu/~jos/juce_modules/), but of course you can change that, as noted above. It processes the HTML documentation in real-time:
- Class list is fetched from the annotated class list page
- Individual class documentation is parsed from class-specific pages
- Documentation is formatted as markdown for consistent display
- Results are cached in memory during server runtime
Common issues and solutions:
- Class Not Found: If a class name is invalid or not found, the server will return a clear error message
- Connection Issues: If the JUCE documentation site is unreachable, check your internet connection
- Server Start Failure: Ensure the correct Node.js version is installed and the build step completed successfully
- Cursor Integration: If the server isn't working in Cursor, verify the command path in MCP settings is correct
# Run in development mode with auto-recompilation
npm run devMIT