Get Started

Build a Plugin: Bundle and Dylib

This page shows the quickest way to build the SamplePlugin for MCPStudio as both a bundle and a dylib.

Updated: April 16, 2026

Prerequisites

  • macOS 15.0 or newer
  • Xcode Command Line Tools
  • CMake 3.25 or newer

Build flow in 4 steps

  1. Go to the SamplePlugin directory.
  2. Create and open a build folder.
  3. Generate the CMake configuration.
  4. Compile the project.
mkdir build
cd build
cmake ..
make

The bundle and dylib are built together, so no separate build step is required.

What you get after build

  • SampleTool as a dynamic library (dylib)
  • SampleTool.bundle as a macOS bundle

You can then integrate both artifacts using the MCPStudio SDK workflow.

Key files in the project

  • SamplePlugin/CMakeLists.txt controls the top-level build.
  • SamplePlugin/dylib/PluginMain.c contains dylib implementation logic.
  • SamplePlugin/dylib/ToolDescriptor.c defines dylib tool metadata.
  • SamplePlugin/bundle/PluginMain.mm contains bundle implementation logic.
  • SamplePlugin/bundle/ToolDescriptor.c defines bundle tool metadata.

Common build problems

  • CMake not found: install CMake or check your PATH.
  • Compiler errors: update Xcode Command Line Tools.
  • Build fails in old folder: recreate the build directory and configure again.
Tip: After toolchain updates, always run cmake .. again before recompiling.

Next steps