AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

How to Use Pieces to Capture Workflow Context and Supercharge GitHub Copilot

Morgan E. McVickar · 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 remarkably good at guessing the next five lines of code inside an open file. What it cannot do is remember what happened outside your IDE ten minutes ago.

If you spent the last hour reading Stripe migration documentation in Chrome, debugging a gRPC connection issue in an external terminal, and discussing schema changes in Slack, GitHub Copilot knows none of that. It operates within the strict perimeter of your active workspace. When you switch back to your editor, you are forced to become a human copy-paste bridge—or watch GitHub Copilot hallucinate generic boilerplate because it lacks the surrounding architectural context.

This is where Pieces fits in. At 365Finds, we view Pieces not merely as a snippet manager, but as an external episodic memory layer for modern developers. By running PiecesOS locally to passively index cross-tool activity and exposing that stream through the Model Context Protocol (MCP), developers can feed fragmented research, terminal errors, and web snippets directly into GitHub Copilot.

Here is how to set up the workflow, how Pieces supplements GitHub Copilot's completions, and where the real-world friction lies.


Why GitHub Copilot Needs an External Memory Layer

To understand why this pairing works, you have to look at how GitHub Copilot gathers its prompt context.

GitHub Copilot relies on prompt synthesis: it scans the current file, examines open tabs in your editor, matches recent edits, and leverages repository embeddings. When all necessary logic lives inside that single repository, Copilot shines.

The problem arises when software development spills outside the repository:

Without workflow capture, you either manually paste blocks of reference code into comments to prompt GitHub Copilot, or you accept mediocre inline completions. Pieces solves this by acting as a system-level collector that captures, enriches, and surfaces context across your entire operating system.


How Pieces Captures Cross-Tool Context

Pieces is built on a two-tier architecture: PiecesOS (a background operating system service) and user-facing plugins across IDEs, web browsers, and desktop interfaces.

+-------------------------------------------------------------+
|                     Your Daily Workflow                     |
|   [Browser Docs]     [Slack / Teams]     [External Terminal]|
+-------------------------------------------------------------+
                               |
                               v
                     +-------------------+
                     | PiecesOS (Local)  |
                     | - OCR & Text Sync |
                     | - LTM Engine      |
                     | - Metadata Tagger |
                     +-------------------+
                               |
                   Model Context Protocol (MCP)
                               |
                               v
               +-------------------------------+
               |    VS Code / JetBrains IDE    |
               |                               |
               | +---------------------------+ |
               | | GitHub Copilot Chat (MCP) | |
               | +---------------------------+ |
               | | Inline FIM Completions    | |
               | +---------------------------+ |
               +-------------------------------+

Pieces captures your context through three distinct mechanisms:

1. Workstream Pattern Engine & Long-Term Memory (LTM)

PiecesOS runs a local engine called the Workstream Pattern Engine (WPE). When Long-Term Memory is toggled on, it passively logs active development context: URLs visited, code blocks rendered on web pages, terminal sessions, and clipboard events. It tags this information with language detection, related external links, and contextual summaries without sending your raw workstream data to a third-party cloud.

2. Browser Extensions (Chrome, Edge, Firefox)

When researching libraries or documentation, the Pieces extension allows you to save code snippets with a single click or automatically indexes code blocks you inspect. Crucially, Pieces extracts metadata along with the snippet: the origin URL, author, dependencies, and markdown descriptions.

3. Desktop Clipboard & Screen Capture

Pieces includes local OCR capabilities. If an error dialog or an architecture diagram contains text or code snippets, Pieces can parse the characters locally and convert them into structured code objects available in your local repository.


Connecting Pieces to GitHub Copilot via MCP

The most powerful way to feed Pieces context into GitHub Copilot is through the Model Context Protocol (MCP), an open protocol that standardizes how AI applications connect to external context providers. Pieces exposes an SSE (Server-Sent Events) MCP endpoint that GitHub Copilot can query inside compatible environments like VS Code.

Step 1: Verify PiecesOS and Enable LTM

  1. Download and install PiecesOS and the Pieces Desktop App from the official site.
  2. Confirm PiecesOS is running in your system tray or background menu.
  3. Open Pieces Desktop, go to Settings $\rightarrow$ Long-Term Memory (LTM), and ensure workstream capture is enabled.

Step 2: Configure the Pieces MCP Server in VS Code

Pieces allows one-click integration from its desktop settings, but you can also configure it directly in your environment.

Open your VS Code MCP configuration (either through user settings or your .vscode/mcp.json file) and register the Pieces local SSE endpoint:

{
  "mcpServers": {
    "Pieces": {
      "url": "http://localhost:39300/model_context_protocol/2024-11-05/sse"
    }
  }
}

(Note: Verify the port in Pieces Desktop under Settings $\rightarrow$ Model Context Protocol; default installations use localhost:39300.)

Step 3: Switch GitHub Copilot Chat to Agent Mode

  1. Open GitHub Copilot Chat in your IDE (Ctrl+Alt+I on Windows/Linux or Cmd+Ctrl+I on macOS).
  2. Switch Copilot Chat from standard Ask mode to Agent mode.
  3. In Agent mode, GitHub Copilot is granted the ability to call registered MCP tools. Copilot can now issue queries directly against Pieces' local memory index.

Supplementing GitHub Copilot: Two Core Workflows

Connecting Pieces to GitHub Copilot transforms how completions and conversational assistance function in day-to-day coding.

Workflow GoalMechanismGitHub Copilot Behavior
Cross-Tool Context RecallCopilot Chat + Pieces MCP AgentCopilot queries Pieces LTM for web docs, Slack specs, and past errors to write accurate implementations.
Precision Inline Ghost TextPieces Snippet Injection to Editor BufferGitHub Copilot's Fill-In-The-Middle (FIM) engine latches onto injected schemas to autocomplete matching logic.
Snippet ReusabilityPieces Snippet Explorer $\rightarrow$ Active EditorPast microservice patterns populate context without searching across historical git repositories.

Workflow A: Prompting Copilot Chat with External Context

Instead of manually hunting down URLs and pasting doc sections, you prompt GitHub Copilot Chat with natural references to your recent work:

"Based on the authentication documentation I was reviewing in Chrome earlier this morning, implement the token refresh callback for our Axios client."

In Agent mode, GitHub Copilot recognizes that the required knowledge lies outside the current repository. It invokes the Pieces MCP server, retrieves the captured snippet and documentation headers from Pieces LTM, and crafts the implementation using your exact library versions.

Workflow B: Guiding Inline Ghost-Text Completions

GitHub Copilot's fast inline ghost text uses Fill-In-The-Middle (FIM) heuristics, prioritizing content in recently focused editor buffers.

When starting a new feature:

  1. Open the Pieces panel in VS Code or JetBrains.
  2. Search or select a saved architectural snippet, payload interface, or sample API response.
  3. Insert or keep the snippet visible in a split tab.
  4. Return to your active file and start writing code.

GitHub Copilot immediately detects the companion snippet in the editor context window. Instead of guessing parameter names or using deprecated signatures, its inline completions seamlessly align with the reference implementation you curated in Pieces.


365Finds Analysis: Trade-offs and Practical Realities

At 365Finds, we appreciate tools that respect local machine boundaries. However, running a dual setup of Pieces and GitHub Copilot comes with distinct compromises that teams must evaluate:

What We Like

Where Friction Remains


The Verdict

If you use GitHub Copilot purely for basic syntax autocompletion within a single, self-contained repository, adding Pieces may be overkill.

However, if your daily work involves bouncing between third-party documentation, terminal diagnostics, team discussions, and multiple service repos, GitHub Copilot's isolated workspace model quickly becomes an obstacle. 365Finds recommends deploying Pieces alongside GitHub Copilot via MCP. Let GitHub Copilot handle the real-time code generation at your fingertips, and let Pieces provide the external memory Copilot desperately lacks.

References