GitHub Copilot is exceptional at completing the line in front of you, but it suffers from chronic project amnesia. The moment you switch repositories, leave your editor to check documentation, or pick up a task you last touched three weeks ago, GitHub Copilot loses track of your personal patterns. It defaults to generating generic boilerplate from its broad training data rather than pulling from the battle-tested authentication helper or custom query wrapper you already wrote.
At 365Finds, we see developers waste hours prompting AI to re-solve problems they solved last month. The solution is not more aggressive prompting; it is giving your generative assistant an explicit, context-rich memory layer.
By integrating Pieces with GitHub Copilot in VS Code—leveraging the Model Context Protocol (MCP) and PiecesOS—you turn GitHub Copilot from an isolated code generator into a pair programmer backed by your own curated engineering archive. Here is how to configure the integration, how the workflow operates, and where the trade-offs lie.
The Division of Labor: Why Pair Pieces with GitHub Copilot?
Before touching any configuration file, it helps to understand why running both tools makes sense:
- GitHub Copilot provides real-time inline synthesis, natural language translation, and generative reasoning within active workspace buffers.
- Pieces provides local-first semantic memory. Through PiecesOS and its Long-Term Memory (LTM) engine, Pieces automatically captures snippets alongside critical contextual metadata: original source URLs, runtime dependencies, surrounding functions, tags, and local file paths.
- The Bridge (MCP): Using the Model Context Protocol, GitHub Copilot Chat in VS Code can directly invoke Pieces as a local data source, pulling exact snippets into Copilot's prompt context without requiring manual copy-pasting.
| Capability | Standalone GitHub Copilot | Standalone Pieces | Combined Architecture |
|---|---|---|---|
| Snippet Capture | Manual clipboard copy | Automatic & one-click with metadata | Automated capture into indexed repository |
| Cross-Repo Memory | Limited to current workspace | System-wide persistent storage | Copilot queries across all historical projects |
| Code Adaptation | Generates general patterns | Stores static fragments | Rewrites your exact snippet for new contexts |
| Privacy / Storage | Cloud-based telemetry & context | Local-first on-device indexing | Sensitive context stays in local PiecesOS |
At 365Finds, our stance is clear: relying solely on LLM context windows to retain past solutions is brittle and expensive. Deterministic code fragments should live in a structured retrieval engine like Pieces, while the generative lifting belongs to GitHub Copilot.
Step-by-Step Setup: Connecting Pieces to GitHub Copilot in VS Code
1. Install Prerequisites
Ensure you have the following installed on your machine:
- VS Code (latest stable release).
- PiecesOS and Pieces Desktop App: Download and launch PiecesOS from the official Pieces website. PiecesOS runs silently as a background service responsible for local vector indexing and metadata extraction.
- VS Code Extensions: Install both GitHub Copilot (along with GitHub Copilot Chat) and Pieces for VS Code from the Visual Studio Marketplace.
2. Enable Long-Term Memory (LTM) in Pieces
Open the Pieces Desktop App, head to Settings, and confirm that Long-Term Memory is toggled on. This allows Pieces to preserve contextual history—associating your saved code with the files, commits, and browser tabs where you found or wrote it.
3. Connect Pieces as an MCP Server in VS Code
GitHub Copilot in VS Code supports the Model Context Protocol (MCP), enabling it to query external tools and local databases.
- In the Pieces Desktop App, navigate to Settings > Model Context Protocol (MCP).
- Locate the GitHub Copilot connection card. Pieces generates an SSE (Server-Sent Events) endpoint or stdio command string for your local PiecesOS instance.
- In VS Code, open your user configuration (
settings.json) or your workspace MCP configuration file (mcp.json), and register Pieces:
{
"mcpServers": {
"Pieces": {
"transport": "sse",
"url": "http://localhost:39303/model_context_protocol/v1/sse"
}
}
}
(Note: If your local port differs, copy the exact URI displayed in your Pieces Desktop MCP settings view).
Once saved, restart VS Code or refresh your Copilot Chat runtime. GitHub Copilot Chat will register Pieces as an active MCP tool provider.
The Daily Workflow: Capturing and Reusing Context-Aware Snippets
Capturing with Context (Inside VS Code)
When you write a clean architectural pattern, an intricate regex, or an API client wrapper you want to reuse:
- Select the code block in VS Code.
- Right-click and choose Save to Pieces, or press
Ctrl+Alt+P(Cmd+Alt+Pon macOS). - Pieces captures not just the plain text, but also:
- The file name and relative directory structure.
- Associated language tags and imports.
- Auto-generated natural language summaries of what the block accomplishes.
Reusing via GitHub Copilot Chat
Instead of digging through previous branches or folders:
- Open GitHub Copilot Chat in VS Code.
- Switch to Agent Mode or mention Pieces directly in your prompt.
- Query your personal repository using natural language:
- "Look into my Pieces memory and retrieve the JWT validation middleware I saved. Adapt it for our new Express router."
- "Find the custom SQL retry logic in my Pieces snippets and rewrite it using async/await syntax for TypeScript."
- GitHub Copilot executes a tool call to the Pieces MCP server, reads the exact code snippet alongside its original context, and synthesizes the updated version directly into your active editor buffer.
Realistic Trade-Offs: What 365Finds Evaluators Noticed
Integrating these two tools is significantly more efficient than standard manual snippet management, but 365Finds believes in naming the operational friction:
- Background Resource Overhead: PiecesOS is a full local engine running on-device models for OCR, syntax parsing, and vector retrieval. Expect PiecesOS and its related background processes to consume between 400 MB and 1 GB of RAM. On constrained developer laptops, this is a noticeable footprint alongside VS Code and Copilot.
- MCP Maturity: The Model Context Protocol ecosystem inside VS Code is evolving rapidly. Occasional connection resets require bouncing the VS Code window or re-verifying the PiecesOS background daemon port.
- Discipline Required: While Pieces has automated memory capabilities, your snippet library is cleanest when you intentionally save well-defined blocks. Dumping messy, unvetted snippets creates a noisy vector index for Copilot to search.
365Finds Recommendation
If your daily development is confined to a single, monolithic repository with comprehensive test suites, GitHub Copilot's built-in workspace indexing (@workspace) may already meet your needs.
However, if you are a freelance developer, an agency engineer handling multiple client codebases, or someone frequently switching between backend, frontend, and DevOps scripts, pairing Pieces with GitHub Copilot solves the multi-tasking penalty. Pieces functions as your permanent, local code vault; GitHub Copilot acts as the adaptable translator. The initial ten-minute MCP setup pays for itself the first time Copilot recalls and adapts a complex utility function written months ago in an unrelated project.