noggin

MCP server

noggin ships a Model Context Protocol server (noggin-mcp) that exposes the same verbs the VS Code extension's language-model tools do. Hosts that can't see in-process LM tools — GitHub Copilot CLI, Claude Code, OpenAI Codex — spawn this stdio server to get a complete noggin toolset for the agent.

What it is

A single Node 20+ binary, noggin-mcp, that:

It ships three ways:

Choosing the right surface

HostUse
VS Code (with the noggin extension) In-process language-model tools — no MCP needed.
GitHub Copilot CLI (copilot) MCP server, configured under mcpServers.
Claude Code MCP server, configured in the host's MCP config.
OpenAI Codex CLI / app MCP server, auto-launched by the agent plugin.
VS Code without the noggin extension MCP server, declared in .vscode/mcp.json.

Wire it up

Most hosts share the same mcpServers shape. The recommended form pulls the latest release straight from npm — no clone, no install:

{
  "mcpServers": {
    "noggin": {
      "command": "npx",
      "args": ["-y", "noggin-mcp@latest"]
    }
  }
}

The noggin-mcp npm package ships a single bin of the same name, so npx -y noggin-mcp@latest resolves to the right executable with no extra hints.

File locations vary by host:

Local install (no npm)

If you've cloned this repo to hack on it, point the host at the file directly:

{
  "mcpServers": {
    "noggin": {
      "command": "node",
      "args": ["/absolute/path/to/noggin/mcp/noggin-mcp.mjs"]
    }
  }
}

Run npm install once inside mcp/ first, to pull in the MCP SDK and the workspace-linked @noggin/engine.

Tools

The server exposes 13 tools. Each one mirrors a CLI verb and returns the same response envelope; the agent sees a single canonical JSON shape regardless of which tool it calls.

noggin_show

Show the current-position view (spine + peers + first-level children). Default target is active.

FieldTypeDescription
noggin requiredstringcanonical location of the noggin to operate on — e.g. `~/.noggin.yaml`, `./.noggin.yaml`, `/abs/path.yaml`, or `file:///abs/path.yaml`. Required on every tool call.
pathstringnoggin path (absolute /1/2 or relative — see SKILL.md)
noChildrenbooleanomit first-level children of the target
withSiblingsbooleanalso include ancestor sibling rows at every depth
withDescendantsbooleanexpand the target subtree recursively
withAllbooleanshorthand for withSiblings + withDescendants
withNotesbooleaninclude note bodies after the tree (human-readable)
noggin_push

Create a child of active and immediately become it (going on a side-quest).

FieldTypeDescription
noggin requiredstringcanonical location of the noggin to operate on — e.g. `~/.noggin.yaml`, `./.noggin.yaml`, `/abs/path.yaml`, or `file:///abs/path.yaml`. Required on every tool call.
title requiredstringitem title (one line)
noggin_add

Add a child without making it active (capture a deferred todo).

FieldTypeDescription
noggin requiredstringcanonical location of the noggin to operate on — e.g. `~/.noggin.yaml`, `./.noggin.yaml`, `/abs/path.yaml`, or `file:///abs/path.yaml`. Required on every tool call.
title requiredstringitem title (one line)
beforestringplace as sibling before this anchor path
afterstringplace as sibling after this anchor path
intostringplace as last child of this anchor path
gotostring | booleantrue = goto the target; string = goto this path after the verb
noggin_goto

Make the item at the given path active.

FieldTypeDescription
noggin requiredstringcanonical location of the noggin to operate on — e.g. `~/.noggin.yaml`, `./.noggin.yaml`, `/abs/path.yaml`, or `file:///abs/path.yaml`. Required on every tool call.
path requiredstringnoggin path (absolute /1/2 or relative — see SKILL.md)
noggin_done

Mark target done and surface to its parent. Idempotent.

