Pieces manages code context across Visual Studio Code and JetBrains IDEs by acting as an external, cross-environment memory layer powered by a centralized local daemon (Pieces OS) and connected through the open Model Context Protocol (MCP). Instead of trapping code snippets, chat history, and architectural context inside isolated editor silos, Pieces captures developer workflow data locally, enriches it with semantic metadata, and makes it available simultaneously to AI assistants in VS Code (such as GitHub Copilot and Cursor) and JetBrains IDEs (such as IntelliJ IDEA, PyCharm, and WebStorm).
While Pieces initially relied on dedicated, editor-specific plugins, the platform has officially transitioned to MCP-based integrations. This architecture allows developers switching between VS Code and JetBrains environments to preserve their active working context, retrieve historical code snippets with original file origins, and ground local coding assistants in shared project history without repetitive copy-pasting.
1. Core Architecture: The Local Memory Engine and MCP
Understanding how Pieces integrates with developer environments requires understanding its decoupled, two-tier architecture:
+-------------------------------------------------------------+
| Developer Workspaces |
| +---------------------------+ +-----------------------+ |
| | VS Code / Cursor | | JetBrains IDEs | |
| | (GitHub Copilot / Continue) | | (IntelliJ, PyCharm...) | |
| +-------------+-------------+ +-----------+-----------+ |
+----------------|-----------------------------|--------------+
| (Model Context Protocol) | (MCP / Streamable HTTP)
v v
+-------------------------------------------------------------+
| Pieces OS |
| (Local Background Daemon : localhost:39300) |
| +-------------------------------------------------------+ |
| | Long-Term Memory Engine (LTM-2.7+) | |
| | - Workflow observation (files, terminal, browser) | |
| | - Code snippet repository (Pieces Drive) | |
| | - Automatic metadata enrichment (tags, origin, links) | |
| | - Neural semantic code search | |
| +-------------------------------------------------------+ |
+-------------------------------------------------------------+
Pieces OS: The Centralized Local Daemon
Pieces does not run inside the IDE process itself. Instead, it relies on Pieces OS, a lightweight background service running directly on the developer's local machine (typically listening on localhost:39300). Pieces OS houses the storage repository, metadata indexing pipeline, and local AI engines. Because Pieces OS operates outside any single editor, it serves as the single source of truth for both VS Code and JetBrains installations on the same machine.
Long-Term Memory (LTM) Engine
The Pieces Long-Term Memory (LTM-2.7+) engine passively indexes workflow artifacts across sessions. It observes active code blocks, visited documentation, git commit patterns, and terminal snippets. When a developer queries an AI assistant in either IDE, the LTM engine surfaces relevant temporal context—such as what function was being modified thirty minutes earlier in another workspace.
The Architectural Shift from Legacy Plugins to MCP
Historically, Pieces maintained separate native plugins in the VS Code Marketplace and JetBrains Marketplace that provided in-editor sidebars and gutter quick-actions. Pieces has officially sunset these legacy extensions in favor of Anthropic's Model Context Protocol (MCP). By running an MCP server directly out of Pieces OS, Pieces exposes its snippet store and LTM context as standard tools and resources that any MCP-compliant coding assistant can access natively.
2. How Context Is Managed Across VS Code and JetBrains
Pieces approaches context management not just as simple clipboard storage, but as a dynamic graph connecting code, origins, and explanations:
Cross-IDE Context Continuity
Developers frequently switch between editors—for instance, using PyCharm or IntelliJ for backend services and VS Code for frontend frameworks or quick configuration edits. Because Pieces OS maintains a unified local database:
- A snippet saved or referenced in a JetBrains project is immediately searchable and usable inside VS Code.
- Contextual patterns recorded while debugging in VS Code can inform the JetBrains AI Assistant when navigating related repositories.
Automated Metadata Enrichment
When code blocks are saved to Pieces Drive (either through the Pieces Desktop app, CLI, or MCP actions), Pieces automatically parses the content and attaches critical context without manual entry:
- Language and Syntax Classification: Identifies exact language variants and framework idioms.
- Source and Origin Anchors: Preserves original file paths, repository URLs, and project names.
- Natural Language Descriptions and Tags: Generates functional summaries, keyword tags, and complexity ratings.
- Related Collaborators and Documentation Links: Detects URLs, imports, and related references within the block.
Grounding AI Queries Without Manual Copy-Pasting
Instead of repeatedly copying utility classes, SQL schemas, or architectural guidelines into prompt windows, developers query their MCP-connected assistant. The assistant uses Pieces MCP tools to retrieve pertinent code blocks and recent workstream history from Pieces OS, grounding LLM generations in verified local context.
3. Step-by-Step Setup Guide: VS Code and JetBrains
To establish context management across both environments, follow these implementation steps.
Step 1: Install and Configure Pieces OS
- Download and install Pieces OS and the Pieces Desktop App from the official Pieces website.
- Launch Pieces OS and ensure it is actively running in the system tray or menu bar.
- Open the Pieces Desktop App, navigate to Settings, and enable the Long-Term Memory (LTM) engine.
- Verify your local MCP endpoint under Settings -> Model Context Protocol (MCP). The endpoint URL typically follows the structure:
http://localhost:{port}/model_context_protocol/2025-03-26/mcp
Step 2: Connect Visual Studio Code
Option A: One-Click Connection (Cursor / VS Code via Pieces Desktop)
In the Pieces Desktop App, go to Settings -> MCP -> MCP Connections and click Add to VS Code (or Cursor). Pieces automatically updates your local editor configuration.
Option B: GitHub Copilot in VS Code
To connect Pieces LTM to GitHub Copilot chat:
- Open your VS Code
settings.json(User or Workspace). - Add the Pieces MCP server block under the MCP configuration:
(Note: Replace{ "github.copilot.chat.mcpServers": { "pieces": { "type": "sse", "url": "http://localhost:39300/model_context_protocol/2025-03-26/mcp" } } }39300with your active Pieces OS port if custom-configured.)
Option C: Continue.dev Extension (Agent Mode)
If using the open-source Continue.dev assistant in VS Code, add the Pieces MCP server to your ~/.continue/config.json. Note that MCP tool calling operates in Continue's Agent mode.
Step 3: Connect JetBrains IDEs (IntelliJ IDEA, PyCharm, WebStorm, etc.)
Native MCP Support (JetBrains 2025.2+)
Starting with version 2025.2, JetBrains IDEs natively support Model Context Protocol integrations for the built-in AI Assistant:
- Ensure your JetBrains IDE is updated to version 2025.2 or newer.
- Navigate to Settings / Preferences -> Tools -> Model Context Protocol (MCP).
- Add a new MCP server connection:
- Name:
Pieces - Transport Type: Streamable HTTP (recommended over legacy SSE transports).
- URL: Enter your local Pieces OS MCP endpoint URL (
http://localhost:39300/model_context_protocol/2025-03-26/mcp).
- Name:
- Save and apply. The native JetBrains AI Assistant can now call Pieces MCP tools to inspect your saved snippets and long-term memory.
Alternative: Continue.dev Plugin for JetBrains
For JetBrains versions prior to 2025.2, install the Continue plugin from the JetBrains Marketplace, open its settings, and configure the Pieces MCP endpoint in agent mode to achieve equivalent context querying.
4. Feature and Workflow Comparison: VS Code vs JetBrains
| Dimension | VS Code Environment | JetBrains IDE Suite |
|---|---|---|
| Integration Mechanism | MCP via GitHub Copilot, Continue.dev, or Cursor; Pieces Desktop 1-click connect | Native MCP in JetBrains 2025.2+; Continue.dev plugin for older versions |
| Transport Protocol | Server-Sent Events (SSE) or Streamable HTTP | Streamable HTTP (recommended) or SSE |
| Context Synchronization | Shared local memory via Pieces OS daemon | Shared local memory via Pieces OS daemon |
| Snippet Retrieval | Accessible through MCP agent tools and natural language prompts | Accessible through MCP assistant queries and prompt context |
| Legacy Extensions Status | Sunset; replaced by standardized MCP server | Sunset; replaced by standardized MCP server |
| Cross-Project Scope | Reads workspace files plus Pieces OS global repository | Reads IDE project indexes plus Pieces OS global repository |
5. Trade-offs, Limitations, and Operational Evaluation
Key Advantages
- True Multi-IDE Portability: Solves context loss for developers who routinely switch between VS Code (scripts, front-end) and JetBrains (heavy backend, JVM, Python).
- Local-First Privacy: Pieces OS stores code snippets, metadata, and workflow logs locally on device. Developers maintain granular control over whether external LLMs receive that context.
- Automatic Contextualization: Code snippets in Pieces Drive do not degrade into unorganized raw text; they maintain origin paths, dependencies, and semantic summaries over time.
Operational Constraints and Considerations
- Pieces OS Daemon Dependency: All context retrieval, snippet indexing, and MCP endpoints depend on the Pieces OS background process. If Pieces OS is stopped or crashes, IDE assistants lose access to the memory layer.
- Deprecation of In-Editor Visual Controls: Because legacy plugins were sunset, visual UI widgets like Code Vision inline lenses, gutter icons, and dedicated editor sidebars are no longer maintained. Interactions now occur through chat/agent prompts and the standalone Pieces Desktop App.
- IDE Version Requirements: Seamless native MCP support in JetBrains requires version 2025.2 or later; developers on older LTS releases must rely on third-party bridge plugins like Continue.dev in agent mode.