Open source · MIT · Java 21+

Swing MCP: AI hands for Java desktop apps — Swing and JavaFX.

An MCP server that lets Claude and other AI assistants operate any Java Swing or JavaFX application: see the UI as a component tree, click, type, fill forms, read tables and trees, drive menus and dialogs. No API. No rewrite. The app never knows.

Download for Claude Desktop Source on GitHub swing-mcp.mcpb · one file, installs as a Claude Desktop extension · listed in the official MCP Registry as io.github.crosstech-solutions-bv/swing-mcp

What the assistant can do once it's inside.

The agent loads into the app's JVM and exposes 39 tools over MCP. Everything runs on the toolkit's own UI thread — the Swing event thread or the JavaFX Application Thread — so it behaves like a very fast, very patient user. An app that mixes both works too; you never have to say which it is.

See the UI

A structured snapshot of the component tree — every button, field, table, tree, menu and dialog with a stable id — instead of guessing from pixels. Find components by text, name, tooltip or class.

Act in it

Click, hover, focus, type, fill text fields and spinners, pick combo-box options, select table cells and tree nodes, drive menus and right-click menus, scroll, press keys, drag (Swing).

Read data out

Whole table contents (JTable or TableView) as structured data, list and tree items, component properties, the clipboard, and screenshots of a window or a single component.

Handle the awkward parts

Modal dialogs are detected and answered instead of blocking the session. wait_for waits for UI conditions. Several apps can be driven in parallel sessions.

Launch or attach

Start the app with the agent preloaded, or attach to an already-running JVM by process id — useful for the tool that has been open on someone's desk since 2014.

Watch

Install and first use, in three minutes.

Claude Desktop, Claude Code and IntelliJ IDEA, then the assistant driving a real Swing app: every tool call in the side panel comes from the actual MCP log of that session.

Captions are burned in. Prefer text? The installation guide covers the same steps plus VS Code, Cursor and Windsurf.

JavaFX

Same tools, JavaFX app.

Since 1.3.0 the agent drives JavaFX as well as Swing, and you never say which. This is the JavaFX demo driven live through the real server: launch, form, table, list, tree, menu, modal dialog. Every tool call in the side panel comes from the MCP log of that session.

96 seconds, captions burned in. What is different underneath: a JavaFX control is a small scene-graph of its own (text, caret, selection); the snapshot reports it as one node, so the model sees what a user sees. Details in the design note.

Pick your client

One minute per client.

Same server, eight clients. Each video shows the install for that client, then the assistant driving a real Swing app. The steps are next to the video; the full guide is one click further.

Swing MCP in Claude Desktop

  1. Java 21+ on your PATH.
  2. Download and open swing-mcp.mcpb; click Install.
  3. It appears under Settings → Extensions. Ask Claude to launch_app your application.

Full guide for Claude Desktop →

Swing MCP in Claude Code

  1. Java 21+; unzip swing-mcp.mcpb for the two jars in server/.
  2. Register the server (add -s user for every project):
claude mcp add swing \
  --env SWING_MCP_AGENT_JAR=/path/to/swing-mcp/server/swing-mcp-agent.jar \
  -- java -jar /path/to/swing-mcp/server/swing-mcp-server.jar

claude mcp list → swing … ✓ Connected

Full guide for Claude Code →

Swing MCP in VS Code + GitHub Copilot

  1. Java 21+; unzip swing-mcp.mcpb for the two jars.
  2. Create .vscode/mcp.json (or MCP: Add Server). VS Code uses servers and "type": "stdio":
{
  "servers": {
    "swing": {
      "type": "stdio",
      "command": "java",
      "args": ["-jar", "/path/to/swing-mcp/server/swing-mcp-server.jar"],
      "env": { "SWING_MCP_AGENT_JAR": "/path/to/swing-mcp/server/swing-mcp-agent.jar" }
    }
  }
}

Click Start; in Copilot Chat choose Agent mode and open the tools picker.

Full guide for VS Code + GitHub Copilot →

Swing MCP in Cursor

  1. Java 21+; unzip swing-mcp.mcpb for the two jars.
  2. Cursor Settings → Tools & Integrations → MCP Tools → New MCP Server opens mcp.json:
{
  "mcpServers": {
    "swing": {
      "command": "java",
      "args": ["-jar", "/path/to/swing-mcp/server/swing-mcp-server.jar"],
      "env": { "SWING_MCP_AGENT_JAR": "/path/to/swing-mcp/server/swing-mcp-agent.jar" }
    }
  }
}

Green dot = connected. The agent asks before each tool call by default. Cursor caps active MCP tools (40 at the time of writing); Swing MCP exposes 39.

Full guide for Cursor →

Swing MCP in Devin Desktop (Windsurf)

  1. Java 21+; unzip swing-mcp.mcpb for the two jars.
  2. Settings → Cascade → MCP Servers → raw config ~/.codeium/windsurf/mcp_config.json:
{
  "mcpServers": {
    "swing": {
      "command": "java",
      "args": ["-jar", "/path/to/swing-mcp/server/swing-mcp-server.jar"],
      "env": { "SWING_MCP_AGENT_JAR": "/path/to/swing-mcp/server/swing-mcp-agent.jar" }
    }
  }
}

Cognition renamed Windsurf to Devin Desktop in 2026; the config path is unchanged. Tools can be toggled per server (100 active tools max).

Full guide for Devin Desktop (Windsurf) →

Swing MCP in IntelliJ IDEA

  1. Java 21+; unzip swing-mcp.mcpb for the two jars.
  2. Settings → Tools → AI Assistant → Model Context Protocol (MCP) → + → STDIO, paste:
{
  "mcpServers": {
    "swing": {
      "command": "java",
      "args": ["-jar", "/path/to/swing-mcp/server/swing-mcp-server.jar"],
      "env": { "SWING_MCP_AGENT_JAR": "/path/to/swing-mcp/server/swing-mcp-agent.jar" }
    }
  }
}

OK, Apply; the status icon lists the 39 tools. Start a new AI Assistant chat.

Full guide for IntelliJ IDEA →

Swing MCP in OpenAI Codex CLI

  1. Java 21+; unzip swing-mcp.mcpb for the two jars.
  2. Register the server (written to ~/.codex/config.toml):
codex mcp add swing \
  --env SWING_MCP_AGENT_JAR=/path/to/swing-mcp/server/swing-mcp-agent.jar \
  -- java -jar /path/to/swing-mcp/server/swing-mcp-server.jar

codex mcp list shows swing … enabled; /mcp inside a session lists the tools.

Full guide for OpenAI Codex CLI →

Swing MCP in Gemini CLI

  1. Java 21+; unzip swing-mcp.mcpb for the two jars.
  2. Register the server (drop -s user for the current project only):
gemini mcp add -s user swing java \
  -e SWING_MCP_AGENT_JAR=/path/to/swing-mcp/server/swing-mcp-agent.jar \
  -- -jar /path/to/swing-mcp/server/swing-mcp-server.jar

gemini mcp list → ✓ swing … Connected. Trust the folder first if it says the servers are disabled.

Full guide for Gemini CLI →

Two minutes to first click.

Have Java 21 or newer on your PATH

Any JDK build works. Check with java -version.

Download and open swing-mcp.mcpb

Claude Desktop installs it as an extension. Using Claude Code, VS Code, Cursor, Devin Desktop (Windsurf), IntelliJ, Codex CLI or Gemini CLI instead? The installation guide has the jar-based config for each, and Pick your client above has a one-minute video for each.

Point it at your app

Ask the assistant to launch your application, or attach to a running one.

launch_app path/to/your-app.jar   or   attach_to_app pid=12345

Take a snapshot and go

take_snapshot returns the component tree with ids; from there the assistant clicks, fills and reads on its own. The tool reference lists all 39 tools on one page.

Forms tab of the demo app filled by Swing MCP
Text fields, password fields, spinners and text areas filled directly.
JTable row selected and read by Swing MCP
Table cells selectable; table models extracted as structured data.
Modal About dialog detected by Swing MCP
Modal dialogs detected and handled instead of blocking the session.

And the same three operations on the JavaFX demo — same tools, same session, nothing to configure.

JavaFX form filled by Swing MCP: text field, password, combo box, spinner, check box, text area
JavaFX controls filled through the same fill and select_option tools.
JavaFX TableView read as rows and columns by Swing MCP
A JavaFX TableView comes back as rows and columns, not pixels.
JavaFX modal Alert detected by Swing MCP
A JavaFX Alert is reported as pending, listed with its real text, and dismissed.
Why we built it

A lot of business software is a Swing or JavaFX window with no door.

ERP clients, point-of-sale screens, lab and logistics tools, internal apps written a decade ago: they work, nobody dares rewrite them, and they have no API. Swing MCP gives that software a safe, permissioned door into the AI era, without changing the application.

UI testing that reads the tree

Exploratory and regression tests against the real application, driven by an assistant that sees components, not screenshots. Reproduce a bug from a sentence.

Data out of screens

Read that table the vendor never exposed. Pull records out of a tool whose only export is a printout.

Repetitive clicks, delegated

The forty-screen data-entry job, the daily status check, the nightly close: describe it once, let the assistant drive.

Straight answers.

Does it change my application?

No. The agent is a standard Java agent loaded into the JVM at launch (-javaagent) or attached afterwards by process id. Your code, jars and data are untouched; remove the agent and nothing remains.

Does it work with JavaFX, SWT or Electron apps?

JavaFX: yes, since 1.3.0 — the same tools drive Swing, JavaFX, and apps that mix the two in one JVM. A JavaFX control comes back as one node, not its whole rendering sub-tree, so the model sees what a user sees. Two tools stay Swing-only, drag and evaluate_java, and say so if called on a JavaFX component. SWT and Electron: not today; if you run a different desktop stack, that is exactly the kind of connector we build for clients — see below.

Which AI clients does it work with?

Anything that speaks MCP over stdio. Claude Desktop installs the bundle in one click; Claude Code, VS Code + Copilot, Cursor, Devin Desktop (Windsurf), IntelliJ IDEA, Codex CLI and Gemini CLI use the two jars — one-minute video and steps for each.

Is it safe to run against a production tool?

The agent only listens on localhost, only accepts commands carrying the per-session token it generated, and code execution inside the JVM is disabled by default. The assistant can do anything a user at the keyboard could — so give it the same account and permissions you would give a new colleague, and start on a test environment.

What does it cost?

Nothing. MIT licence, no telemetry, no account. CrossTech makes its living building connectors and AI systems for clients; Swing MCP is our public proof that we can.

Need it wired into your own application?

We connect AI assistants to the software businesses actually run — Swing and JavaFX desktops, web apps, internal tools, databases — with permissions, audit logs and the code handed over to you. Start with a free 30-minute look at your systems; if a connector isn't worth it for you, we'll say so.

Book a free audit

How we build MCP connectors →