Skip to main content

Memory (Named Clipboard)

The Memory feature provides persistent key-value storage that MCP tools and AI agents can use to share data between tool invocations. With support for both named (semantic keys) and indexed (array-like) access patterns, it enables sophisticated data persistence workflows.

Overview

Named Storage

Store and retrieve data using semantic keys like “user_preferences” or “session_context”

Indexed Storage

Push and pop data in stack-like fashion for sequential processing

Profile Isolation

Data is scoped to your profile, ensuring complete isolation between users

TTL Expiration

Automatic cleanup of expired entries with configurable time-to-live

Access Patterns

How it works: Store data with semantic keys for direct retrieval.Example Keys: user_preferences, last_search_results, conversation_contextBest for:
  • Configuration and preferences
  • Caching frequently used data
  • Sharing state between tools
  • Key-based lookups
// Set a named entry
await clipboard.set({
  name: "user_preferences",
  value: JSON.stringify({ theme: "dark", lang: "en" }),
  contentType: "application/json"
});

// Get by name
const prefs = await clipboard.get({ name: "user_preferences" });

Quick Start

1

Access Memory Page

Navigate to Memory in the sidebar to view your clipboard entries
2

Create Named Entry

Click + New Entry and provide a name, value, and optional settings
3

Use in MCP Tools

MCP tools can read and write to your clipboard using the clipboard tools
4

Monitor & Clean

View all entries, check expiration times, and delete unused data

MCP Tools

The following MCP tools are available for clipboard operations:

Named Operations

ToolDescription
pluggedin_clipboard_setSet or update a named clipboard entry
pluggedin_clipboard_getRetrieve entry by name or index
pluggedin_clipboard_deleteDelete a specific entry
pluggedin_clipboard_listList all clipboard entries

Stack Operations

ToolDescription
pluggedin_clipboard_pushPush value to indexed stack
pluggedin_clipboard_popPop and remove the most recent entry

Data Structure

Clipboard Entry

interface ClipboardEntry {
  uuid: string;                    // Unique identifier
  name?: string;                   // Semantic key (for named access)
  idx?: number;                    // Stack index (for indexed access)
  value: string;                   // Entry content
  contentType: string;             // MIME type (default: "text/plain")
  encoding: "utf-8" | "base64" | "hex";  // Content encoding
  sizeBytes: number;               // Content size in bytes
  visibility: "private" | "workspace" | "public";
  createdByTool?: string;          // Tool that created entry
  createdByModel?: string;         // AI model that created entry
  source?: "ui" | "sdk" | "mcp";   // Entry source (auto-set)
  createdAt: Date;
  updatedAt: Date;
  expiresAt?: Date;                // TTL expiration time
}

Source Types

The source field indicates how the clipboard entry was created:
SourceDescription
uiCreated via the web interface (default)
sdkCreated via one of the official SDKs
mcpCreated via MCP proxy tools
The source field is automatically set based on how the entry was created. You cannot override this value.

Content Types & Encoding

For plain text and JSON data:
{
  value: "Hello, World!",
  contentType: "text/plain",
  encoding: "utf-8"
}
Supported types: text/plain, application/json, text/markdown, text/html

Usage Examples

Sharing Data Between Tools

import { PluggedInClient } from 'pluggedinkit';

const client = new PluggedInClient({ apiKey: 'your-api-key' });

// Tool A: Save search results
await client.clipboard.set({
  name: 'last_search_results',
  value: JSON.stringify({ results: [...], query: 'test' }),
  contentType: 'application/json',
  ttlSeconds: 3600  // Expire in 1 hour
});

// Tool B: Retrieve and use results
const entry = await client.clipboard.getByName('last_search_results');
const results = JSON.parse(entry.value);

Processing Pipeline with Stack

// Step 1: Push initial data
await client.clipboard.push({
  value: JSON.stringify({ step: 1, data: 'raw input' }),
  contentType: 'application/json'
});

// Step 2: Process and push result
const step1 = await client.clipboard.pop();
const processed = processData(JSON.parse(step1.value));
await client.clipboard.push({
  value: JSON.stringify({ step: 2, data: processed }),
  contentType: 'application/json'
});

// Step 3: Final processing
const step2 = await client.clipboard.pop();
const final = finalProcess(JSON.parse(step2.value));

Limits & Quotas

Entry Size

Maximum 2 MB per entry value

Default TTL

24 hours if not specified

Rate Limits

Standard API rate limits apply

Profile Scope

Entries isolated per profile

Security & Isolation

Access Control

Clipboard entries are scoped to your profile and project. Never store sensitive credentials in clipboard entries.
  • Profile Isolation: Each profile has its own clipboard namespace
  • Project Scope: Entries are associated with the current project
  • Visibility Levels:
    • private: Only accessible by you
    • workspace: Shared within your workspace
    • public: Accessible via API with authentication

Data Protection

  • Encryption: Content encrypted at rest
  • TTL Enforcement: Automatic cleanup of expired entries
  • Size Limits: 2 MB maximum prevents abuse
  • Sanitization: Content validated before storage

Cleanup & Maintenance

Automatic Cleanup

Expired entries are automatically removed by the system cleanup job. You can also manually manage entries:
// Delete specific entry
await client.clipboard.delete({ name: 'old_entry' });

// Clear all entries (use with caution)
await client.clipboard.clearAll();

Best Practices

Choose descriptive names for named entries:
  • Good: user_session_context, last_api_response
  • Bad: temp, data1, x
  • Short-term data: 5-15 minutes
  • Session data: 1-4 hours
  • Cache data: 24 hours (default)
  • Persistent config: Set long TTL or refresh regularly
  • Named: For data you need to retrieve by key
  • Indexed: For sequential processing or temporary storage
Set appropriate content types for proper handling:
  • application/json for structured data
  • text/plain for simple strings
  • image/png, application/pdf for binary (base64 encoded)

Monitoring

Memory Page Features

The Memory page in the web interface provides:
  • Entry List: View all clipboard entries with metadata
  • Filters: Filter by name, content type, or visibility
  • Quick Actions: Copy, edit, or delete entries
  • Expiration Info: See when entries will expire
  • Usage Stats: Track clipboard usage

API Reference

Core Endpoints

// List all entries
GET /api/clipboard

// Get entry by name or index
POST /api/clipboard/get

// Set named entry
POST /api/clipboard

// Push to stack
POST /api/clipboard/push

// Pop from stack
DELETE /api/clipboard/pop

// Delete entry
DELETE /api/clipboard
See Clipboard API Reference for complete documentation.

Next Steps