FieldTypeDescription
noggin requiredstringcanonical location of the noggin to operate on — e.g. `~/.noggin.yaml`, `./.noggin.yaml`, `/abs/path.yaml`, or `file:///abs/path.yaml`. Required on every tool call.
pathstringnoggin path (absolute /1/2 or relative — see SKILL.md)
forcebooleanclose even if open descendants exist (leaves them open)
closeAllbooleancascade-close all open descendants first
noggin_pop

Shorthand for done on the active item.

FieldTypeDescription
noggin requiredstringcanonical location of the noggin to operate on — e.g. `~/.noggin.yaml`, `./.noggin.yaml`, `/abs/path.yaml`, or `file:///abs/path.yaml`. Required on every tool call.
forcebooleanclose even if open descendants exist (leaves them open)
closeAllbooleancascade-close all open descendants first
noggin_edit

Idempotent mutation of an item's state and/or title. Pass at least one of state or title.

FieldTypeDescription
noggin requiredstringcanonical location of the noggin to operate on — e.g. `~/.noggin.yaml`, `./.noggin.yaml`, `/abs/path.yaml`, or `file:///abs/path.yaml`. Required on every tool call.
pathstringnoggin path (absolute /1/2 or relative — see SKILL.md)
statestringset done/open state (one of: done, open)
titlestringnew title (rename)
forcebooleanclose even if open descendants exist (leaves them open)
closeAllbooleancascade-close all open descendants first
gotostring | booleantrue = goto the target; string = goto this path after the verb
noggin_note

Append a timestamped note to an item (default: active).

FieldTypeDescription
noggin requiredstringcanonical location of the noggin to operate on — e.g. `~/.noggin.yaml`, `./.noggin.yaml`, `/abs/path.yaml`, or `file:///abs/path.yaml`. Required on every tool call.
pathstringnoggin path (absolute /1/2 or relative — see SKILL.md)
text requiredstringnote body (free-form)
noggin_move

Relocate an item. Exactly one of before/after/into is required.

FieldTypeDescription
noggin requiredstringcanonical location of the noggin to operate on — e.g. `~/.noggin.yaml`, `./.noggin.yaml`, `/abs/path.yaml`, or `file:///abs/path.yaml`. Required on every tool call.
pathstringnoggin path (absolute /1/2 or relative — see SKILL.md)
beforestringplace as sibling before this anchor path
afterstringplace as sibling after this anchor path
intostringplace as last child of this anchor path
noggin_delete

Remove an item. Pass recursive=true if it has descendants.

FieldTypeDescription
noggin requiredstringcanonical location of the noggin to operate on — e.g. `~/.noggin.yaml`, `./.noggin.yaml`, `/abs/path.yaml`, or `file:///abs/path.yaml`. Required on every tool call.
path requiredstringnoggin path (absolute /1/2 or relative — see SKILL.md)
recursivebooleanalso delete descendants
noggin_where

Return the canonical location string of the given noggin (echoes back the `noggin` parameter, useful for confirming the value the server interpreted).

FieldTypeDescription
noggin requiredstringcanonical location of the noggin to operate on — e.g. `~/.noggin.yaml`, `./.noggin.yaml`, `/abs/path.yaml`, or `file:///abs/path.yaml`. Required on every tool call.
noggin_copy

Append every item from `from` into `to` (whole-noggin, append-only). New keys are generated; notes, done state, and createdAt timestamps are preserved verbatim. Use to migrate a noggin between locations or duplicate a tree under one root.

FieldTypeDescription
from requiredstringcanonical location of the SOURCE noggin (read-only)
to requiredstringcanonical location of the DESTINATION noggin (mutated)
noggin_providers

List providers registered in this MCP server (e.g. file://). Useful for discovering what location forms the server accepts.

No parameters.

Response shape

Every tool returns the canonical response envelope as the text content of its MCP result. On success:

{
  "status": "ok",
  "envelopeVersion": 3,
  "verb": "push",
  "data": { /* CurrentTreeView, DeleteResult, ... */ }
}

On failure the MCP result is marked isError: true and the text content carries an error envelope with a stable error.code.

Related