Pieces MCP + Goose Integration

The Pieces MCP integration with Goose lets you use Pieces Long-Term Memory directly through the Goose CLI, enhancing your coding workflow with deep contextual awareness.



Get Started

Integrating the Pieces MCP with Goose is a powerful way to bring your daily workflow context directly into your command line or desktop interface.

With this integration, you'll have a command-line AI assistant that knows more about your coding activities than just the current project.

You can ask Pieces about bug fixes in your code discussed in your team channel, inquire about similar code you've worked on, or prompt it to double-check that your new code meets the criteria your coworker suggested—and much more.

Learn how to integrate the Pieces MCP into Goose by following the steps below.

Prerequisites

There are [2] primary prerequisites for integrating Pieces with Goose as an MCP—an active instance of PiecesOS and the fully-enabled Long-Term Memory (LTM-2) engine.

1

Install & Run PiecesOS

Make sure that PiecesOS is installed and running. This is required for the MCP server to communicate with your personal repository of workflow data and pass context through to the Goose interface.

2

Enable Long-Term Memory

For the MCP server to interact with your workflow context, you must enable the Long-Term Memory Engine (LTM-2) through the Pieces Desktop App or the PiecesOS Quick Menu in your toolbar.

3

Install Goose

If you haven't installed Goose yet, follow the installation instructions.

SSE Endpoint

To use Pieces MCP with Goose, you'll need the Server-Sent Events (SSE) endpoint from PiecesOS:

http://localhost:39300/model_context_protocol/2024-11-05/sse

Keep in mind that the specific port (i.e., 39300) PiecesOS is running on may vary.

To find the up-to-date SSE endpoint with the active instance of POS (including the current port number), open the PiecesOS Quick Menu and expand the Model Context Protocol (MCP) Servers tab.

There, you can copy the SSE endpoint with one click, which includes the active PiecesOS port number.

You can also find this in the Pieces Desktop App by opening the Settings view and clicking Model Context Protocol (MCP).

Setting Up Goose with Pieces MCP

Follow the steps below to set up Pieces MCP with Goose, either through the command line or desktop application.

Make sure you have the latest version of Goose installed to ensure compatibility with Pieces MCP.

You will need to go through additional set-up steps (such as setting up your LLM provider) which involves setting up your host, choosing your model, using your API key, and more.

Read the official, open-source documentation on completing these set-up steps.

via CLI

Setting up the Pieces MCP through the Goose Command Line Interface is straightforward.

1

Run the Configuration Command

Open your terminal (macOS/Linux) or CMD (Windows) and run:

goose configure
2

Choose ‘Add Extension’

From the list of available options, choose Add Extension.

3

Choose ‘Remote Extension’

Select Remote Extension from the list of extension types.

4

Give it a Name

Name your extension Pieces or something similar.

5

Enter the SSE Endpoint URL

From PiecesOS, the Desktop App, or this documentation, obtain the Pieces MCP SSE endpoint URL and paste it into your terminal.

http://localhost:39300/model_context_protocol/2024-11-05/sse

Adjust the port number if your local instance of PiecesOS runs on a different one.

6

Set the Tool Timeout

You’ll be prompted to enter a value for timing out the tool in case of an error or repeated hangtime. The default value is 300—you can enter that value, or another.

7

Optional Configurations

Lastly, you’ll be prompted to add a description or additional environment variables—these are not required. Select No to both if you want to proceed.

8

Success!

You’ll now see a message like Added Pieces Extension or similar, depending on the name you’ve attributed to the extension. You can use goose list extensions to verify and check the list of integrated extensions within Goose.

For macOS Users:
For macOS Users:

You may see an error message when configuring Goose, like:

Warning: Goose installed, but /Users/you/.local/bin is not in your PATH…

You can fix this issue by adding export PATH=”$HOME/.local/bin:$PATH” to your your ~/.zshrc or ~/.bashrc.

Then, reload with source ~/.zshrc and start a Goose session by using goose from anywhere.

Using Pieces MCP with Goose

Once the integration is set up, you can start using Pieces Long-Term Memory through Goose.

Starting a Conversation

1

Open up a Goose Chat

Simply type goose in your terminal to start a new conversation:

goose

This will open a prompt where you can interact with Goose, which now has access to your Pieces Long-Term Memory.

2

Start Prompting

You can now start interacting with the Pieces MCP server.

Try using this prompt:

I need a status update for what I was working on yesterday. Create a report with 5 bullet points based off the most important activities, and give each one a brief description. Use time stamps to accurately report how long I spent working on group of tasks/topics.

This prompt is formulated for users already familiar with PiecesOS who use the Long-Term Memory Engine.

If you are a first-time user, it is recommended that you launch PiecesOS and enable LTM, then allow some time for data capture before using this prompt for a desirable output.

Here’s a response using that exact same prompt inside of Goose using the Pieces MCP integration:

Hey!
Hey!

Check out this MCP-specific prompting guide if you want to effectively utilize the Long-Term Memory Engine (LTM-2) with your new Pieces MCP server.

Toggling & Removing Pieces MCP

To remove the Pieces MCP for Goose, you can follow the same process you otherwise would for removing any Goose extension.

1

Enter the Configuration Settings

Open up your terminal and type goose configure, then press return (macOS) or enter (Windows/Linux).

2

Extension Toggling

Use your keyboard’s up and down arrow keys to navigate down to Toggle Extensions.

3

Un-Toggle your Pieces MCP Server

Using arrow keys to navigate the list, press space (macOS/Windows/Linux) when the carrot is pointing towards your targeted extension.

Then, press return (macOS) or enter (Windows/Linux) to confirm changes.

4

Re-enter the Configuration Settings

Use goose configure to re-enter the configuration menu.

5

Removing Extensions

Use your arrow keys to navigate to Remove Extensions, then, using the same space and enter/return process, first toggle then confirm your removal of the Pieces MCP extension.

Troubleshooting

If you're experiencing issues integrating Pieces MCP with Goose, follow these troubleshooting steps:

  1. Verify PiecesOS Status: Ensure PiecesOS is actively running on your system. MCP integration requires PiecesOS to be operational.

  2. Confirm LTM Engine Activation: Make sure the Long-Term Memory Engine (LTM-2) is enabled in PiecesOS, as this engine aggregates context necessary for Goose to retrieve accurate results.

  3. Single MCP Instance: Make sure that you aren't testing multiple instances of the Pieces MCP server in different IDEs. This cross-contamination conflict with the SSE and several MCP instances running on the same port can cause issues in different development environments.

  4. Check MCP Server Status: If you're encountering messages such as "Sorry, I can't do this," your MCP server may not be properly configured or running.

  5. Verify Port Configuration: Double-check the MCP endpoint URL and the port number in your Goose configuration to ensure accuracy. You can find the current SSE endpoint URL in the Pieces Desktop App under Settings → Model Context Protocol (MCP), or in the PiecesOS Quick Menu. It is usually formatted as:

http://localhost:{port_number}/model_context_protocol/{version}/sse
  1. Mac PATH Issues: If you're having trouble with Goose CLI on macOS, try manually adding it to your PATH:
export PATH="$HOME/.local/bin:$PATH"
  1. Restart Services: If problems persist, try restarting both PiecesOS and Goose, then reconfigure the extension with the current port number.

  2. Use the Correct Mode: You can experience a blockage of LTM data if you are using any other chat mode than Auto mode. Make sure to use goose configure to change chat modes to avoid issues.


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

Updated on