Discourse Graph MCP Server
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DG_MCP_BASE_TOOLS | No | Enables the 23 base Roam tools (re-exported from @roam-research/roam-tools-core). Set to 1/true/on/yes. | |
| DG_MCP_PILOT_TOOLS | No | Enables pilot-analysis tools (get_pilot_users, search_pilots_live, index_pilot_pages, ...). Set to 1/true/on/yes. | |
| DG_MCP_WRITE_TOOLS | No | Enables buffered write-visibility tools (propose_write_batch, ...) plus the write-visibility bridge. Set to 1/true/on/yes. | |
| DG_MCP_CANVAS_TOOLS | No | Canvas tools are on by default; disable them with DG_MCP_CANVAS_TOOLS=0/false/off/no. | |
| DG_MCP_RELATION_WRITE | No | create_discourse_relation is on by default; disable it with DG_MCP_RELATION_WRITE=0/false/off/no. | |
| DG_MCP_EXTRA_DISCOURSE_TOOLS | No | Enables run_discourse_query, get_node_images, get_researcher_contributions, catch_me_up, get_users. Set to 1/true/on/yes. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_discourse_node_typesA | Get all discourse node types and relations configured in a Roam graph with the Discourse Graph extension. Returns node names, type IDs, formats, shortcuts, descriptions, canvas settings, and relation definitions (label, source, destination, complement). |
| get_all_discourse_nodesA | Get all discourse node instances from a Roam graph. Returns the actual pages/blocks that match configured discourse node types (e.g., all Claims, all Evidence). Each result includes the node text, UID, type, author, and timestamps. |
| get_candidate_nodesA | Get candidate discourse nodes: blocks tagged with a node type's candidate tag (e.g. #evd-candidate) that have not been promoted to formal node pages. These are invisible to get_all_discourse_nodes, which only matches formal |
| search_nodesA | Search for discourse nodes by keywords in their titles, ranked by BM25 relevance (titles matching only some query words are included, ranked lower). Returns matching pages with their UIDs, titles, relevance scores, creation times, and authors. |
| get_nodeA | Get complete details for a node by its UID. Returns the title, full block tree (content), creator, creation date, and last modified date. |
| get_linked_nodesA | Find all nodes linked to/from a given page. Returns outgoing references (pages this node links to) and/or incoming backlinks (pages that link to this node). |
| get_relationshipsB | Find all typed discourse relations involving a node. For example, what Evidence supports a Claim, what Questions a piece of Evidence informs, etc. Returns results grouped by relation type. |
| create_discourse_relationA | Create a typed discourse relation between two existing discourse nodes (e.g. assert that a piece of Evidence Supports a Claim). Writes a single stored relation record; the reverse direction is derived automatically and must not be created separately. Validates that the relation is legal between the two node types, and is a no-op if the relation already exists. Use dry_run to preview the resolution first. |
| get_node_neighborhoodB | Perform a breadth-first traversal from a node, following page references up to N hops deep. Returns nodes organized by hop distance. Useful for exploring the neighborhood of a discourse node. |
| get_node_sectionB | Extract a specific section from a discourse node's page. Discourse nodes are created with templates that define sections (e.g., 'Summary::', 'Evidence::', 'Lab Notes::'). This tool finds the matching section block and returns its content tree. If section is omitted or '*', returns all sections. |
| canvas_listA | List discourse-graph canvas pages in a Roam graph (pages whose title matches the graph's canvas page format, default Canvas/*). |
| canvas_typesA | List the discourse node types (id, name, format, shortcut, color) and relation types (id, label, source→destination) available for canvas authoring in a graph. Ids are needed by canvas_add_node / canvas_connect. |
| canvas_readA | Read a canvas: discourse nodes (Roam page uid, title, type, absolute position, containing frame), Roam blocks placed on the board, typed relations between them, text shapes, frames, images (with filename + URL), plain geo shapes and arrows, and nested sub-canvas portals ( |
| canvas_createB | Create a new empty canvas page. |
| canvas_add_nodeA | Add a discourse node to a canvas. Either reference an existing Roam page (existing_page = title or uid) or provide node_type + text to create the node page (title formatted per the type's format string; v1 does not fill {Source}-style referenced tokens or insert templates). Pages that match no discourse node type get the generic Page shape. For Roam blocks use canvas_add_block. Returns the new shape id and node page uid. |
| canvas_add_blockA | Place an existing Roam block on a canvas (the extension's Block shape). The block's current text becomes the shape label; live canvases render the block itself. Does not create blocks — create the block first, then pass its uid. For pages use canvas_add_node. |
| canvas_connectC | Connect two discourse nodes on a canvas with a typed relation arrow (e.g. Supports, Opposes, Informs). from/to accept a shape id or the node's Roam page uid. Direction: from = relation source, to = destination. |
| canvas_add_textC | Add a free-floating text label to a canvas. Long labels wrap at |
| canvas_create_frameC | Add a named frame (group region) to a canvas. |
| canvas_moveA | Move shapes to new positions, re-aim arrows, or move shapes to another tldraw page. All coordinates are ALWAYS absolute canvas coordinates (converted to frame-local storage automatically). Pass x/y to move a shape. For an arrow, pass start and/or end points instead to re-aim it (bound terminals, e.g. from canvas_connect, follow their shape and cannot be re-aimed). Pass into_frame (a frame's shape id or name) to move the shapes into that frame; pass into_frame:'page' to pop them out to the top level. Pass into_page (a tldraw page name or id) to move shapes between the board's pages. |
| canvas_deleteA | Delete shapes from a canvas by shape id. Attached relation arrows and bindings are cleaned up automatically. Does NOT delete the underlying Roam pages. |
| canvas_page_createA | Create a new tldraw page INSIDE an existing canvas. A canvas is one Roam page holding one board; nesting and multi-page organization happen by adding tldraw pages within it, never by creating another canvas page. Colliding names get a numeric suffix; the returned name is the one actually used. Fails loudly at the app's 40-page cap. |
| canvas_page_renameB | Rename a tldraw page of a canvas. Portals targeting the page get their visible "⤵ name" label and stored title re-synced in the same write. |
| canvas_page_deleteA | Delete a tldraw page of a canvas along with every shape on it. Portals elsewhere that pointed at it are NOT deleted (live clients show "target page not found"); their shape ids come back as orphanedPortals so you can re-link or delete them deliberately. Refuses to delete the last page. |
| canvas_add_subpageA | Add a nested sub-canvas portal: a rectangle that previews another tldraw page of the SAME canvas and opens it on click (in plugin builds with the feature; other builds show a labeled "⤵ name" rectangle on a board that still loads). Creates the target page when it does not exist yet. Portals persist as native geo shapes with meta.dgSubpage; the page hierarchy lives in page meta. Populate the target page afterwards with the add tools and their |
| canvas_link_subpageA | Turn an existing geo rectangle into a nested sub-canvas portal, or re-point an existing portal at a different tldraw page. The target page must already exist (canvas_add_subpage creates pages). Rewrites the shape's "⤵ name" label and takes over the target page's lineage pointer. |
| canvas_add_geoB | Add a plain tldraw geo shape (rectangle, ellipse, …) with an optional centered label. This is the general-purpose labeled box; discourse nodes belong in canvas_add_node. |
| canvas_add_arrowA | Add a plain (untyped) arrow between two absolute points, optionally labeled. For typed discourse relations between nodes use canvas_connect instead. |
| canvas_add_imageA | Place an image on a canvas from a URL (creates the tldraw asset + image shape). Pass real dimensions when known; the canvas does not measure the file. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 29 tools
The node-query family (get_node, get_node_section, get_node_neighborhood, get_linked_nodes, get_relationships) is cleanly differentiated, and the canvas add_* tools are disambiguated by explicit cross-references in their descriptions. The main confusion is canvas_types vs get_discourse_node_types, which both return node/relation type definitions, and canvas_create_frame vs canvas_add_geo which both produce boxes.
Two conventions coexist: verb-first (get_node, search_nodes, create_discourse_relation) and resource-prefixed (canvas_add_node, canvas_page_delete), forcing an agent to guess which prefix a given operation uses. Within the canvas_ family there is also verb drift between create (canvas_create_frame) and add (canvas_add_geo) for near-identical operations, and plural/singular slips like canvas_list vs canvas_types.
29 tools is heavy and sits above the comfortable band, split roughly into ~11 graph-query tools and ~18 canvas-authoring tools. The canvas surface is genuinely broad (shapes, frames, pages, portals, images, arrows), but several tools could be consolidated, e.g. canvas_page_create/rename/delete and canvas_add_geo/add_text/add_arrow.
Canvas authoring is close to complete (create/read/move/delete shapes, pages, frames, portals, images, typed connectors), but the graph half is read-heavy: there is create_discourse_relation with no delete/update relation tool, and no way to create or edit a discourse node page or its block content outside a canvas. There is also no shape resize/edit beyond positional canvas_move.