Commit a560bbe
authored
Add embedded MCP server exposing MapMap control over local HTTP (#612)
* Add embedded MCP server exposing MapMap control over local HTTP
Adds a native Model Context Protocol server (QHttpServer, JSON-RPC 2.0)
running on the GUI thread, exposing sources, layers, playback, project
I/O and state read-back to MCP clients at http://localhost:<port>/mcp.
The port is configurable via QSettings (mcpListeningPort, default 49452)
and a new -m/--mcp-port CLI flag; 0 disables the server. Requires the
QtHttpServer module (and its QtWebSockets dependency).
Add port preference UI
Adapt McpServer to Paint->Source and Mapping->Layer renames. Fix
QHttpServer::listen() removal in Qt 6.11 by using QTcpServer::listen()
with QHttpServer::bind(). Add MCP port spinbox to Preferences Controls
tab (0 disables the server).
* Make MCP server build optional when qthttpserver is unavailable
Use qtHaveModule(httpserver) to conditionally enable MCP support,
guarded by HAVE_MCP preprocessor define throughout the codebase.
This fixes CI builds on platforms without the Qt HttpServer module.
* Add create_layer tool to MCP server for triangle, quad and ellipse shapes
Move addMesh/addTriangle/addEllipse from private to public slots in
MainWindow so the MCP server can call them directly.
* Add Claude Code skill for controlling MapMap via MCP
* Add set_vertices MCP tool and update skill doc
Allows setting the output shape vertices of a layer via MCP.
Documents vertex ordering and the new tool in the skill file.
* Guard mcpListeningPort write in writeSettings with HAVE_MCP
The member variable is only declared under #ifdef HAVE_MCP,
so writing it in writeSettings also needs the guard to fix
the build when qthttpserver is unavailable.1 parent c9a0008 commit a560bbe
11 files changed
Lines changed: 938 additions & 3 deletions
File tree
- .claude/skills
- src
- app
- control
- core
- gui
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
107 | 114 | | |
108 | 115 | | |
109 | 116 | | |
| |||
212 | 219 | | |
213 | 220 | | |
214 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
215 | 228 | | |
216 | 229 | | |
217 | 230 | | |
| |||
0 commit comments