Get Started

Integrating the Pieces MCP with Cline brings your workflow context directly into VS Code. Cline is an AI coding agent extension that maintains its own MCP configuration—it does not read from .vscode/mcp.json.

**Use SSE, not Streamable HTTP:** Cline has known compatibility issues with Streamable HTTP transport. Use the **SSE endpoint** for the most reliable connection.

Prerequisites

There are two prerequisites for integrating Pieces with Cline as an MCP—an active instance of PiecesOS and the fully-enabled Long-Term Memory engine.

Make sure that PiecesOS is installed and running. This is *required* for the MCP server to communicate with your workflow data. Enable the Long-Term Memory Engine (LTM-2.7) through the Pieces Desktop App or the [PiecesOS Quick Menu](/products/core-dependencies/pieces-os/quick-menu) in your toolbar.

Installing PiecesOS & Configuring Permissions

Follow the instructions below for a detailed guide on setting up and configuring PiecesOS to correctly pass captured workflow context to the Pieces MCP server.

Setting Up Cline

Cline stores its MCP configuration in a separate file: ~/.cline/data/settings/cline_mcp_settings.json.

Setup via Extension UI

Open VS Code with the Cline extension installed. Click the `Cline` icon in the activity bar, then click the `gear icon` or navigate to **MCP Servers** in the Cline panel. Click `Add Server`, select **SSE** as the transport type, and enter: ```plaintext http://localhost:39300/model_context_protocol/2024-11-05/sse ``` Name it `pieces` and save.

Manual JSON Config

Edit ~/.cline/data/settings/cline_mcp_settings.json:

{
  "mcpServers": {
    "pieces": {
      "url": "http://localhost:39300/model_context_protocol/2024-11-05/sse",
      "type": "sse",
      "disabled": false,
      "autoApprove": []
    }
  }
}

Auto-Approve Specific Tools

To skip confirmation prompts for specific Pieces tools:

{
  "mcpServers": {
    "pieces": {
      "url": "http://localhost:39300/model_context_protocol/2024-11-05/sse",
      "type": "sse",
      "autoApprove": ["ask_pieces_ltm", "workstream_summaries_full_text_search"]
    }
  }
}

Using Pieces MCP Server in Cline

Once integrated, you can utilize Pieces LTM directly in Cline.

Open the Cline panel in VS Code. Check the **MCP** section for `pieces` with a connected status. Ensure Cline is in agent mode (not regular chat mode) so it can use MCP tools. Ask Cline to search your LTM. For example: *"What was I working on yesterday?"* Check out this [MCP-specific prompting guide](/products/mcp/prompting) if you want to effectively utilize the Long-Term Memory Engine (LTM-2.7) with your new Pieces MCP server.

Updating

Edit the config JSON and save. Cline reloads the server list from disk without requiring a VS Code restart.

Troubleshooting

If you're experiencing issues integrating Pieces MCP with Cline:

  1. Verify PiecesOS Status: Ensure PiecesOS is actively running on your system.

  2. Cline Uses Its Own Config: Cline reads from ~/.cline/data/settings/cline_mcp_settings.json, not .vscode/mcp.json.

  3. Use SSE, Not Streamable HTTP: Cline has compatibility issues with Streamable HTTP—use the SSE endpoint (/model_context_protocol/2024-11-05/sse).

  4. Use Agent Mode: Ensure Cline is in agent mode, not regular chat mode.

  5. Server Disconnected: Restart VS Code if the server shows as disconnected.


You're now set to enhance your Cline workflow with powerful context retrieval through Pieces MCP. Happy coding!