Skip to main content
Glama

xojo-mcp

CI xojo-mcp MCP server – quality and maintenance score on Glama

An MCP (Model Context Protocol) server that gives AI assistants direct control over the Xojo IDE. Communicates via stdin/stdout JSON-RPC and forwards IDE commands via a Unix domain socket to the running Xojo IDE process.

Note on the name. This crate was previously published as xmcp. It was renamed to xojo-mcp to avoid confusion with X's (formerly Twitter) unrelated xmcp framework. The installed binary is still xmcp, so existing configs keep working.

macOS only. xojo-mcp talks to the Xojo IDE over a Unix domain socket (/tmp/XojoIDE, or /tmp/$XOJO_IPCPATH — see Choosing which IDE to talk to). Windows is not supported and there is no plan to add it. The reason is not that the IDE lacks an IPC mechanism there: Xojo's IPCSocket is a framework abstraction, and on Windows it is a localhost TCP socket whose port is derived from the path string rather than a filesystem entry. The original XMCP, being itself a Xojo application, gets that transport for free from the framework; this port speaks the wire protocol directly, so Windows would mean reverse-engineering an undocumented path-to-port derivation. Linux is untested rather than ruled out — it uses a Unix socket as macOS does, but the debug- and system-log tools read macOS-only sources.

Attribution

This is a Rust port of XMCP by Øjvind Søgaard Andersen, originally written in Xojo. The original project is licensed under the MIT License.

Related MCP server: scrivener-mcp

Quick start

1. Install

Option A: prebuilt binary (Apple Silicon)

Each release carries an aarch64-apple-darwin tarball that is signed with a Developer ID certificate, notarized by Apple, and accompanied by a detached minisign signature. Grab the latest from Releases, check it, and put the binary on PATH:

minisign -Vm xmcp-*-aarch64-apple-darwin.tar.gz \
    -P RWR7Jy43Mphvu+jrP2FynfYpR7WdP0PvQaSFKfXub7q9Sh7fjtyAX9GU
tar xzf xmcp-*-aarch64-apple-darwin.tar.gz
install -m 755 xmcp-*/xmcp ~/.cargo/bin/xmcp

The .minisig is the check worth doing, and the one the .sha256 beside it cannot do: a checksum file hosted next to the file it vouches for proves only that the download wasn't corrupted, since anyone able to replace one asset can replace both. The signature is made by a key that never touches the release server — the one in the command above, kept in this repository as minisign.pub.

minisign is in MacPorts (port install minisign). A successful verify prints the trusted comment, which names the version and the date it was signed. The .sha256 is still published for anyone who wants it:

shasum -a 256 -c xmcp-*-aarch64-apple-darwin.tar.gz.sha256

The binary is signed with a Developer ID certificate and notarized by Apple, so Gatekeeper lets it run as-is. Check this with:

codesign -dvv ~/.cargo/bin/xmcp   # Authority: Developer ID Application …
codesign -vvv -R="notarized" --check-notarization ~/.cargo/bin/xmcp

(The spctl command is the wrong tool: it answers does not seem to be an app for any plain command-line binary, notarized or not.)

A notarization ticket cannot be stapled to a bare executable — stapler only handles .app, .dmg and .pkg — so the first run needs to reach Apple to resolve the ticket. If that first run has to happen offline, clear the quarantine flag by hand instead:

xattr -d com.apple.quarantine ~/.cargo/bin/xmcp

Intel Macs are not covered — the user must build from source.

Option B: from crates.io

cargo install xojo-mcp

The crate is xojo-mcp; the binary it installs is xmcp.

Option C: from source

git clone https://codeberg.org/brechanbech/xojo-mcp.git
cd xojo-mcp
cargo install --path .

This installs the xmcp binary to ~/.cargo/bin/xmcp. If ~/.cargo/bin is already on PATH (the Rust installer adds it by default), the installation is complete. Verify with:

xmcp --help

Optional: usage-guide.md is embedded into the binary at compile time, so the MCP resource is always available out of the box. If the user wants to tweak the guide without rebuilding, a copy can be placed next to the binary — xmcp will prefer the file on disk over the embedded fallback:

cp usage-guide.md ~/.cargo/bin/

2. Add to Claude Code

Run this from any terminal:

claude mcp add xmcp -- xmcp

Or add it manually to Claude Code settings. Open the MCP config file (on macOS: ~/.claude/settings.json or the project-level .claude/settings.json) and add:

{
  "mcpServers": {
    "xmcp": {
      "command": "xmcp",
      "args": []
    }
  }
}

