Skip to content

Add embedded MCP server exposing MapMap control over local HTTP#612

Draft
aalex wants to merge 2 commits into
devfrom
feat-mcp
Draft

Add embedded MCP server exposing MapMap control over local HTTP#612
aalex wants to merge 2 commits into
devfrom
feat-mcp

Conversation

@aalex
Copy link
Copy Markdown
Member

@aalex aalex commented May 24, 2026

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:/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).

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).
@aalex aalex added this to the 1.0 milestone May 24, 2026
@aalex aalex self-assigned this May 24, 2026
@aalex aalex marked this pull request as draft May 24, 2026 01:49
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant