MaxMCP 标志

MaxMCP

组织
signalcompose

Community version of MaxMCP-Dev-main

发布者signalcompose
代码仓库MaxMCP
语言C++
复刻数
7
星标数
44
可用工具
0
传输类型stdio
链接
  • 将工具接入 AI 工作流

    MaxMCP 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 44 个 Star 和 7 个 Fork。

MaxMCP - Native MCP Server for Max/MSP

Developed with Claude Code

Control your Max/MSP patches with Claude Code using natural language.

Overview

MaxMCP is a native C++ external object for Max/MSP that acts as an MCP (Model Context Protocol) server. It enables Claude Code to control Max/MSP patches through natural language commands, with zero configuration required from users.

Key Features

  • ✅ Zero configuration: Just place [maxmcp] in your patch
  • ✅ Automatic patch detection: Auto-generated patch IDs
  • ✅ Natural language control: "Add a 440Hz oscillator to synth patch"
  • ✅ Multi-patch support: Control multiple patches simultaneously
  • ✅ Complete MCP toolset: 30 tools for comprehensive patch control
  • ✅ Auto-cleanup: Lifecycle management on patch close

Architecture

Claude Code (MCP Client)
    ↕ stdio (JSON-RPC)
Node.js Bridge (websocket-mcp-bridge.js)
    ↕ WebSocket
[maxmcp] C++ External Object
    ↕ Max API
Max/MSP Patches

Components:

  • maxmcp.mxo: Single unified external with two modes:
    • @mode agent: WebSocket server, MCP protocol handler (1 per Max instance)
    • @mode patch: Patch registration (1 per controllable patch, default)
  • Bridge: stdio ↔ WebSocket translator (Node.js, launched automatically)

Tech Stack

  • Language: C/C++ (Max SDK v8.2.0)
  • Build System: CMake 3.19+
  • Architecture: arm64 (Apple Silicon native)
  • MCP Protocol: stdio-based JSON-RPC
  • JSON Library: nlohmann/json 3.11.0+
  • WebSocket: libwebsockets (installed via Homebrew, bundled into .mxo at build time)
  • TLS: OpenSSL 3.x (installed via Homebrew, bundled into .mxo at build time)
  • Code Signing: Ad-hoc signature (auto-applied)
  • Distribution: Max Package

Installation

Option 1: Max Package Manager (Coming Soon)

  1. Open Max/MSP
  2. File → Show Package Manager
  3. Search "MaxMCP"
  4. Click Install

Option 2: Manual Install

  1. Download latest release
  2. Extract to ~/Documents/Max 9/Packages/
  3. Restart Max

Option 3: Build from Source (Development Setup)

Use this path if you're cloning the repository and want to build the external yourself.

  1. Clone the repo
    bash
    git clone https://github.com/signalcompose/MaxMCP.git
    cd MaxMCP
  2. Install prerequisites
    bash
    brew install cmake nlohmann-json libwebsockets openssl
    • Requires macOS 13+, Xcode Command Line Tools, Max 9.1+, Node.js 18+ with npm.
  3. Fetch the Max SDK with submodules
    bash
    git clone --branch v8.2.0 https://github.com/Cycling74/max-sdk.git --recursive max-sdk
    The --recursive flag is critical; without it max-pretarget.cmake is missing. v8.2.0 is pinned because newer max-sdk no longer ships the max-sdk-base submodule (it switched to CMake FetchContent).
  4. Install bridge dependencies
    bash
    cd package/MaxMCP/support/bridge
    npm install
    cd ../../../..
    This installs the ws dependency used by websocket-mcp-bridge.js.
  5. Build the external
    bash
    ./build.sh --clean Release   # optional but recommended for first build
    ./build.sh Release
    The script configures CMake, builds the external, and installs maxmcp.mxo into package/MaxMCP/externals/. Confirm the bundle exists:
    bash
    ls package/MaxMCP/externals/maxmcp.mxo/Contents/MacOS/maxmcp
  6. Deploy to Max 9 Packages
    bash
    ./deploy.sh
    This copies package/MaxMCP to ~/Documents/Max 9/Packages/MaxMCP.
  7. (Optional) Manual CMake invocation
    bash
    cmake -B build -S . -DCMAKE_BUILD_TYPE=Release
    cmake --build build
    cmake --install build --prefix package/MaxMCP
  8. Verify bridge tooling
    bash
    cd package/MaxMCP/support/bridge
    npm test   # runs Jest suite against websocket-mcp-bridge.js

Quick Start

1. Open Help Patch

In Max/MSP:

  • Help → MaxMCP Package → 00-index.maxpat

Or manually:

bash
open ~/Documents/Max\ 9/Packages/MaxMCP/examples/00-index.maxpat

2. Start MCP Agent & Bridge

Option A (recommended): In 00-index.maxpat, click the "START" message to launch the agent and bridge automatically.

Option B (manual patch):

  1. Unlock a new patcher (Cmd+E) and add:
    [maxmcp @mode agent @port 7400]
  2. Add a message box with START and connect it to the agent inlet.
  3. Click the START message. The Max Console should log:
    WebSocket server started on port 7400
    maxmcp: maxmcp (agent mode) started on port 7400
  4. Start the Node bridge in a terminal:
    bash
    node ~/Documents/Max\ 9/Packages/MaxMCP/support/bridge/websocket-mcp-bridge.js ws://localhost:7400
    Run npm install inside package/MaxMCP/support/bridge/ first if you have not already.

3. Configure Claude Code

Run this command in your terminal:

bash
claude mcp add maxmcp node ~/Documents/Max\ 9/Packages/MaxMCP/support/bridge/websocket-mcp-bridge.js ws://localhost:7400

Restart Claude Code to apply changes.

4. Create Controllable Patch

In your Max patch, add:

[maxmcp @alias my-synth @group synth]

Attributes:

  • @mode patch - Client mode (default, can be omitted)
  • @alias my-synth - Custom patch ID (optional, auto-generated if omitted)
  • @group synth - Group name for filtering (optional)

5. Control with Natural Language

In Claude Code, say:

  • "List all active Max patches"
  • "Add a 440Hz oscillator to my-synth patch"
  • "Connect the oscillator to dac~"
  • "Show me the Max Console log"

Available MCP Tools

MaxMCP provides 30 tools across 7 categories:

CategoryCountTools
Patch Management3list_active_patches, get_patch_info, get_frontmost_patch
Object Operations12add_max_object, remove_max_object, get_objects_in_patch, set_object_attribute, get_object_attribute, get_object_value, get_object_io_info, get_object_hidden, set_object_hidden, redraw_object, replace_object_text, assign_varnames
Connection Operations4connect_max_objects, disconnect_max_objects, get_patchlines, set_patchline_midpoints
Patch State3get_patch_lock_state, set_patch_lock_state, get_patch_dirty
Hierarchy2get_parent_patcher, get_subpatchers
Utilities2get_console_log, get_avoid_rect_position
Layout Validation4validate_layout, get_io_position, suggest_alignment, align_objects

See docs/mcp-tools-reference.md for full parameter and response documentation.

Development Status

Current Version: v1.1.0 ✅

✅ Completed:

  • Phase 1: Core external objects, WebSocket server
  • Phase 2: Complete MCP toolset, E2E testing, Max Package integration
  • Phase 1 Infrastructure: CI/CD pipeline, comprehensive testing (117 tests), code quality automation

🔄 Next:

  • Phase 3: Max Package Manager submission
  • Phase 4: Cross-platform builds (Windows/Intel support)

See CHANGELOG.md for version history and docs/ for detailed specifications and development roadmap.

Documentation

Claude Code Plugin

MaxMCP provides a Claude Code plugin with 5 skills for Max/MSP development.

Installation

bash
/plugin marketplace add signalcompose/maxmcp
/plugin install maxmcp@maxmcp

Available Skills

patch-guidelines

Guidelines for creating well-organized Max patches:

bash
/maxmcp:patch-guidelines

Provides:

  • Layout rules for object positioning
  • Varname naming conventions
  • JavaScript (v8/v8ui) best practices
  • MCP tools quick reference

organize-patch

Organize and tidy up Max/MSP patch layout:

bash
/maxmcp:organize-patch

Provides:

  • 8-phase layout organization workflow
  • Object sizing, repositioning, and patchcord routing
  • Section detection and header placement
  • Overlap, crossing, and upward-connection verification (validate_layout)

max-techniques

Max/MSP implementation techniques and best practices:

bash
/maxmcp:max-techniques

Provides:

  • poly~ & bpatcher architecture patterns
  • pattr/pattrstorage parameter management
  • Constant parameter safety, sampling rate handling

m4l-techniques

Max for Live development techniques and best practices:

bash
/maxmcp:m4l-techniques

Provides:

  • Live Object Model (path → id → live.object → live.observer)
  • Device namespaces (--- vs #0) and pattr persistence
  • Controller mapping, dBFS reference, Push2 automapping

max-resources

Access Max.app built-in documentation and examples:

bash
/maxmcp:max-resources

Provides:

  • Object reference pages (inlets, outlets, methods, attributes)
  • Example patches from Max.app
  • Code snippets
  • Full-text search of Max documentation

Example Patches

The package includes comprehensive example patches in examples/:

  • 00-index.maxpat - Main help/index (also available via right-click → "Open maxmcp Help")
  • 01-basic-registration.maxpat - Basic patch registration
  • 01-claude-code-connection.maxpat - Claude Code E2E connection test
  • 02-custom-alias.maxpat - Custom alias usage
  • 03-group-assignment.maxpat - Group filtering
  • 04-05-06-multi-patch-*.maxpat - Multi-patch scenarios (synth1, synth2, fx1)
  • 07-mcp-tools-test.maxpat - MCP tools testing

Troubleshooting

Agent won't start

  • Check that port 7400 is available: lsof -i :7400
  • If the bridge logs ECONNREFUSED, start [maxmcp @mode agent @port 7400] and click START
  • Check Max Console for error messages

Claude Code can't connect

  • Verify bridge is running: Check Max Console for "Bridge launched" message
  • Restart Claude Code after claude mcp add command
  • Check MCP configuration with claude mcp list
  • Run the bridge with debugging to capture WebSocket errors: DEBUG=1 node ~/Documents/Max\ 9/Packages/MaxMCP/support/bridge/websocket-mcp-bridge.js ws://localhost:7400

Objects not appearing

  • Ensure patch is unlocked (Cmd+E)
  • Check patch has [maxmcp] object registered
  • Verify patch ID: Use list_active_patches tool

License

MaxMCP is licensed under the Signal compose Fair Trade License v1.0. See LICENSE for the full license text.

Third-Party Licenses

MaxMCP uses open-source libraries. See THIRD_PARTY_LICENSES.md for full attribution and license details.

Development & Testing

MaxMCP uses a comprehensive CI/CD pipeline with automated testing and code quality checks:

  • Testing: 117 unit tests (Google Test 1.17.0) with 100% pass rate
  • CI/CD: GitHub Actions workflows for automated testing and linting
  • Code Quality: Pre-commit hooks with clang-format, ESLint, and automated tests
  • Local Setup: npm install to enable pre-commit hooks via Husky

See docs/development-guide.md for details on the testing infrastructure.

Contributing

We welcome contributions from the community! Please see:

This project uses Claude Code for development. See CLAUDE.md for AI assistant guidelines and project conventions.

All contributions are automatically validated by CI to ensure code quality and test coverage.

Author

Hiroshi Yamato

Support

Inspiration

This project was inspired by MaxMSP-MCP-Server-multipatch, reimagined with a native C++ architecture for improved performance and Max integration.

将 MaxMCP MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 MaxMCP 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请保持终端窗口及其中的进程运行。
3

将 MaxMCP 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 MaxMCP MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "maxmcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 MaxMCP MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 MaxMCP MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 MaxMCP 帮我完成这项任务吗?
MaxMCP
当然。我已阅读。
以下是我使用 MaxMCP 得到的结果。

常见问题

MaxMCP MCP 服务器有什么用途?

MaxMCP 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 MaxMCP MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您可以让 Claude、ChatGPT、Gemini 等不同 AI 模型,或您在 TypingMind 中配置的其他模型使用 MaxMCP,而无需为每个模型单独配置 MCP 服务器。

为什么在 TypingMind 中使用 MaxMCP MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是优秀的大语言模型聊天前端之一。连接 MaxMCP 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 MaxMCP MCP 连接到 TypingMind?

MaxMCP 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

MaxMCP MCP 在 TypingMind 中提供哪些工具?

MaxMCP 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 MaxMCP MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行掌控模型提供商、API 密钥、提示词和 MCP 配置。如果 MaxMCP 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