think-mcp

v0.1.0
@mindmax/think-mcp Checked 1 day ago Published 1 month ago

MCP server that turns an outline from any AI agent (DeepSeek Harness, Claude, ChatGPT, Cursor…) into a one-click interactive mind map in MindMax Think —…

An MCP server that adds "Open as mind map in MindMax Think" to any AI harness. When the agent breaks a question down into branches (a brainstorm, a decision with options, pros and cons, a plan, or a long discussion worth seeing as a whole), it calls a tool and shows the user a link. Clicking the link opens the structure as an interactive canvas in mindmax.me/think. Every card there can be expanded further, explained in depth or questioned, branch by branch. Spec: spec/64-think-handoff.md. The agent sends Markdown.

Summary extracted from the README.

@mindmax/think-mcp

An MCP server that adds "Open as mind map in MindMax Think" to any AI harness. When the agent breaks a question down into branches (a brainstorm, a decision with options, pros and cons, a plan, or a long discussion worth seeing as a whole), it calls a tool and shows the user a link. Clicking the link opens the structure as an interactive canvas in mindmax.me/think. Every card there can be expanded further, explained in depth or questioned, branch by branch. Spec: spec/64-think-handoff.md.

Nothing is uploaded, and the tool calls no model. The outline is compressed into the link's #fragment, and browsers never send the fragment to a server. When the user clicks, the outline is decoded in their browser, turned into a canvas, and saved to its IndexedDB. Only the AI the user runs later inside /think uses MindMax credits.

Tools

Tool Mode What it does
open_in_mindmax_think { outline, title? } stdio + HTTP Returns a Markdown link, plus structuredContent with the URL, counts and a trimmed preview of the map
open_file_in_mindmax_think { path, title? } stdio only Reads a .md / .markdown / .mdx / .txt outline from the workspace (≤ 512 KB)

Outline format

The agent sends Markdown. LLMs write nested headings and lists reliably, and the format costs far fewer tokens than canvas JSON with ids and coordinates. /think converts it into the canvas (packages/core/src/canvas/from-outline.ts) with the same shape as a run of its own engine.

# Should I do a PhD?

It depends less on the degree than on the life you want.   ← optional: overall insight (hub card)

## Gains                                                    ← one card per branch
Long-term payoff depends on the field.                      ← optional: the card's one-line note
- Research skills
  - Asking your own questions                               ← sub-point
- Academic network
### Where a PhD counts                                      ← child card growing from "Gains"
- Research labs

## Costs
- Five years of opportunity cost

A nested - list under the # heading also works: the top-level items become cards, the next level becomes points, and anything deeper becomes sub-points. A map holds at most 60 cards and 24 points per card. An outline with no branches returns a tool error that explains the format, so the model can retry.

Prompts

Prompt Arguments What it does
map_with_mindmax_think question, angle? Think a question through as a map, then open it in MindMax Think
map_conversation_in_mindmax_think focus? Lay out what this conversation covered as a map

Map card (MCP Apps + ChatGPT)

The tool result renders as a card with a thumbnail mind map: the central question on the left, then branches, then child branches (or the first few points). The thumbnail is plain SVG drawn from structuredContent.map. A "Keep exploring in MindMax Think" button sits below it. src/widget.ts registers it for MCP Apps (ui://mindmax-think/map.html) and for the ChatGPT Apps SDK (ui://widget/mindmax-think-map.html). The bridge, theming and shared styles live in packages/mcp-kit/src/card.ts. The card makes no network requests. Hosts without UI support show the link text.

Make it the default: a line for the user's own instructions

When you break something down for me (a brainstorm, a decision with options, pros and cons, a plan, or a long discussion), also call the MindMax Think tool open_in_mindmax_think with the structure as a Markdown outline, and end your reply with the link it returns.

每当你帮我拆解一个问题(头脑风暴、几个选项的决策、利弊分析、计划,或一段较长的讨论),同时调用 MindMax Think 的 open_in_mindmax_think,把结构写成 Markdown 大纲传进去,并在回复末尾附上它返回的链接。

Install

Local agents (stdio): DeepSeek Harness, Claude Desktop, Cursor, Codex CLI, Gemini CLI…

{
  "mcpServers": {
    "mindmax-think": { "command": "npx", "args": ["-y", "@mindmax/think-mcp"] }
  }
}

To get the Write tools as well, use @mindmax/mcp (the bundle) instead.

Claude Code

Install integrations/claude-code/ as a plugin. It bundles the server and a mindmax-think skill. Or add just the server:

claude mcp add mindmax-think -- npx -y @mindmax/think-mcp

claude.ai / ChatGPT (remote MCP)

  • claude.ai: Settings → Connectors → Add custom connector → https://api.mindmax.me/mcp/think/claude-ai. No OAuth settings are needed.
  • ChatGPT: Settings → Connectors → Developer mode → Create → https://api.mindmax.me/mcp/think/chatgpt, with authentication set to "No authentication".
  • Both apps' tools in one connector: use https://api.mindmax.me/mcp/claude-ai (or /mcp/chatgpt). That is the bundle endpoint (packages/mcp).

Remote endpoint: deploy

The endpoint is a separate pm2 process (mindmax-think-mcp, 127.0.0.1:8791) on the same EC2 host as mindmax-server. nginx forwards /mcp/think and /mcp/think/<source> to it.

  1. One time: sync packages/server/deploy/nginx/api.mindmax.me.conf (the location ~ ^/mcp/think… and bare /mcp blocks) to the server and reload nginx.
  2. Each release: packages/mcp-think/deploy/deploy.sh, with the same DEPLOY_HOST / DEPLOY_SSH_KEY as the server deploy. The steps are in packages/mcp-kit/deploy/deploy.sh.

To run it anywhere else: PORT=8791 npx -y @mindmax/think-mcp --http (POST /mcp, /mcp/think or /mcp/think/<source>, GET /healthz) behind TLS.

Attribution

Links carry ?utm_source=mcp_<host>, the same convention as MindMax Write: clientInfo.name over stdio, the path label over HTTP (/mcp/think/chatgpt → mcp_chatgpt, plain /mcp/think → mcp_remote). /think drops the query and the fragment from the address bar once the canvas is created.

Environment

  • MINDMAX_THINK_URL: points the links at a different /think (for example http://localhost:5173/think/ for local dev).
  • PORT: the default port for --http.

Publish

Package @mindmax/think-mcp. Registry entry io.github.woodpeng/mindmax-think (server.json). The first release is a manual npm publish --access public from this directory; after that, configure Trusted Publishing for workflow mcp-think.yml. Later releases: bump version in package.json and both versions in server.json, merge to master, then run Actions → MCP Think (npm). The details are the same as in packages/mcp-write/README.md.

Develop

pnpm --filter @mindmax/think-mcp test
pnpm --filter core exec vitest run test/think-handoff.test.ts
pnpm --filter @mindmax/think-mcp build    # dist/index.js, core's think-handoff and mcp-kit inlined

The link codec and outline parser are in packages/core/src/think-handoff/. They reuse the Write codec and change only the base URL. /think reads #import= in packages/web/src/think/route.ts → importCanvas.ts.