To enable verbose logging (written to stderr, visible in the Claude Code MCP log):

{
  "mcpServers": {
    "xmcp": {
      "command": "xmcp",
      "args": ["-v"]
    }
  }
}

3. Use it

  1. Start the Xojo IDE and open a project

  2. Start a Claude Code session in the project directory

  3. Claude will automatically discover the 31 xmcp tools and the usage guide

The documentation tools (search_docs, lookup_class, list_doc_topics) need a local copy of the Xojo docs. A script is included to download them from docs.xojo.com:

scripts/update-xojo-docs.sh

This downloads llms.txt and llms-full.txt from docs.xojo.com and splits the full documentation into individual class files under _sources/. Everything goes into ~/Library/Application Support/Xojo/Xojo/<version>/Documentation/, which xmcp auto-detects at startup. Re-run the script periodically to pick up documentation updates — Xojo refreshes these files when new releases are published.

lookup_class returns a shaped summary by default: the class description plus its member tables, with Sphinx cross-reference markup resolved to plain text. That is a few thousand characters where the raw page runs to tens of thousands — String alone is over 70,000. Ask for one member with member, or the unprocessed page with full: true:

lookup_class(class_name: "String")                     # description + member tables
lookup_class(class_name: "String", member: "Middle")   # that member's entry alone
lookup_class(class_name: "String", full: true)         # the raw .rst.txt page

To use a custom location instead:

scripts/update-xojo-docs.sh /path/to/docs
xmcp --docs-path /path/to/docs

Read-only mode

By default, an assistant connected to xmcp can change the user's project: it can rewrite code, create new items, save, and revert. That is the point of the tool — but it is not always what the user might want. If the user only wants an assistant to look at a project — read the code, build it, run it, analyse it, answer questions, consult the documentation — without any possibility of it modifying or overwriting source files, the server must be started in read-only mode.

Read-only mode is enforced by the server itself, not by asking the assistant to behave. It is the single most important safety control in xmcp.

Enabling it

The simplest way to enable read-only mode is to set the --read-only flag on the launch command. In Claude Code:

claude mcp add xmcp -- xmcp --read-only

Or, in a Claude Code settings file (~/.claude/settings.json, or the project-level .claude/settings.json):

{
  "mcpServers": {
    "xmcp": {
      "command": "xmcp",
      "args": ["--read-only"]
    }
  }
}

If the user's MCP client prefers environment variables to command-line arguments, the variable XMCP_READ_ONLY=1 does exactly the same thing. Accepted truthy values are 1, true, yes, and on (case-insensitive):

{
  "mcpServers": {
    "xmcp": {
      "command": "xmcp",
      "args": [],
      "env": { "XMCP_READ_ONLY": "1" }
    }
  }
}

If both the flag and the environment variable are present, either one enabling read-only mode is enough — there is no way to disable it from the other.

Read-only mode is set at launch, not in the conversation

Read-only mode is a property of how the server was started. The user sets it once, in the user's MCP client configuration, before the session begins. From that point on, for the entire lifetime of that server process, the restriction holds regardless of anything typed into the conversation. Neither the user nor the assistant can toggle it mid-session; to change modes the user changes the configuration and reconnects the server. (Restarting the server is required for a change to take effect — a server that is already running will not pick up a changed flag or environment variable.)

What Read-only mode blocks

Read-only mode blocks the eight tools that can modify the project:

Tool

What it would otherwise do

set_code

Overwrite the code of a method, property, or other item

edit_code

Replace an exact substring within an item's code

set_selected_text

Replace the current text selection in the code editor

set_declaration

Rename or retype a method or property

create_project_item

Add a new class, module, window, or other item

revert_project

Discard unsaved changes back to the last save

save_project

Write the project's current in-memory state to disk

run_ide_script

Run an arbitrary IDE script, which can do any of the above and more

run_ide_script is blocked even though it is often used just to read. An IDE script can set an item's code, save, create items and run shell commands through DoShellCommand. The server can't tell a script that only reads from one that writes, so read-only mode blocks the tool. Use the dedicated read tools instead, such as list_project_items, get_code and get_project_info.

Three more tools both read and write, and read-only mode keeps only their read:

Tool

Still reads

Blocked write

property_value

A framework property such as App.OptimizationLevel

Changing it

constant_value

A project constant's value

Changing it

get_item_description

An item's description

Changing it

Each of these reads when called without value and writes when called with it. In read-only mode they are listed without the value parameter, and any call that passes value, even as null, is refused.

