Pieces MCP Server

Turn your Pieces Long-Term Memory into an AGENTS.md your coding agents can read.

Local serverstdioGo

What is the Pieces MCP server?

Turn your Pieces Long-Term Memory into an AGENTS.md your coding agents can read. The pieces mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 2 defined tools rather than through you.

What it actually does

PiecesOS records what you work on all day. Your coding agent starts every session with none of it. This CLI reads your memory over MCP and writes the parts that belong to a repository into its context file, so the next agent already knows why the code looks the way it does.

Agent context files have become the standard way to tell Claude Code, Cursor or Copilot how a project works. Almost nobody keeps them current, because writing down what you already know is the first task to get dropped. Meanwhile PiecesOS has been quietly recording the decisions, the bugs and the dead ends the whole time.

Its toolset

Everything the assistant can do here goes through one of these:

  • Principle — What it means in practice
  • Flag — Default

Adding it to your client

Installation goes through your MCP client rather than a global install: point it at pieces-to-agents on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

Configuration

  • PiecesOS running locally with its MCP server enabled, on the default port 39300 - Node.js 20.11 or newer - A git repository to write into

When to reach for it

Plenty of knowledge and memory servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Pieces's toolset — Principle, Flag — is a fair guide to whether it matches your workflow. It is maintained by tiagolauer; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the pieces mcp server does with a few real requests.

Available tools

ToolWhat it does
PrincipleWhat it means in practice
FlagDefault

How to install the Pieces MCP server

{
  "mcpServers": {
    "pieces": {
      "command": "npx",
      "args": ["-y", "pieces-to-agents"]
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • PiecesOS running locally with its MCP server enabled, on the default port 39300 - Node.js 20.11 or newer - A git repository to write into

Example prompts to try

  • Use Pieces to Principle.
  • Use Pieces to Flag.

Frequently asked questions

It connects Pieces to MCP-compatible AI assistants such as Claude and Cursor, exposing 2 tools (Principle, Flag) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Pieces directly.