Skip to main content
Glama
freeplane-mcp

freeplane-mcp

by metacoma

freeplane-mcp

MCP-сервер, который позволяет AI-агентам, таким как Claude Desktop, Cursor и opencode, читать и изменять активную карту Freeplane через gRPC-плагин freeplane_plugin_grpc.

В отличие от одноразовых MCP-серверов типа «Markdown → image», изменения применяются в реальном времени к текущей открытой карте 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: mindmapio-mcp

Требования

  • Python 3.10+

  • Freeplane, запущенный с установленным gRPC-плагином

  • Порт gRPC Freeplane по умолчанию: 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.

Поддерживаемые поля включают:

text, id, children, note, detail, link, tags, icons, attributes, background_color, folded и relationships.

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

Available Tools

2 tools
export_mapA

Export the current Freeplane mind map to canonical JSON.

Returns the whole map as a JSON string. Each node has at least "text" and "id"; optional fields include "children", "note", "detail", "link", "tags", "icons", "attributes", "background_color", "folded" and "relationships".

Inputs: no named parameters. Returns: result

import_mapA

Import a mind map (canonical JSON) into the running Freeplane instance.

Inputs: map_json (required), insert_mode, insert_node_id. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 2 tools

    Disambiguation5/5

    export_map and import_map have clearly opposite purposes and there is no overlap. An agent can unambiguously determine which to call based on the direction of data transfer.

    Naming Consistency5/5

    Both tool names follow the same verb_noun pattern: export_map and import_map. The naming is simple, predictable, and perfectly matches the server's purpose.

    Tool Count3/5

    Two tools is a very minimal set, but each covers one half of the map exchange workflow. It feels slightly thin for a general MCP server, though the scope is focused.

    Completeness5/5

    The two tools provide a complete round-trip: export the map as JSON and import it back. For this server's apparent purpose of whole-map synchronization, there are no obvious gaps.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to read and write XMind mind map files, allowing generation, editing, and analysis of mind maps directly in XMind.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to build and interact with mind maps on mindmap.io. Agents can create, read, update, and delete maps and nodes, run prompts on nodes, and auto-expand topics into follow-up questions.
      13
      MIT
    • A
      license
      A
      quality
      Not graded
      maintenance
      MCP server for MindNode that lets AI agents read mind maps as Markdown outlines and view rendered previews. It also supports creating new mind maps from outlines and opening maps in the app.
      5
      17 npm
      1
      MIT