Integration

Pieces integration

Pieces is an AI-powered code snippets manager that helps developers save, organize, and reuse code. The API provides access to snippet management, AI-powered code understanding, context-aware search, and intelligent code suggestions. Pieces uses on-device AI for privacy while offering cloud sync capabilities for teams.

Ask it in chat

Say what should happen.
The workflow builds itself.

When this happens, do that in Pieces.Built from the 7 Pieces tools below, on the connection you add once.

Common Pieces use cases

  • organizing snippets
  • fixing saved code
  • retrieving saved code
  • removing outdated code
  • building tag navigation
  • browsing snippet library
  • finding code by description
  • saving code from documentation
  • finding saved code
  • updating snippet tags

What you can do with Pieces

Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.

Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.

Snippet, 5 operations

  • create_snippetCreate snippetPOSTCreates a new code snippet in Pieces with AI-powered language detection, title generation, and automatic tagging.
  • delete_snippetDelete snippetPOSTPermanently deletes a code snippet from your Pieces library.
  • get_snippetGet snippetGETRetrieves a specific code snippet from Pieces with full content, metadata, and related context.
  • list_snippetsList snippetsGETLists code snippets from your Pieces library with filtering by language, tags, and full-text search.
  • update_snippetUpdate snippetPOSTUpdates an existing code snippet in Pieces with new content or metadata.

Semantic, 1 operation

  • semantic_searchSemantic searchGETPerforms AI-powered semantic search to find snippets using natural language descriptions.

Tag, 1 operation

  • list_tagsList tagsGETRetrieves all tags used in your Pieces snippet library for organization and filtering.

Use Pieces from Claude Code, Cursor or Codex

Connect Pieces in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its Pieces operations become tools the client can call, next to every other integration you connected.

Claude Code
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"
Codex (~/.codex/config.toml)
[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"

[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"
Cursor, Claude Desktop and other JSON configs
{
  "mcpServers": {
    "livecontext": {
      "type": "http",
      "url": "https://livecontext.ai/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Set up the MCP server step by step

How to connect Pieces

  1. Create your workspace

    Sign up free. Nothing to install.

  2. Connect Pieces once

    Pieces needs no credential, so its tools work immediately.

  3. Describe the job in chat

    The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.

Pieces integration FAQ

What can you do with the Pieces integration?

LiveContext exposes 7 operations on Pieces, covering snippet, semantic and tag. Common uses include organizing snippets, fixing saved code and retrieving saved code.

Popular integrations

Browse the whole catalog