Awesome Java Newsletter
Read post

Your Codename One App Can Be an MCP Server

Codename One's JavaSE port can now act as a local MCP (Model Context Protocol) server, exposing a running simulator or desktop tool to AI agents like Codex or Claude Code. Instead of coordinate-based screenshot automation, agents interact via a semantic accessibility tree — finding UI elements by role and label, performing actions like activating buttons or setting text, and calling application-defined typed tools. The server starts explicitly via `MCP.startSocketServer()` or `MCP.startStdioServer()`, and all actions run on the event dispatch thread. Apps can also publish custom domain tools with JSON schemas. Screenshots remain available as a complement to the semantic tree. Currently limited to the JavaSE port; mobile and native targets are not yet supported.

    #java#accessibility#mcp
Aug 05•5m read time•From dev.to
Post cover image
Table of contents
The agent reads meaning, not coordinatesStarting a server is explicitDesktop tools get a menu without application codeYour app can publish domain toolsScreenshots remain availableThe scope is JavaSE today
784 Impressions
Awesome Java Newsletter's image
Awesome Java Newsletter

Java_LibHunt serves as resource for Java developers offering a curated selection of libraries, frame...

628 Followers

•

3.9K Upvotes

codenameone's user avatar
Shai Almog
@codenameone
Joined Aug 23. 2021
1.3K

Author, DevRel, Blogger, Open Source Hacker, Java Rockstar, Speaker, Instructor & Entrepreneur

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard