# Swing MCP

> Swing MCP is an open-source MCP server for developer tools. Let an AI assistant operate Java Swing and JavaFX desktop apps with no API needed. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** Windows, macOS, Linux, CLI, self-hosted
- **Website:** https://crosstech.solutions/swing-mcp
- **Repository:** https://github.com/crosstech-solutions-bv/swing-mcp
- **MCP Registry name:** io.github.crosstech-solutions-bv/swing-mcp
- **Categories:** developer tools, browser automation
- **Listing updated:** 2026-11-14

## About

A lot of business software is Java desktop software with no API and no web UI, such as ERP clients, point-of-sale and lab systems. Swing MCP gives an assistant a way in without changing the application. A Java agent is loaded into the target JVM, either at launch or by attaching to a running process id, and the 39 tools run on the toolkit's own UI thread, so it behaves like a fast, patient user.

Instead of reading pixels, the assistant gets a structured snapshot of the component tree with stable ids for every button, field, table, tree, menu and dialog. It can click, type, fill forms, select table cells and tree nodes, drive menus, read whole tables as data, take screenshots and wait for UI conditions. Modal dialogs are detected and answered rather than blocking the session, and several apps can run in parallel sessions. JavaFX is supported since version 1.3.0, and mixed apps work.

Safety defaults: the agent listens on loopback only with a per-session token, evaluate_java is off unless enabled, and tools carry read-only or destructive annotations. It needs Java 21 or newer and installs as an .mcpb file in Claude Desktop or via a JAR in other clients. The project is open source and its maker also builds custom connectors.

## Features

- **Component tree snapshot:** Returns every control with a stable id instead of pixel guessing.
- **Full UI actions:** Click, type, fill fields, pick combo options, drive menus and drag in Swing.
- **Structured data reads:** Reads whole tables, lists and trees plus screenshots.
- **Swing and JavaFX:** One tool set drives either toolkit, or both in one app.
- **Dialog handling:** Detects and answers modal dialogs and waits for UI conditions.
- **Locked-down defaults:** Loopback-only agent, session token and evaluate_java off by default.

## Good for

- Automate repetitive entry in an old in-house Java client
- Read a legacy table's contents into structured data
- Test a Swing or JavaFX app's flows through an assistant
- Drive a point-of-sale or lab system with no API

## Install

### Claude Code (Terminal)

```sh
claude mcp add swing-mcp -- npx -y https://github.com/crosstech-solutions-bv/swing-mcp/releases/download/V1.4.0/swing-mcp.mcpb
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "swing-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/crosstech-solutions-bv/swing-mcp/releases/download/V1.4.0/swing-mcp.mcpb"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "swing-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/crosstech-solutions-bv/swing-mcp/releases/download/V1.4.0/swing-mcp.mcpb"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "swing-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/crosstech-solutions-bv/swing-mcp/releases/download/V1.4.0/swing-mcp.mcpb"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "swing-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/crosstech-solutions-bv/swing-mcp/releases/download/V1.4.0/swing-mcp.mcpb"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "swing-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/crosstech-solutions-bv/swing-mcp/releases/download/V1.4.0/swing-mcp.mcpb"
      ]
    }
  }
}
```

## Tools

- `launch_app`: Starts a Java app with the agent preloaded.
- `attach_to_app`: Attaches to a running JVM by process id.
- `take_snapshot`: Returns the UI as a component tree.
- `click`: Clicks a component.
- `fill`: Fills a text field or similar input.
- `wait_for`: Waits for a UI condition.
- `stop_app`: Stops a launched app.
- `close_window`: Closes a window.
- `evaluate_java`: Runs code in the target JVM, off by default.

## FAQ

### What do I need installed?

Java 21 or newer on your PATH; Claude Desktop installs the swing-mcp.mcpb file as an extension.

### Does it work with JavaFX?

Yes, since version 1.3.0, and with apps that mix both toolkits.

### Can it run arbitrary code in my app?

Only if you switch on evaluate_java; it is off by default.

### Which clients are documented?

Claude Desktop, Claude Code, VS Code with Copilot, Cursor, Windsurf, IntelliJ IDEA, Codex CLI and Gemini CLI.

### Is Swing MCP free?

Yes. Swing MCP is open source, so you can use and self-host it for free.

### How do I add Swing MCP to Claude Code?

Run this command in your terminal: claude mcp add swing-mcp -- npx -y https://github.com/crosstech-solutions-bv/swing-mcp/releases/download/V1.4.0/swing-mcp.mcpb

### What are the best alternatives to Swing MCP?

The closest alternatives to Swing MCP are REA, Browser Use, Scrapling MCP Server, Codebase Memory and GitHub.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Browser Use](https://ai-powered.com/mcp/browser-use): Browser Use is a freemium MCP server for browser automation.
- [Scrapling MCP Server](https://ai-powered.com/mcp/scrapling-mcp-server): Scrapling MCP Server is an open-source MCP server for web search and scraping.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/swing-mcp