Tool annotations

Every tool also carries MCP behaviour hints in tools/list — a title and readOnlyHint, destructiveHint, idempotentHint and openWorldHint — so a client can decide what to confirm before calling it. These are hints, not enforcement, and they describe a tool's effect on the whole machine rather than on the project, so they are stricter than read-only mode: build_project, run_project and agentic_run leave the source alone and stay available in read-only mode, but they write build output or launch an app, so they are not hinted read-only. openWorldHint is false everywhere except run_ide_script, whose DoShellCommand can reach anything. In read-only mode, property_value, constant_value and get_item_description are hinted read-only, because only their read is available.

Everything else remains fully available — navigating and listing items, reading code (get_code), building (build_project), running (run_project), stopping, compile-checking (analyze_project), inspecting descriptions and constants, the debug log tools, and all three documentation tools. In short: browse, build, run, and analyse — just no writing.

Note that build and run are deliberately not blocked. They do not alter source files; they exercise them. build_project writes a compiled app into the build folder and run_project launches a debug session, but neither touches the project itself, so both are considered read-only-safe.

How the enforcement works

The restriction is applied in two independent layers, so it holds even if a client or model misbehaves:

  1. The blocked tools and arguments are removed from the tool list. When the assistant asks the server what tools exist (tools/list), the eight blocked tools are filtered out, and the three read-and-write tools are listed without value. The model never sees a way to write, so it cannot choose to call something it does not know exists. This is what makes the mode effective in practice rather than merely defensive.

  2. Any call that would write is rejected. If a call to one of the eight, or one of the three with value, arrives anyway — a stale tool list, a hand-crafted call, a buggy client — the server refuses it before the request ever reaches the IDE, returning a clear error explaining that read-only mode doesn't allow it.

The assistant is also told, via the embedded usage guide, that when it sees a reduced tool set the project is intentionally read-only and it should work within the available tools rather than trying to route around the restriction.

Running both modes at once

Because the mode is fixed per server, the user can register xmcp twice under different names and choose per task which one to point the assistant at — for example a normal xmcp for editing sessions and a separate xmcp-ro for review-only sessions:

claude mcp add xmcp    -- xmcp
claude mcp add xmcp-ro -- xmcp --read-only

Choosing which IDE to talk to

The IDE listens on a socket whose path is a temporary directory plus the name XojoIDE — or the value of XOJO_IPCPATH, when that variable is set in the IDE's environment. Setting it to a unique name per instance is Xojo's supported way of running several IDEs (say, two releases side by side) and addressing each one independently:

env XOJO_IPCPATH=Xojo2026r2_1 "/Applications/Xojo 2026 Release 2.1/Xojo.app/Contents/MacOS/Xojo" &

xmcp must be given the same value, otherwise it connects to whichever instance owns the default XojoIDE socket:

{
  "mcpServers": {
    "xmcp-2026r2-1": {
      "command": "xmcp",
      "args": [],
      "env": { "XOJO_IPCPATH": "Xojo2026r2_1" }
    }
  }
}

Only a-z, A-Z, 0-9 and _ are valid in the name; xmcp ignores a value containing anything else (with a warning on stderr) and falls back to XojoIDE. Candidate directories are /tmp first — what the IDE itself prefers — then $TMPDIR, which is where the IDE falls back when /tmp is not writable.

None of this applies if the user only ever runs one IDE at a time: the default works.

Requirements

  • macOS (the Xojo IDE IPC socket is macOS-specific)

  • Rust toolchain (rustup — https://rustup.rs)

  • Xojo IDE must be running with a project open before using any tools

Options

xmcp [OPTIONS]
  • --read-only — Read-only mode: hide and reject every tool that modifies the project. Can also be enabled with XMCP_READ_ONLY=1. See Read-only mode for the full description.

  • -v, --verbose — Enable verbose logging to stderr

  • -d, --docs-path <PATH> — Path to Xojo documentation directory (auto-detected if omitted)

  • -V, --version — Print version

  • -h, --help — Print help

Environment: XMCP_READ_ONLY (see above) and XOJO_IPCPATH, which selects the IDE instance to connect to — see Choosing which IDE to talk to.

Differences from the original

This is a drop-in replacement — it exposes all 25 tools from the original with identical names and parameters (analyze_project and debug_control were the last two ported, bringing it to full parity), plus one new tool, edit_code, for 26 in total. Same IDE Communicator Protocol v2 over the Unix domain socket, updated to MCP protocol version 2025-11-25.

Notable differences:

  • Binary name is xmcp

  • edit_code — targeted str_replace-style editing — replaces an exact substring within an item's code in one call (read → replace → write, all server-side), instead of resending the whole item via set_code. The original has no such tool, forcing whole-item rewrites or shell-based text munging for small edits.

  • Writes code directly — no shell/base64 marshalling — set_code and edit_code send source straight through the IPC, with all IDE-script string escaping (quotes, newlines, special characters) handled server-side. There is no need to smuggle code across the bridge by hand — the base64 encode-on-agent / decode-on-Mac / run-via-shell workflow the original forces for file edits simply does not exist here.

  • Enforced read-only mode — --read-only / XMCP_READ_ONLY removes and rejects the mutating tools at the server. The original has no built-in enforcement; it can only be asked, via the prompt, not to write. See Read-only mode.

  • scaffold_code_block and lint_project_file differ from the original's in a few places. A guide on disk that predates their rules falls back to the compiled-in rules instead of failing. The scaffold takes a full signature, so a return type yields a Function, and it takes a body. It refuses a constant value whose escaping is unconfirmed (a backslash or control character) instead of guessing. The lint blames the block that lost its end tag instead of cascading. Its rules were re-checked against Xojo 2026r3: a module goes method, property, constant (the original has constants before properties), and since Xojo loads misordered blocks and Flags/keyword mismatches and resolves them on save, the lint reports those as warnings that say what Xojo will do, not as errors.

  • No Xojo license required — builds with the standard Rust toolchain

  • usage-guide.md has a compiled-in fallback — the original fails silently if the file is missing next to the binary; the Rust version embeds a copy at compile time so the MCP resource is always available. A file on disk still takes priority, so you can edit it without rebuilding.

  • CLI parsing uses clap rather than the original's custom OptionParser. The flags are the same.

Tools

xmcp exposes 31 tools across six categories:

IDE tools (22): list_project_items, get_current_location, select_project_item, get_code, set_code, edit_code, get_selected_text, set_selected_text, build_project, run_project, stop_project, create_project_item, run_ide_script, get_project_info, revert_project, save_project, get_item_description, constant_value, property_value, set_declaration, analyze_project, debug_control

Documentation tools (3): search_docs, lookup_class, list_doc_topics

Debug tools (2): get_debug_log, get_system_log

Agentic Mode (1): agentic_run — runs a project that has Xojo 2026r3's Agentic Mode on and returns its compile errors with locations. It works through files in the project folder, not the IDE socket, so it can be pointed at a project with project_dir even when the socket is unavailable.

Project-file tools (2): scaffold_code_block, lint_project_file — write a correctly formatted #tag block for a .xojo_code or .xojo_window file, and check such a file after editing it on disk. They read the file only, need no IDE, and take their rules from the JSON block in usage-guide.md, so a rule can be corrected without a rebuild.

Cost awareness (1): estimate_request_cost

License

MIT — see LICENSE.md for details.

MCP registry

Ownership-verification token for the MCP registry (read from this crate's rendered README on crates.io):

Registry ownership token: mcp-name: io.github.brechanbech/xojo-mcp

Available Tools

31 tools
agentic_runRun in Agentic ModeA

Agentic Mode only (Xojo 2026r3+): runs the project and returns its compile errors, if any. Unlike run_project, this reports real compiler errors with their locations. It works through files in the project folder rather than IDE scripting, so it also works when the IDE socket does not: it drops XojoRunProject.txt into the project folder and reads back XojoCompileErrors.txt. Compile errors fail the call, one ', line : ' per line. A successful run launches the app in the debugger; stop it with stop_project. If Xojo has not taken the request within 10 seconds, Agentic Mode is off or the project is not open: the request file is removed again and the call fails saying how to turn the mode on. Agentic Mode is the user's opt-in to having the project run to check edits, so this may be called without asking each time.

Inputs: project_dir, wait_seconds.

analyze_projectAnalyze ProjectA
Read-onlyIdempotent

Analyzes the current Xojo project for compile errors and warnings without building. Reports unused variables, type mismatches, deprecated API usage, and other issues. Pass scope="item" to analyze only the currently selected item (faster); default is "project" to analyze everything. Returns 'No errors or warnings found.' or one line per issue with its type, message and location. Any error makes the call fail; warnings alone do not. Nothing is built, run or changed. Waits up to one minute. Needs the Xojo IDE running with the project open.

Inputs: scope.

build_projectBuild ProjectA
Idempotent

Builds the open Xojo project into a standalone app. Call it only when the user asks for a build, and offer run_project first: a run catches errors a build misses. Returns 'Build succeeded.' or the compile errors with their locations; runtime errors are not visible. A success has been reported with no app written, so confirm the built app exists on disk. Waits up to 30 minutes; a build that outlasts that keeps going, and xmcp refuses other requests until the IDE answers. Needs the Xojo IDE running with the project open.

Inputs: reveal, build_type.

constant_valueGet or Set ConstantA
DestructiveIdempotent

Gets or sets the value of a project constant in the Xojo IDE. The constant must already exist in the project. A set is read back, so a name that matches no constant is reported rather than silently ignored; a get of such a name returns an empty value, the same as an empty constant. It changes the value only: to rename or retype a constant, edit its #tag Constant line on disk (scaffold_code_block writes one). A set stays in the IDE until save_project. Needs the Xojo IDE running with the project open.

Inputs: name (required), value.

create_project_itemCreate Project ItemA

Creates a new item in the open Xojo project with the IDE's own command for it, inside parent_location (selected first) or the currently selected item, and returns the new item's location. A new method or property is blank and untitled (e.g. 'Window1.Untitled') and stays selected, so name and type it with set_declaration straight afterwards, with no location. Use this, never a hand edit of the .xojo_project file, to add items: the IDE assigns their IDs. The item stays in the IDE until save_project. There is no matching delete: Xojo's IDE scripting has no command for it. Delete a member by removing its #tag block from the item's file on disk; a whole item has to be deleted by the user in the IDE. Needs the Xojo IDE running with the project open.

Inputs: item_type (required), parent_location.

debug_controlControl Debug SessionA

Controls the Xojo debug session. Actions: "step_over" (execute current line), "step_into" (step into method call), "step_out" (step out of current method), "resume" (continue running), "pause" (pause execution). Requires an active debug session started with run_project; without one the call fails. It returns once the IDE accepts the command and reports neither the new line nor variable values: the user sees those in the IDE's debugger. Needs the Xojo IDE running with the project open.

Inputs: action (required).

edit_codeEdit CodeA
Destructive

Makes a targeted edit to an item's source code by replacing an exact substring, leaving everything else untouched. Reads the current code, replaces old_string with new_string, and writes it back — so you do not need to resend the whole item to change a few lines. old_string must match the existing code exactly (including whitespace and indentation) and, unless replace_all is true, must occur exactly once. Prefer this over set_code for edits to existing code. If old_string is missing or ambiguous nothing is written, and when the only difference is whitespace the error returns the exact text to retry with. Reaches the same items as get_code. The change stays in the IDE until save_project. Needs the Xojo IDE running with the project open.

Inputs: new_string (required), old_string (required), location, replace_all.

estimate_request_costEstimate Request CostA
Read-onlyIdempotent

Rates a planned request's likely token cost as LOW, MEDIUM or HIGH, with the reasons and cheaper ways to do it. It is a keyword heuristic over the request text and the planned tool names, with no project or IDE access and no real token count, so treat it as a prompt to narrow scope rather than a measurement. Most useful before documentation-heavy or project-wide work.

Inputs: request (required), planned_tools.

get_codeGet CodeA
Read-onlyIdempotent

Returns the code of one method, event handler or other code item in the open Xojo project: the item at location, or the one open in the code editor when location is omitted. Giving a location also selects that item in the Navigator. A path that does not exist, or an item with no code editor, is an error; an empty body says so. The code is the body only: the declaration line is not included. Window and control event handlers are reachable on Xojo 2026r3 and later; on earlier releases read the .xojo_window file instead. Copy edit_code's old_string from this output. Needs the Xojo IDE running with the project open.

Inputs: location.

get_current_locationGet Current LocationA
Read-onlyIdempotent

Returns the item selected in the Xojo IDE's Navigator and its type, as ' ()', e.g. 'Module1.Helper (Method)'. Tools whose location is optional act on this item when it is omitted, so check it before relying on that; select_project_item changes it. get_project_info returns the same plus the project's path and Xojo version. Needs the Xojo IDE running with the project open.

Inputs: no named parameters.

get_debug_logGet Debug LogA
DestructiveIdempotent

Returns /tmp/xmcp_debug.log, which a built Xojo app writes from its App.UnhandledException handler when it crashes (usage-guide.md has the handler to add). This is how to see an exception in a built app; in a debug run the IDE's debugger catches exceptions instead, and get_system_log reads System.DebugLog output. No log file is a normal result that says so. With clear, the file is deleted after reading, so the next crash starts a fresh log. Needs no IDE.

Inputs: clear.

get_item_descriptionGet or Set Item DescriptionA
DestructiveIdempotent

Reads or sets the Description of a project item or member (the note shown in the IDE's Inspector, not its code): the one at location, or the selected one. Without value it returns the description; with value it replaces it and returns 'OK', and an empty value clears it. Giving a location also selects that item. A set stays in the IDE until save_project. Needs the Xojo IDE running with the project open.

Inputs: value, location.

get_project_infoGet Project InfoA
Read-onlyIdempotent

Returns facts about the project open in the Xojo IDE, one per line: the .xojo_project path, the Project Directory holding its .xojo_code and .xojo_window files, the Xojo version, the selected location and its type, and whether Agentic Mode was on at the last save. Call it first when working on files on disk, since lint_project_file and direct edits need absolute paths. Needs the Xojo IDE running with the project open.

Inputs: no named parameters.

get_selected_textGet Selected TextA
Read-onlyIdempotent

Returns the text selected in the Xojo IDE's code editor, after a first line 'start= length=' giving its position in characters from the start of the item's code. Fails if no code editor is active. Use it to see what the user has highlighted, or to find offsets for set_selected_text; to read a whole item, use get_code. Needs the Xojo IDE running with the project open.

Inputs: no named parameters.

get_system_logGet System LogA
Read-onlyIdempotent

Returns recent System.DebugLog output of a Xojo app from the macOS unified log (log show): a debug run started by run_project, or a built app. Only lines the Xojo framework logged are returned; when there are none but the process logged something else, up to 200 of those raw entries are returned instead, labelled as such. An empty result almost always means no System.DebugLog call ran, so add one and query again; prefer this over MessageBox for tracing. Needs no IDE.

Inputs: process_name (required), seconds.

lint_project_fileLint Project FileA
Read-onlyIdempotent

Checks a .xojo_code or .xojo_window file on disk for mistakes the IDE reports badly or not at all. Errors are unbalanced #tag/#tag End pairs, which break the file. Warnings are a constant Default value with characters left unescaped, which can silently truncate it, and things Xojo loads but resolves on its own terms: blocks out of order or after #tag ViewBehavior, and a Flags value that disagrees with the visibility keyword, where the warning says which visibility Xojo will use. Run it after editing a project file directly and before revert_project. Returns 'No issues found' or a count and one 'error|warning: line : ' per finding; findings, errors included, are a normal result, and only a file it cannot read or one of another type fails the call. It reads the file only and needs no IDE.

Inputs: path (required).

list_doc_topicsList Documentation TopicsA
Read-onlyIdempotent

Lists the pages in the local Xojo documentation index, one title and URL per line. Unfiltered that is the whole index — about 1,600 entries, 150 KB — so pass a filter. An API page's title is the name lookup_class takes. No match is a normal result, not an error. Use this to find which pages exist; search_docs searches their text, and lookup_class reads one. Reads the installed documentation (fails if none was found) and needs no IDE.

Inputs: filter.

list_project_itemsList Project ItemsA
Read-onlyIdempotent

Lists the project items directly under a location in the open Xojo project's Navigator, as tab-separated names: the top level (App, windows, classes, modules, folders) when location is empty, or what a folder holds. On Xojo 2026r3 an item's members (methods, properties, constants, events) are not listed; read them from its .xojo_code or .xojo_window file, in the folder get_project_info names. A location with nothing listable under it, or one that does not exist, returns a message saying so rather than an error. Needs the Xojo IDE running with the project open.

Inputs: location.

lookup_classLook Up ClassA
Read-onlyIdempotent

Returns the reference page for one Xojo class, control, data type or other API, by name (case-insensitive). If no page has that exact name it tries the Desktop and Web prefixes, so 'Button' finds DesktopButton. By default the page is cut to its description and member tables (methods, properties, events with their signatures), markup stripped; pass member for one member's full entry. An unknown class is an error suggesting search_docs; an unknown member is an error listing the members the page documents. Use this when you know the name; use search_docs for concepts or a name you are unsure of, and list_doc_topics to browse page titles. Reads the installed documentation (fails if none was found) and needs no IDE.

Inputs: class_name (required), full, member.

property_valueGet or Set PropertyA
DestructiveIdempotent

Gets or sets a FRAMEWORK property of a project item in the Xojo IDE — e.g. 'App.OptimizationLevel', 'App.SupportsDarkMode', 'Window1.Title'. This is the supported way to change app and build settings, which otherwise live in the .xojo_project file that must never be hand-edited. IMPORTANT LIMITS: it reaches only properties that are part of the Xojo framework, NOT properties you added yourself, and it CANNOT address controls on a window (there is no 'Window1.PushButton1.Caption'). Values are always strings, even for numeric or boolean properties. A set returns 'OK' without reading the value back, so get it afterwards to confirm it took. A set stays in the IDE until save_project. Needs the Xojo IDE running with the project open.

Inputs: name (required), value.

revert_projectRevert ProjectA
DestructiveIdempotent

Closes the open Xojo project without saving and reopens it from disk, so the IDE picks up project files edited directly. Every unsaved change in the IDE is discarded, the user's included, so ask the user before calling it; the IDE may also show a prompt they must accept. Use it after editing .xojo_code or .xojo_window files on disk, and do not save_project in between, which would overwrite those edits. Not needed in an Agentic Mode project, where Xojo reloads edited files by itself. Needs the Xojo IDE running with the project open.

Inputs: no named parameters.

run_ide_scriptRun IDE ScriptA
Destructive

Executes an arbitrary Xojo IDE script. Use Print to return a value, once: with several Prints the first that says something is returned, and an error outranks output. A script that prints nothing reports that it ran. Do not leave the script early with Return: xmcp appends a final line that tells it the script finished, and a script that never reaches it is waited on until the timeout. Powerful escape hatch — IDE scripting can quit Xojo, close/reopen projects, create or delete items, write files, and invoke shell commands via DoShellCommand. Prefer a dedicated tool when one fits (list_project_items, get_code, build_project, etc.); use this only when nothing else does, and pause before running anything that quits the IDE or touches the shell. It cannot delete project items: IDE scripting has no command for that (see create_project_item). A runtime error comes back with no message or line number. Needs the Xojo IDE running.

Inputs: script (required), timeout.

run_projectRun ProjectA

Runs the open Xojo project in the IDE's debugger. Call it only when the user asks to run. Returns 'Project launched in debug mode.' once the app starts, or the compile errors that stopped it. Runtime exceptions are caught by the IDE's debugger and are invisible here, so ask the user what they see. In an Agentic Mode project, agentic_run returns the compiler's errors with their locations instead. Step through the session with debug_control and end it with stop_project. Waits up to 30 seconds. Needs the Xojo IDE running with the project open.

Inputs: no named parameters.

save_projectSave ProjectA
DestructiveIdempotent

Saves the open Xojo project, writing the IDE's in-memory copy over the project's files on disk. Returns 'Project saved.', or 'No changes to save.' when no file changed within two seconds. Call it when IDE-side edits (set_code, edit_code, create_project_item and the like) should persist, and before editing on disk a file you changed through the IDE. Never call it between editing a file on disk and revert_project: it would overwrite the disk edit. Needs the Xojo IDE running with the project open.

Inputs: no named parameters.

scaffold_code_blockScaffold Code BlockA
Read-onlyIdempotent

Generates a correctly formatted #tag block for a .xojo_code or .xojo_window file: a method, shared method, property, constant, event definition (#tag Hook), control event handler (#tag Events block) or window event handler. Use it instead of writing #tag syntax from memory when editing a project file on disk: it pairs each Flags value with its visibility keyword, escapes a constant's Default value, and indents the body the way the IDE does. It only returns text; insert it yourself, in the block order usage-guide.md's Format Rules give and before #tag ViewBehavior, then check the file with lint_project_file. A control_event result is a whole #tag Events block: if the control already has one, insert just its inner #tag Event … #tag EndEvent. An argument that does not apply to block_kind, a name that is not a Xojo identifier, or a constant value it cannot escape safely is an error. Reads no files and needs no IDE.

Inputs: name (required), block_kind (required), body, type, +4 more.

search_docsSearch DocumentationA
Read-onlyIdempotent

Searches the full text of the local Xojo documentation — guides, tutorials and API pages — for a case-insensitive literal substring. Returns up to max_results excerpts in document order (not ranked), each headed by its section title, with the matching line marked '>>>'. A multi-word query must appear verbatim, so one distinctive word usually finds more. No match is a normal result, not an error. Use this for concepts, how-tos, error messages, or a class whose name you are unsure of; when you know the name, lookup_class returns its reference page directly. Reads the installed documentation (fails if none was found) and needs no IDE.

Inputs: query (required), max_results, context_lines.

select_project_itemSelect Project ItemA
Read-onlyIdempotent

Selects an item or member in the Xojo IDE's Navigator by dot-separated path and returns where the IDE landed and its type. A path that does not exist is an error naming where the IDE is instead, so a near miss shows the right spelling. Changes only the IDE's selection, not the project. Tools that take a location select it themselves; use this for those that act on the current item: get_selected_text, set_selected_text, analyze_project with scope 'item', and create_project_item without parent_location. Needs the Xojo IDE running with the project open.

Inputs: item_path (required).

set_codeSet CodeA
DestructiveIdempotent

Replaces the whole code of one method, event handler or other code item in the open Xojo project: the item at location, or the one open in the code editor when location is omitted. Everything the item held is overwritten, so for a change to existing code prefer edit_code, which sends only the part that changes. The name, parameters and return type are not part of the code; set_declaration changes those. A path that does not exist, or an item with no code editor, is an error and nothing is written. Reaches the same items as get_code. The change stays in the IDE until save_project. Needs the Xojo IDE running with the project open.

Inputs: code (required), location.

set_declarationSet DeclarationA
DestructiveIdempotent

Sets the name, type, scope and parameters of the CURRENT method or property in the Xojo IDE. This is the other half of create_project_item: DoCommand "NewProperty" creates a blank, untyped property, and this is what names and types it. NOTE the two argument meanings — for a METHOD, parameters is the parameter list ('x As Integer, y As Integer') and data_type is the return type; for a PROPERTY, parameters is the DEFAULT VALUE and data_type is the property's type. Every field is replaced, so pass the current values of those you are keeping. Returns 'OK: '. A constant or other item kind is refused with an error that names it, as is a location that does not exist. The change stays in the IDE until save_project. Needs the Xojo IDE running with the project open.

Inputs: name (required), scope, location, data_type, +2 more.

set_selected_textReplace Selected TextA
Destructive

Replaces the selection in the Xojo IDE's code editor with text, or inserts it at the cursor when nothing is selected. Pass selection_start to select a range first; otherwise it acts on whatever the user or an earlier call left selected. Fails if no code editor is active. For a change you can describe by its content, edit_code is more reliable because it does not depend on offsets. The change stays in the IDE until save_project. Needs the Xojo IDE running with the project open.

Inputs: text (required), selection_start, selection_length.

stop_projectStop Debug SessionA
DestructiveIdempotent

Ends the Xojo IDE's debug session by killing the app it is running, as started by run_project or agentic_run. The app is stopped outright, so anything it has not saved is lost. Returns 'Debug session stopped.' whether or not anything was running. Needs the Xojo IDE running with the project open.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 31 tools

    Disambiguation4/5

    Tools span distinct domains (IDE editing, build/run, on-disk file tooling, docs, logs), and overlapping clusters like get_code/set_code/edit_code/set_selected_text are carefully disambiguated by descriptions (whole-item vs. selection vs. targeted substring edit). A few pairs still require reading: run_project vs agentic_run, get_current_location vs get_project_info, and constant_value/property_value vs get_item_description all touch adjacent concepts.

    Naming Consistency4/5

    Most names follow a verb_noun pattern (get_code, set_code, edit_code, create_project_item, list_project_items, lint_project_file, search_docs). Deviations like constant_value, property_value and debug_control use noun phrases, though they remain readable and predictable given the get/set dual semantics.

    Tool Count3/5

    31 tools is at the heavy end and exceeds the comfortable 3-15 band; several could be merged (constant_value/property_value/get_item_description, run_project/agentic_run). However, the surface genuinely spans IDE automation, code editing, file linting/scaffolding, documentation lookup and logging, and no tool appears purely trivial.

    Completeness4/5

    Coverage is broad: read/write/edit code, item creation, declarations, constants/properties, build, run, debug stepping, save/revert, on-disk scaffolding and linting, docs search and logs. The notable gap is item deletion (explicitly impossible via IDE scripting, with a documented workaround), which is a minor rather than blocking hole.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      MCP server for macOS Automator that enables AI to control Mac computers by executing AppleScript/JXA, running automation workflows, and performing system-level tasks like sending emails and organizing files.
      6
      6 npm
      4
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Local MCP server that exposes Scrivener projects to AI clients, enabling project creation, binder navigation, document read/write, and metadata updates without opening Scrivener.
      1
      -
    • A
      license
      B
      quality
      D
      maintenance
      MCP server that enables AI to fully control macOS — mouse, keyboard, terminal, screenshots, window management, UI element detection, and provides AI-optimized information reporting.
      36
      21 npm
      MIT