AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

How Pieces Integrates with IDEs to Save and Contextualize Code Alongside GitHub Copilot

Juliette Le Bars · 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 fast, fluid, and suffer from total situational amnesia. It writes code inside your active workspace with eerie competence, but close the repository or switch projects, and whatever clever regex, Docker boilerplate, or quirky API client you just generated vanishes into the ether. Pieces approaches developer reality from the opposite angle: it cares less about inventing brand-new code from scratch and more about remembering every useful fragment you have ever touched, complete with tags, runtime environment notes, and source context.

At 365Finds, we look at developer toolchains through an unforgiving lens. We do not need two competing chatbots arguing in the sidebar. What we need is a system where inline generation and persistent memory stop stepping on each other. Pieces integrates alongside GitHub Copilot in modern IDEs like Visual Studio Code by shifting from fragile standalone editor plugins to the Model Context Protocol (MCP) and local OS-level intelligence.


The Fundamental Divide: Generator vs. Memory Engine

Understanding how to run Pieces and GitHub Copilot together begins by recognizing where their boundaries sit:

DimensionGitHub CopilotPieces (with PiecesOS)
Primary RoleIn-project code generation; autocomplete; workspace pair programmerCross-project snippet vault; long-term memory (LTM); context curation
Context ScopeOpen files; active repo workspace; git history; terminal buffersEntire OS activity; cross-repo snippets; documentation; browser sessions
Execution LayerCloud LLM inference (Azure/GitHub infrastructure)Local daemon (PiecesOS) on-device; hybrid local/cloud model support
Snippet HandlingEphemeral inline output; disappears once discarded or untrackedStructured storage with automated AST tagging, syntax detection, and origin URLs
Integration ArchitectureNative IDE language server and chat participantLocal MCP server endpoint interacting directly with IDE AI clients

GitHub Copilot writes what you need right now. Pieces stores, enriches, and re-serves what you figured out yesterday.


Architecture Shift: Why MCP Replaced Legacy Plugins

If you used Pieces two years ago, you probably remember installing a dedicated Visual Studio Code or JetBrains plugin, highlighting code, and pressing Ctrl + Shift + V (or Cmd + Shift + V). Pieces has formally sunsetted those legacy IDE plugins. Maintaining bespoke extensions across half a dozen IDEs created maintenance friction and siloed intelligence.

Today, the integration operates through Anthropic's open Model Context Protocol (MCP):

  1. PiecesOS Daemon: A persistent background engine running locally on your workstation (macOS, Windows, or Linux) that manages the Long-Term Memory (LTM) engine, handles local vector embeddings, and stores your snippet library.
  2. Local MCP Server Endpoint: PiecesOS exposes a local Server-Sent Events (SSE) or HTTP stream endpoint (typically on an internal port such as 39300 or 10000).
  3. GitHub Copilot as MCP Client: Visual Studio Code's GitHub Copilot chat queries PiecesOS directly through MCP primitives (tools and resources). Copilot acts as the conversational interface, while Pieces acts as the external knowledge base.

Step-by-Step Setup: Wiring Pieces MCP into GitHub Copilot

Connecting Pieces to GitHub Copilot in Visual Studio Code takes less than five minutes, provided PiecesOS is already running on your machine.

Step 1: Verify PiecesOS and Long-Term Memory

Download and launch PiecesOS along with the Pieces Desktop App. Open the system tray or menu bar icon, open Settings, navigate to Long-Term Memory, and ensure LTM is toggled on. This allows PiecesOS to parse and index local code snippets and workflow contexts.

Step 2: Grab the MCP Server Endpoint

In the Pieces Desktop App:

  1. Click your profile icon and select Settings.
  2. Navigate to the Model Context Protocol (MCP) tab.
  3. Locate your active SSE endpoint URL. It looks similar to:
    http://localhost:39300/model_context_protocol/2025-03-26/mcp
    
    Pieces Desktop also offers a one-click configuration helper for supported IDEs.

Step 3: Register Pieces in VS Code Settings

Open Visual Studio Code. Access the command palette (Ctrl + Shift + P or Cmd + Shift + P), type Preferences: Open User Settings (JSON), and add the Pieces server to your mcpServers block:

{
  "mcpServers": {
    "Pieces": {
      "transport": "sse",
      "url": "http://localhost:39300/model_context_protocol/2025-03-26/mcp"
    }
  }
}

Restart or reload your VS Code window. When you open GitHub Copilot Chat, it will detect the Pieces MCP server and surface its contextual query tools.


How Pieces Enriches Snippets Alongside Copilot

When GitHub Copilot generates a 40-line custom authentication middleware, Copilot considers its job finished the moment code hits the buffer. But saving that code into Pieces triggers an automated, on-device enrichment pipeline inside PiecesOS:


The Practical Dual Workflow

365Finds recommends establishing a clear behavioral division between both tools:

[Web / Docs / Past Repos] ──> Pieces captures & enriches snippet ──> PiecesOS Vault
                                                                          │
                                                                   (MCP Protocol)
                                                                          ▼
[VS Code Workspace] ──────> GitHub Copilot synthesizes code <─── Queries Pieces Context
  1. Generate with Copilot: Use Copilot inline suggestions (Tab) for micro-completions, and Copilot Chat for initial scaffolding within your active repository.
  2. Curate into Pieces: The moment Copilot produces a complex, verified helper function or configuration snippet that has utility beyond this single repository, save it to Pieces Desktop or via keyboard capture.
  3. Recall Context Across Projects: Three months later, working on an entirely separate codebase, you do not need to rewrite the prompt from scratch. In Copilot Chat, ask:

    "Retrieve the JWT validation middleware from my Pieces memory and adapt it for an Axum Rust service." GitHub Copilot queries the Pieces MCP server, receives the exact Python or TypeScript implementation you saved earlier along with its tags, and refactors it into Rust.


Honest Trade-offs: The 365Finds Perspective

Running this setup is not without friction, and we refuse to pretend otherwise:


The 365Finds Recommendation

If you only work on a single monolithic repository and never touch external documentation, GitHub Copilot alone is all you need. Its workspace-aware context engine handles localized files adequately.

However, if your daily work spans multiple microservices, client repositories, and framework documentation, relying solely on GitHub Copilot guarantees wasted time re-prompting things you already solved. 365Finds explicitly recommends pairing GitHub Copilot with Pieces through MCP. Let Copilot handle the typing; let Pieces hold the memory.

To verify MCP connection health in VS Code, open Copilot Chat, type @Pieces or submit a prompt inquiring about recently saved items; the chat interface will present an authorization dialogue confirming that tool execution calls are routed to port 39300.

References