Replace SSE with REST API for web UI - #14
Merged
Merged
Conversation
Remove MCP-over-SSE from the HTTP server. The serve command is now a
plain HTTP server with REST endpoints for the web UI:
GET /api/context - wiki overview
GET /api/pages?prefix=... - list pages
GET /api/pages/{path} - get page
POST /api/pages - create page
PUT /api/pages/{path} - update page
DELETE /api/pages/{path} - delete page
GET /api/search?q=... - full-text search
GET /api/backlinks/{path} - get backlinks
Web UI client rewritten from SSE/JSON-RPC MCPClient (EventSource,
session handshake, pending request map) to plain fetch() REST calls.
No more reconnection logic, session management, or protocol
negotiation.
Agents use stdio (mind-map with no args). The go-sdk/mcp import
is now only used by the stdio transport in runStdio.
README: rewrite architecture section to show stdio for agents, REST
for web UI. Remove all SSE/MCP-over-HTTP references. Update diagram,
mode table, MCP client config (now just {command: mind-map}), and
feature list (SQLite locking, git sync).
install.sh: remove USE_SSE flag and SSE MCP config. Always configure
clients with stdio ({command: mind-map}). Service is HTTP-only for
web UI. Remove MCP endpoint from service output.
install.ps1: same changes as install.sh for Windows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace MCP-over-SSE with a plain REST API for the web UI. Agents use stdio, browsers use REST.
What changed
Server (
cmd/mind-map/main.go)mcp.NewSSEHandlerand/mcpendpointGET /api/context-- wiki overviewGET /api/pages?prefix=...-- list pagesGET /api/pages/{path}-- get pagePOST /api/pages-- create pagePUT /api/pages/{path}-- update pageDELETE /api/pages/{path}-- delete pageGET /api/search?q=...-- full-text searchGET /api/backlinks/{path}-- backlinksgo-sdk/mcpimport now only used for stdio transportWeb UI (
webui/src/mcp.ts)fetch()REST callsArchitecture
Why
Testing
go vetclean