AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

Integrating Pieces with GitHub Copilot: How to Preserve Code Context Across Multiple IDEs

Jean-Benoît Doazan · 365Finds Editorial
Indexed 88,650 Wiki articles

Put 365 Wiki to work with your AI

Copy the prompt below, paste it into the AI you already use, then ask your question.

Download full Skill

Try it with the prompt first. If you use 365 Wiki often, install the full 365Wiki Skill so you do not have to paste it again. No regular AI? Gemini or Microsoft Copilot on the web will work.

365Wiki Skill

GitHub Copilot is exceptionally capable at synthesizing code within an open file, but it suffers from persistent workspace amnesia. The moment you switch from frontend TypeScript in Visual Studio Code to a backend microservice in JetBrains IntelliJ, or review an API specification in your browser, Copilot’s conversational awareness resets to zero. Each workspace operates in an isolated silo.

Pieces addresses this fundamental fragmentation. Rather than forcing developers to manually copy-paste snippets or paste giant context dumps into every chat window, Pieces operates as an on-device workflow engine with a local Long-Term Memory (LTM) system.

At 365Finds, we have tracked how developers attempt to link these two ecosystems. The integration has recently evolved in a critical way: Pieces officially sunset its legacy IDE-specific plugins in favor of Anthropic's open Model Context Protocol (MCP). Here is how you configure Pieces with GitHub Copilot to preserve cross-IDE context, what the architectural shift means for your workflow, and where the practical limits lie.

The Architecture: Why MCP Replaced Bespoke IDE Plugins

For years, developer tooling suffered from "plugin fatigue." Pieces previously maintained separate extensions for Visual Studio Code, JetBrains IDEs, Visual Studio, and Sublime Text. Maintaining custom plugins across multiple rapidly moving IDE ecosystems was inherently brittle.

Pieces has transitioned its integration strategy entirely to the Model Context Protocol. Under this model:

365Finds considers this architectural change a substantial improvement. Instead of synchronizing state between competing IDE extensions, PiecesOS functions as a single source of truth on your machine. Any context captured while working in one environment is immediately queryable by GitHub Copilot in another.

Step-by-Step Setup: Connecting Pieces to GitHub Copilot

Integrating Pieces with GitHub Copilot requires running PiecesOS locally and configuring GitHub Copilot to recognize Pieces as an active MCP server.

1. Ensure PiecesOS and LTM Are Active

2. Configure the Pieces MCP Server

You have two straightforward methods to link Pieces to your IDE environment:

Method A: Automatic Setup via the Pieces CLI

If you have the Pieces CLI installed, open your terminal and run:

pieces mcp setup
  1. Select your target environment (such as VS Code) from the interactive prompt.
  2. When asked, choose User Settings rather than Workspace Settings. Configuring this globally at the User level ensures that every workspace and project you open automatically inherits access to Pieces.
  3. Validate the connection by running:
pieces mcp status

Method B: Manual Configuration in VS Code Settings

If you prefer direct configuration, or need to verify your endpoint:

  1. Open the Pieces Desktop App and navigate to Settings > Model Context Protocol (MCP) to view your local SSE endpoint (typically structured as http://localhost:39300/model_context_protocol/2024-11-05/sse or a dynamically assigned local port).
  2. Open VS Code and press Ctrl+, (Windows/Linux) or Cmd+, (macOS), search for MCP, and click Edit in settings.json.
  3. Add the server entry:
{
  "mcpServers": {
    "Pieces": {
      "url": "http://localhost:39300/model_context_protocol/2024-11-05/sse"
    }
  }
}
  1. Save the file. Ensure the server indicator registers as connected.

Preserving Context Across Multiple IDEs in Practice

Once PiecesOS is running and Copilot is connected via MCP, context preservation shifts from a manual copy-paste exercise to an ambient retrieval process.

Scenario: Moving from Backend (JetBrains) to Frontend (VS Code)

  1. Work and Research: You are debugging a database migration or microservice in IntelliJ IDEA or PyCharm. You inspect stack traces, check documentation in Chrome using the Pieces Web Extension, or save transient SQL snippets into Pieces.
  2. Ambient Ingestion: PiecesOS indexes these actions locally into your LTM timeline without interrupting your typing.
  3. Retrieval in Copilot Chat: You open Visual Studio Code to update the corresponding frontend API client. Open GitHub Copilot Chat and switch the interaction mode to Agent Mode (or mention @pieces).
  4. Context-Grounded Prompting: Instead of retyping the schema or hunting down the terminal output, you prompt Copilot:

    "@pieces Look at the API error and response structure I investigated earlier today in my backend session, and implement the corresponding TypeScript interface and fetch handler."

  5. Copilot calls the Pieces MCP tool (ask_pieces_ltm), retrieves the exact payload structure recorded by PiecesOS from your earlier session, and writes the code without forcing you to switch back and forth.

The 365Finds Assessment: Capabilities vs Limitations

While the combination of Pieces and GitHub Copilot solves genuine pain points, 365Finds advises developers to maintain realistic expectations regarding how the context is utilized:

Feature DimensionGitHub Copilot NativePieces + GitHub Copilot via MCP
Context ScopeCurrent active workspace and open tabsEntire OS developer workflow, past research, and cross-IDE sessions
Integration LayerEmbedded inside specific editor processDecoupled background service (PiecesOS) communicating via MCP
Inline AutocompletionYes, generates ghost text on keystrokeNo, MCP context feeds GitHub Copilot Chat, not inline Tab-completions
Data PrivacyCloud inference subject to GitHub policyContext indexing and LTM storage remain strictly local on-device
Memory PersistenceCleared when IDE closes or repo switchesPersists continuously across system restarts and multi-IDE transitions

Key Boundaries to Understand

Configuring Pieces as an MCP server at the global User level allows GitHub Copilot Chat to transcend single-project boundaries, grounding code generation in your actual multi-tool developer history.

References