Skip to main content
Glama
metacoma

freeplane-mcp

by metacoma

freeplane-mcp

一个 MCP 服务器,允许 Claude Desktop、Cursor 和 opencode 等 AI 智能体通过 freeplane_plugin_grpc gRPC 插件读取和修改正在运行的 Freeplane 思维导图。

与一次性“Markdown → 图片”MCP 服务器不同,更改会实时应用到当前打开的 Freeplane 思维导图。

架构

MCP client (Claude / Cursor / opencode)
        │
        │ stdio or Streamable HTTP (MCP SDK)
        ▼
freeplane-mcp (Python, FastMCP)
        │
        │ gRPC (grpcio)
        ▼
Freeplane + org.freeplane.plugin.grpc
(port 50051)

Related MCP server: xmind-mcp

环境要求

  • Python 3.10+

  • 已安装 gRPC 插件并正在运行的 Freeplane

  • Freeplane 默认 gRPC 端口:50051

安装

cd ~/spaces/freeplane-mcp
python -m venv .venv
.venv/bin/pip install -e .

运行

stdio

Claude Desktop、Cursor、opencode 等默认传输方式:

.venv/bin/freeplane-mcp

Streamable HTTP

.venv/bin/freeplane-mcp --transport http --port 8000

配置

环境变量

CLI 选项

默认值

FREEPLANE_GRPC_HOST

--grpc-host

127.0.0.1

FREEPLANE_GRPC_PORT

--grpc-port

50051

FREEPLANE_GRPC_TIMEOUT

10

FREEPLANE_MCP_TRANSPORT

--transport

stdio

FREEPLANE_MCP_HOST

--host

127.0.0.1

FREEPLANE_MCP_PORT

--port

8000

MCP 工具

export_map

将当前思维导图导出为规范 JSON。

支持的字段包括:

textidchildrennotedetaillinktagsiconsattributesbackground_colorfoldedrelationships

import_map

从规范 JSON 导入思维导图。

支持的 insert_mode 值:

  • root — 在思维导图根节点下方插入;默认值

  • node — 在 insert_node_id 下方插入

  • selected — 在当前选中节点下方插入

测试

导出当前思维导图:

.venv/bin/python -c "
import sys; sys.path.insert(0, '.')
from freeplane_mcp.freeplane_grpc import FreeplaneGrpcClient
c = FreeplaneGrpcClient()
print(c.export_map())
"

导入思维导图并再次导出:

.venv/bin/python -c "
import sys; sys.path.insert(0, '.')
from freeplane_mcp.freeplane_grpc import FreeplaneGrpcClient
c = FreeplaneGrpcClient()
c.import_map('{\"text\": \"Hello from MCP\", \"children\": [{\"text\": \"child 1\"}]}')
print(c.export_map())
"

MCP 客户端配置

stdio 配置示例:

{
  "mcpServers": {
    "freeplane": {
      "command": "/home/bebebeka/spaces/freeplane-mcp/.venv/bin/freeplane-mcp"
    }
  }
}

HTTP 配置:

{
  "mcpServers": {
    "freeplane": {
      "url": "http://127.0.0.1:8000/mcp"
    }
  }
}

JSON 格式说明

规范 JSON 格式由插件的 JsonHelper.java 定义。

导入支持 _fp_import_root_node

{"_fp_import_root_node": "root", "mindmap": {...}}

在思维导图根节点下方插入。

{"_fp_import_root_node": "ID_...", "mindmap": {...}}

在特定节点下方插入。

如果没有包装器,思维导图将插入到当前选中节点下方。

也支持旧版格式:

{"node text": {"child node": "note"}}

许可证

MIT

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.

  • Shared long-term memory vault for AI agents with 20 MCP tools.

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/metacoma/mcp-freeplane'

If you have feedback or need assistance with the MCP directory API, please join our Discord server