mcp-swing-17

io.github.kirnfsPublished by GitHub account kirnfsv1.5.0-java17Updated Nov 4, 2026

Java 17 MCP server and agent for automating Swing and JavaFX desktop applications.

VerifiedSTDIODesktop onlyBrowser AutomationDeveloper Tools

Overview

AI-generated overview

Java 17 MCP server and agent that lets an assistant inspect and drive running Swing and JavaFX desktop applications.

What you can do
  • Attach to an already running Java desktop application by process ID
  • Inspect and interact with Swing and JavaFX windows, menus and dialogs
  • Close windows, with the focused dialog as the default target
  • Optionally evaluate Java code in the target application when that capability is enabled
When to use it
Useful for development and testing of Java Swing or JavaFX desktop apps, where an assistant should drive the UI or check window and dialog state. It is a development/testing tool rather than something for production or end-user machines.
Requirements
Runs locally over stdio, normally launched by an MCP client. Needs JDK 17 and the built server and agent JAR files, with the agent JAR path passed in the SWING_MCP_AGENT_JAR environment variable. Building from source needs the provided build scripts; Maven is downloaded on first use. The target Java application must already be running so the agent can attach by PID.
Before you install
The agent can control a live application, so treat it as a development and testing tool only. Keep evaluate_java disabled, since it runs code inside the target application. The agent listens on loopback only; do not expose its port or the response-file token. Real-mouse robot input is disabled by default. close_window closes only the focused dialog unless a window index is given explicitly.

Installation

In SourceWeft

  1. Open mcp-swing-17 in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

mcp-swing-17

MCP server and Java agent for automating Swing and JavaFX desktop applications, built for Java 17. Fork of Swing MCP.

  • Version: 1.5.0-java17
  • Upstream commit: abfacfa
  • License: MIT (see LICENSE)
  • Usage guide: USAGE.md

Contents

dist/mcp-swing-17-server.jar    MCP server (stdio)dist/mcp-swing-17-agent.jar     Java agent loaded into the target JVMdist/*.mcpb                      MCPB bundle for one-click clientsbuild.ps1                       Windows build (JDK 17)build.sh                        Linux/macOS buildmcp-swing-17-server/            server sourcesmcp-swing-17-agent/             agent sourcesmcp-swing-17-common/            shared classes

Build

powershell
powershell -NoProfile -ExecutionPolicy Bypass -File build.ps1

Requires JDK 17. Maven 3.9.9 is downloaded into .build/ on first use.

On Linux/macOS:

bash
./build.sh

or:

bash
mvn -s maven-settings.xml -DskipTests package

Run

text
SWING_MCP_AGENT_JAR=<path>/dist/mcp-swing-17-agent.jarjava -jar <path>/dist/mcp-swing-17-server.jar

The server uses stdio and is normally started by an MCP client. The agent attaches to an already running Java application by PID through attach_to_app.

json
{  "mcpServers": {    "mcp-swing-17": {      "command": "java",      "args": ["-jar", "<path>/dist/mcp-swing-17-server.jar"],      "env": {        "SWING_MCP_AGENT_JAR": "<path>/dist/mcp-swing-17-agent.jar"      }    }  }}

Differences from upstream

  1. Java 17 instead of Java 21: virtual threads replaced with a regular executor.
  2. Removed the Java 17-incompatible JMenu instanceof JMenuItem pattern.
  3. Replaced List.getFirst() with get(0).
  4. Relocated the agent's Jackson package so the target application's Jackson cannot shadow it.
  5. java.version=17, JavaFX 17.
  6. Real-mouse robot input is disabled by default.
  7. close_window closes only the focused dialog unless a windowIndex is passed explicitly.

Security

  • the agent listens on loopback only;
  • keep evaluate_java disabled;
  • use as a development/testing tool;
  • do not expose the agent port or the response-file token.

Source: README.md at commit 6f767b8

Tools

0
SourceWeft started this package once in an isolated sandbox, without credentials, to list its tools. That failed: the package type cannot run in the sandbox.

Version history

1
  1. v1.5.0-java17LatestNov 4, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts