To allow AI agents (like Cursor) to control InjectionNext, follow these steps to build the app, enable the control server, and install the MCP server component.
Prerequisites
- macOS with Xcode installed
- Node.js 18.14.1+
- InjectionNext.app built from this repository with
ControlServer support.
1. Build InjectionNext
Clone the repository and build the app using xcodebuild. Note that this uses ad-hoc signing for local development.
# Clone and init submodules
git clone <repo-url>
cd InjectionNext
git submodule update --init --recursive
# Build the app
cd App
xcodebuild -project InjectionNext.xcodeproj \
-scheme InjectionNext \
-configuration Debug build \
CODE_SIGN_IDENTITY="-" \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO
The built app is located at: ~/Library/Developer/Xcode/DerivedData/InjectionNext-*/Build/Products/Debug/InjectionNext.app. You may optionally copy it to /Applications/.
2. Enable the ControlServer
The TCP control server is opt-in. You must enable it via defaults before launching the app:
# Enable
defaults write com.johnholdsworth.InjectionNext mcpServer -bool true
# Disable
defaults delete com.johnholdsworth.InjectionNext mcpServer
3. Install the MCP Server
Copy the mcp-server from the application's Resources directory to a writable location and install its dependencies:
# If installed in /Applications
cp -r /Applications/InjectionNext/Contents/Resources/mcp-server .
cd mcp-server
npm install
4. Configure Cursor
Add the server to your Cursor MCP configuration at ~/.cursor/mcp.json (global) or .cursor/mcp.json (per-project):
{
"mcpServers": {
"injection-next": {
"command": "node",
"args": ["/absolute/path/to/InjectionNext/mcp-server/index.js"]
}
}
}
Replace /absolute/path/to with your actual path.
5. Launch InjectionNext
Start the app before using MCP tools:
open /Applications/InjectionNext.app
# Build command example
cd App
xcodebuild -project InjectionNext.xcodeproj \
-scheme InjectionNext \
-configuration Debug build \
CODE_SIGN_IDENTITY="-" \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO