MCP server for inspecting and automating Tkinter GUI applications
Project description
tkinter-mcp
MCP server for inspecting and automating Tkinter GUI applications.
Overview
An MCP server that enables AI agents to launch, inspect, and interact with Tkinter applications. The server auto-injects an inspection agent via monkey-patching. No modifications to target apps required.
Tools
| Tool | Description |
|---|---|
launch_app |
Start a Tkinter app with inspection enabled |
is_connected |
Check if an app is currently connected |
get_ui_layout |
Get the widget tree as structured JSON |
view_application |
Capture a high-quality JPEG screenshot |
view_application_thumbnail |
Capture a small thumbnail screenshot |
get_window_info |
Get window position and dimensions |
click_widget |
Click a widget (left/right/middle, single/double) |
type_text |
Type text into Entry or Text widgets |
get_widget_by_text |
Find a widget by its text content |
focus_widget |
Set keyboard focus to a widget |
get_focused_widget |
Get the currently focused widget |
get_widget_value |
Get widget value (Entry, Text, Scale, Checkbox, etc.) |
set_widget_value |
Set widget value based on widget type |
get_widget_options |
Get options for Combobox or Listbox |
drag_widget |
Drag and drop between two widgets |
close_app |
Terminate the application |
Installation
uvx (Quick Start)
claude mcp add tkinter-mcp-server -- uvx tkinter-mcp-server
Note: Apps using PIL/ImageTk may have compatibility issues with uvx. Use pip install instead.
pip (Recommended for PIL apps)
pip install tkinter-mcp-server
claude mcp add tkinter-mcp-server -- tkinter-mcp-server
Claude Desktop
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"tkinter": {
"command": "tkinter-mcp-server"
}
}
}
For uvx: use "command": "uvx" with "args": ["tkinter-mcp-server"]
How It Works
The server launches Tkinter apps through a custom launcher that patches tkinter.Tk.__init__. This injects an agent that communicates over a local socket, enabling thread-safe inspection and control of the GUI.
flowchart LR
A[MCP Client] <--> B[MCP Server]
B <--> C[Socket]
C <--> D[Agent]
D <--> E[Tkinter App]
Requirements
- Python 3.10+
- macOS, Windows, or Linux
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tkinter_mcp_server-0.9.3.tar.gz.
File metadata
- Download URL: tkinter_mcp_server-0.9.3.tar.gz
- Upload date:
- Size: 2.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3217ae705486ef8f993a78cb4b40b9ce47ea012bed3087d1746c63dbdaaa993b
|
|
| MD5 |
d72e3db7f773517145b42cb37a2091b0
|
|
| BLAKE2b-256 |
e89ef175b8da929b71fac66efd8d91d23f0d645037a82a5589cc333761e34ac3
|
Provenance
The following attestation bundles were made for tkinter_mcp_server-0.9.3.tar.gz:
Publisher:
publish.yml on tctibbs/tkinter-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tkinter_mcp_server-0.9.3.tar.gz -
Subject digest:
3217ae705486ef8f993a78cb4b40b9ce47ea012bed3087d1746c63dbdaaa993b - Sigstore transparency entry: 780799060
- Sigstore integration time:
-
Permalink:
tctibbs/tkinter-mcp-server@7a0f58da4f3b99599443a7ee6afaf9719b0b117d -
Branch / Tag:
refs/tags/v0.9.3 - Owner: https://github.com/tctibbs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7a0f58da4f3b99599443a7ee6afaf9719b0b117d -
Trigger Event:
release
-
Statement type:
File details
Details for the file tkinter_mcp_server-0.9.3-py3-none-any.whl.
File metadata
- Download URL: tkinter_mcp_server-0.9.3-py3-none-any.whl
- Upload date:
- Size: 24.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cddf2757affb0b2c4690b24055159d923bbfe7356ccefaffe028300f1ee3b40f
|
|
| MD5 |
af58746fcd8513315d8f5fcdfeed974d
|
|
| BLAKE2b-256 |
6e6ed6ce9d8016983d3eb5a62959828f51d2e49348bc70e5a5d754ee2cb46c5f
|
Provenance
The following attestation bundles were made for tkinter_mcp_server-0.9.3-py3-none-any.whl:
Publisher:
publish.yml on tctibbs/tkinter-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tkinter_mcp_server-0.9.3-py3-none-any.whl -
Subject digest:
cddf2757affb0b2c4690b24055159d923bbfe7356ccefaffe028300f1ee3b40f - Sigstore transparency entry: 780799061
- Sigstore integration time:
-
Permalink:
tctibbs/tkinter-mcp-server@7a0f58da4f3b99599443a7ee6afaf9719b0b117d -
Branch / Tag:
refs/tags/v0.9.3 - Owner: https://github.com/tctibbs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7a0f58da4f3b99599443a7ee6afaf9719b0b117d -
Trigger Event:
release
-
Statement type: