You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-44Lines changed: 35 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,26 +4,25 @@
4
4
5
5
**A wiki for AI agents — and humans too.**
6
6
7
-
`mind-map` is a wiki engine that stores pages as plain markdown files, indexes them with SQLite FTS5, and exposes everything via MCP over HTTP/SSE. AI agents and humans connect to the same server using the same protocol. One binary, zero runtime dependencies.
7
+
`mind-map` is a wiki engine that stores pages as plain markdown files, indexes them with SQLite FTS5, and exposes them via MCP (for AI agents) and a REST API with web UI (for humans). One binary, zero runtime dependencies.
8
8
9
9
## The Problem
10
10
11
11
AI agents need persistent, structured memory. Today that means:
12
12
13
-
- 🔴 **Desktop apps** — tools like Tolaria require Node.js + Rust + WebKit + a display server just to give agents a knowledge base
14
-
- 🔴 **Single-user** — stdio MCP is one agent, one pipe, that's it
15
-
- 🔴 **No web access** — the knowledge is locked in a desktop app only the local user can see
16
-
- 🔴 **Can't deploy headless** — needs a GUI environment even when no human is looking
13
+
-**Desktop apps** -- tools like Tolaria require Node.js + Rust + WebKit + a display server just to give agents a knowledge base
14
+
-**No web access** -- the knowledge is locked in a desktop app only the local user can see
15
+
-**Can't deploy headless** -- needs a GUI environment even when no human is looking
17
16
18
17
## The Solution
19
18
20
-
`mind-map` is a **server**, not an app. It runs anywhere — your laptop, a container or a cloud VM.
19
+
`mind-map` is a **server**, not an app. It runs anywhere -- your laptop, a container or a cloud VM.
21
20
22
-
1.**One protocol**— MCP over HTTP/SSE. The web UI and AI agents are both MCP clients
23
-
2.**One binary**— Go, statically compiled, `curl | bash` to install
24
-
3.**Plain markdown**— pages are `.md` files with YAML frontmatter. Git-friendly, portable, yours
25
-
4.**Multi-agent**— HTTP/SSE means any number of agents can connect simultaneously
26
-
5.**Built-in web UI**— browse, search, and edit the wiki from any browser
21
+
1.**Agents use stdio**-- `mind-map` with no args starts an MCP server on stdin/stdout
22
+
2.**Humans use the web UI**-- `mind-map serve` starts an HTTP server with REST API and browser UI
23
+
3.**One binary**-- Go, statically compiled, `curl | bash` to install
24
+
4.**Plain markdown**-- pages are `.md` files with YAML frontmatter. Git-friendly, portable, yours
25
+
5.**Multi-process safe**-- SQLite page locking lets multiple agents share the same wiki directory
27
26
28
27
```
29
28
Agent: "What do we know about authentication?"
@@ -52,28 +51,31 @@ Binaries available for **linux-x64**, **linux-arm64**, **darwin-x64**, **darwin-
52
51
53
52
```mermaid
54
53
graph TD
55
-
A[Preact Web App] -->|MCP over HTTP/SSE| B
56
-
C[AI Agent] -->|MCP over HTTP/SSE| B
57
-
D[AI Agent] -->|MCP over stdio| B
54
+
A[Preact Web App] -->|REST API| B
55
+
C[AI Agent] -->|MCP stdio| D
58
56
59
57
subgraph "mind-map serve"
60
-
B[MCP Server] --> E[Wiki Engine]
61
-
E --> F[SQLite FTS5]
58
+
B[HTTP Server] --> E[Wiki Engine]
62
59
end
63
60
61
+
subgraph "mind-map (stdio)"
62
+
D[MCP Server] --> E
63
+
end
64
+
65
+
E --> F[SQLite FTS5]
64
66
E -->|read/write| G[Markdown Files]
65
67
```
66
68
67
-
The web UI is a static Preact app served from the same binary. It connects to the MCP SSE endpoint at `/mcp` — the same endpoint AI agents use. There is no separate REST API.
69
+
The web UI is a static Preact app served by `mind-map serve`. It uses a REST API to read and write pages. AI agents use stdio MCP -- each agent launches its own `mind-map` process.
Both modes use the same wiki engine, same MCP tools, same code path. The only difference is the transport.
78
+
Both modes use the same wiki engine and the same wiki directory (`~/.mind-map/wiki` by default). Multiple stdio processes can safely share the same wiki via SQLite page locking.
77
79
78
80
## MCP Tools (8 total)
79
81
@@ -88,13 +90,16 @@ Both modes use the same wiki engine, same MCP tools, same code path. The only di
88
90
|`list_pages`| List pages, optionally filtered by path prefix |
89
91
|`get_backlinks`| Get all pages that link to a given page |
90
92
93
+
|`register_sync`| Register a wiki path prefix to sync with a git remote |
94
+
91
95
## Wiki Features
92
96
93
-
-**YAML frontmatter** — structured metadata on every page (`title`, `type`, `status`, custom fields)
94
-
-**Wikilinks** — `[[target]]` and `[[display|target]]` syntax, resolved to clickable links
95
-
-**Backlink index** — every page knows what links to it
96
-
-**Full-text search** — SQLite FTS5 with ranked results and snippets
97
-
-**Concurrent access** — `sync.RWMutex` for safe multi-agent reads and writes
97
+
-**YAML frontmatter** -- structured metadata on every page (`title`, `type`, `status`, custom fields)
98
+
-**Wikilinks** -- `[[target]]` and `[[display|target]]` syntax, resolved to clickable links
99
+
-**Backlink index** -- every page knows what links to it
100
+
-**Full-text search** -- SQLite FTS5 with ranked results and snippets
101
+
-**Multi-process safe** -- SQLite page locking for concurrent agent access
102
+
-**Git sync** -- sync wiki pages to GitHub repo wikis via configurable mappings
98
103
99
104
## Web UI
100
105
@@ -106,35 +111,21 @@ The built-in web UI is a metro-inspired, chromeless Preact app:
106
111
- Edit mode with raw markdown editor
107
112
- Dark / light theme toggle
108
113
109
-
The web UI speaks MCP — it's an MCP client, not a separate interface. If an agent creates a page, it appears in the browser. If you edit in the browser, the agent sees the change.
110
-
111
-
## MCP Server Configuration
114
+
The web UI speaks the same language as the wiki engine. If an agent creates a page via stdio, it appears in the browser. If you edit in the browser, the agent sees the change on its next read.
Short: "A wiki engine with MCP interface for AI agents",
30
-
Long: "mind-map is a wiki that stores pages as markdown files, indexes them with SQLite FTS5, and exposes everything via MCP over HTTP/SSE. AI agents and humans use the same protocol.\n\nRunning without a subcommand starts the MCP server in stdio mode.",
30
+
Long: "mind-map is a wiki that stores pages as markdown files, indexes them with SQLite FTS5, and exposes everything via MCP (stdio) or a REST API (serve). Agents use stdio, humans use the web UI.\n\nRunning without a subcommand starts the MCP server in stdio mode.",
31
31
RunE: runStdio,
32
32
}
33
33
34
34
varserveCmd=&cobra.Command{
35
35
Use: "serve",
36
-
Short: "Start the HTTP/SSE server with web UI",
37
-
Long: "Starts the mind-map server in HTTP/SSE mode with the web UI. Use this for browser access and multi-agent setups.",
36
+
Short: "Start the HTTP server with web UI",
37
+
Long: "Starts the mind-map HTTP server with REST API and web UI.",
38
38
RunE: runServe,
39
39
}
40
40
41
41
funcinit() {
42
42
rootCmd.PersistentFlags().StringP("dir", "d", defaultWikiDir(), "Path to the wiki directory")
43
43
44
-
serveCmd.Flags().StringP("addr", "a", ":51849", "Address to listen on (HTTP/SSE mode)")
44
+
serveCmd.Flags().StringP("addr", "a", ":51849", "Address to listen on")
45
45
serveCmd.Flags().String("webui", "", "Path to webui dist directory (overrides embedded webui)")
46
46
serveCmd.Flags().String("log-file", "", "Path to log file (logs to stderr and file)")
47
47
serveCmd.Flags().Duration("idle-timeout", 60*time.Second, "Idle timeout for HTTP connections (e.g. 30s, 1m)")
0 commit comments