PROTOCOL REFERENCE / AUGUST 2026

MCP Memory Server
Universal Model Context Protocol Architecture.

13 MIN READ · PROTOCOL SPECIFICATION & TRANSPORT REFERENCE
MCP SPEC 2024-11-05 READY
Transports: Stdio, HTTP/SSE (mcp-remote)Clients: Cursor, Claude, VS Code, WindsurfLicense: Apache-2.0

TL;DR

The Memwyre MCP Memory Server provides a universal context gateway conforming strictly to Anthropic's open Model Context Protocol. It exposes standardized tool primitives (search_memwyre, save_memory, get_inbox, approve_memory, delete_memory) to equip any compliant AI coding client with durable long-term memory.

Quick Summary / Key Takeaways

Answer: The Model Context Protocol (MCP) eliminates brittle, custom vendor plugins by establishing an open JSON-RPC standard for AI agents to interact with external tools. The Memwyre MCP Memory Server implements this standard across both Stdio and remote HTTP/SSE transports. By exposing a declarative 5-tool schema, any agent (Cursor Composer, Claude Desktop, Roo-Code, Windsurf) can autonomously retrieve relevant architectural decisions on demand and record insights with zero local disk footprint.

5 Tools
Standard MCP Primitives
CRUD & Semantic Search
2 Modes
Transport Flexibility
Stdio & Remote HTTP/SSE
70.5%
LoCoMo Recall
Graph Retrieval Benchmark

The Problem: Fragmentation in AI Agent Memory

As developer AI tooling rapidly proliferated through 2025 and 2026, software engineers faced extreme fragmentation:

  • Cursor implemented its own internal codebase vector embeddings and local .cursorrules.
  • Claude Code CLI developed a local Markdown store in src/memdir/ capped at 200 lines.
  • VS Code agents (Cline, Roo-Code, Continue) invented independent, incompatible storage formats.

The result was total memory isolation. Knowledge gained while debugging in Cursor was invisible when running Claude Code in the terminal. The Model Context Protocol (MCP) solves this by standardizing the interface between models, tools, and persistent memory stores.

MCP Protocol Architecture
Host Clients → JSON-RPC 2.0 → Memory Server
MCP Host ClientsConsumers
IDE & CLI Ecosystem
├─ Cursor (Composer / Chat)
├─ Claude Desktop & Claude Code
├─ VS Code (Cline / Roo-Code)
└─ Windsurf / Custom Agents
Hosts initiate sessions, declare capability negotiation, and pass tool calls to the protocol transport layer.
Transport LayerJSON-RPC 2.0
Two Core Transports
┌─ Stdio (Local child process)
│  ↳ stdin / stdout pipes
└─ HTTP + SSE (Remote bridge)
   ↳ POST /mcp & SSE events
Standardized message framing guarantees language and machine agnosticism with zero serialization friction.
Memory ServerVault & Graph
Universal State Engine
┌─ Tool Discovery (tools/list)
├─ Semantic Search (On-Demand)
├─ Entity Extraction Graph
└─ Cross-Tool Sync Engine
Executes queries against hierarchical entity graph; delivers scoped architectural context across every client.

The Model Context Protocol Specification: Architecture & Lifecycle

Announced by Anthropic in late 2024, the Model Context Protocol (MCP) establishes an open standard for connecting AI models to external data sources, developer tools, and operational environments. Rather than requiring developers to write brittle, bespoke integrations for each IDE, MCP operates identically to the Language Server Protocol (LSP): write one MCP server, and it works natively across Cursor, Claude, VS Code, and Windsurf.

Protocol Lifecycle: Handshake, Negotiation & Teardown

Every MCP connection progresses through three formal phases defined in the JSON-RPC 2.0 specification:

  1. Initialization & Handshake: The client sends an initialize request indicating its protocol version and supported capabilities (e.g. roots, sampling, notifications). The server responds with its own capabilities (tools, resources, prompts) and server identification metadata.
  2. Initialized Notification: Once the client validates the server's protocol response, it issues an notifications/initialized message. The session is now officially established.
  3. Active Operation & Tool Invocations: The client sends tools/list to discover available tools and parameter JSON schemas. When the LLM decides to execute an action, the client transmits tools/call with structured arguments and waits for the JSON-RPC response.
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocolVersion": "2024-11-05",
    "capabilities": {
      "roots": { "listChanged": true },
      "sampling": {}
    },
    "clientInfo": {
      "name": "Cursor-Composer",
      "version": "0.45.0"
    }
  }
}
MCP Session Lifecycle & Tool Execution
Handshake → Discovery → Query
1
Protocol Handshake & Capability ExchangeJSON-RPC 2.0

Client sends initialize with supported features. Server verifies protocol compliance (2024-11-05) and returns tool capabilities. Client responds with notifications/initialized.

↓
2
Dynamic Schema Discovery (tools/list)Zero Hardcoding

Client requests available tools. Server exposes JSON Schemas for search_memwyre, save_memory, and management endpoints so the LLM knows exact argument types.

↓
3
Autonomous Execution (tools/call → Result)Rapid Delivery

The model issues a tool call. The server executes vector retrieval and entity graph re-ranking, returning synthesized context back into the agent's active prompt.

Transport Architecture: Stdio vs Remote HTTP/SSE

The Model Context Protocol decouples application logic from message transportation. Two primary transport protocols are defined in the specification:

DimensionStdio TransportHTTP + SSE Transport
Process ModelSpawns local sub-process (child process of IDE).Connects to remote persistent cloud MCP server via HTTPS.
Communication ChannelStandard input (stdin) & standard output (stdout).HTTP POST for requests; Server-Sent Events (SSE) for streams.
AuthenticationOS-level environment variables (env block).HTTP headers (Authorization: Bearer <token>).
Multi-Machine SyncLocked to host filesystem; requires manual disk sync.Instantaneous across all workstations, laptops, and CI/CD runners.
Best Used ForAir-gapped VPCs, local git inspection, and offline tooling.Centralized engineering knowledge graphs, team memory vaults.

1. Local Stdio Transport Architecture

In Stdio mode, the client IDE launches the server executable directly. The client writes newline-delimited JSON-RPC messages to the process's stdin and reads responses from stdout. Any logging messages must strictly output to stderr to avoid corrupting protocol framing.

2. Remote HTTP with Server-Sent Events (SSE)

Remote transport decouples agent execution from server hosting. Using lightweight bridging utilities like mcp-remote, clients establish an outbound SSE connection to receive streaming notifications and send RPC commands over secure HTTP POST endpoints:

npx -y mcp-remote https://server.memwyre.tech/mcp --header "Authorization:Bearer YOUR_MEMWYRE_API_KEY"

Technical Tool Specification: JSON-RPC Schema Reference

The Memwyre MCP Server exposes five declarative tool primitives adhering strictly to the JSON Schema Draft 7 specification. Below are the exact parameter definitions and response payloads:

Queries the knowledge graph for relevant architectural facts, database schemas, and conventions. Returns top-k entities ranked by vector similarity and temporal decay:

{
  "name": "search_memwyre",
  "description": "Searches the persistent memory vault for architectural decisions, schemas, and coding conventions.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "query": {
        "type": "string",
        "description": "Natural language question or technical concept to retrieve (e.g. 'auth token rotation', 'Drizzle schema conventions')."
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of memory items to return (default: 5, max: 20).",
        "default": 5
      }
    },
    "required": ["query"]
  }
}

save_memory (Dynamic Knowledge Persistence)

Persists an architectural constraint, convention, or debugging insight. Memwyre automatically extracts named entities and updates relational links:

{
  "name": "save_memory",
  "description": "Persists an architectural rule, decision, or debugging breakthrough to long-term memory.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "content": {
        "type": "string",
        "description": "The synthesized rule or fact to record. Must be concise and self-contained."
      },
      "tags": {
        "type": "array",
        "items": { "type": "string" },
        "description": "Categorical tags for filtering (e.g. ['database', 'security', 'auth'])."
      }
    },
    "required": ["content"]
  }
}

MCP Security, Sandboxing & Governance

Because MCP grants language models the ability to execute tools on behalf of users, security governance is paramount. Connecting an unverified or poorly configured MCP server introduces serious attack vectors:

  • Prompt Injection via Stored Memory: If an agent scrapes untrusted web content and stores it via save_memory, malicious prompt injections could alter subsequent agent behavior. Memwyre mitigates this by passing candidate memories through an extraction sandbox that strips active instructions and isolates factual assertions.
  • Zero Source Code Transmission: Memwyre never scans or uploads full repository trees. Only synthesized architectural rules explicitly queried or committed by the developer or agent cross the wire.
  • Scoped Access Tokens: When using remote HTTP/SSE transport, tokens can be restricted by IP range, read-only permissions, or repository project boundaries.
MCP Protocol Token Efficiency
Context Budget per Agent Session
Unmanaged Tool Stacks
~35 Tools Loaded
Loading dozens of heavy MCP schemas
Schema Overhead: ~14,000 tokens/turn
Agent Confusion: High
Degraded Reasoning
Bloating system prompts with massive schema registries causes LLM tool selection errors.
Local SQLite / Chroma MCP
~6,500 Tokens
Flat vector retrieval dumps
Latency: 800ms – 2,200ms
Team Sync: None (Local Disk)
High Noise Ratio
Lacks temporal decay and cross-encoder re-ranking; injects stale debug notes into prompts.
Memwyre MCP ServerLow Overhead
<1,200 Tokens
Minimal 5-tool schema + Graph
Schema Token Cost: <650 tokens
Token Reduction: -81%
Universal Cross-Tool Sync
Lightweight schema footprint preserves context window capacity for actual developer code.

Client Configuration Snippets

Because Memwyre conforms strictly to the Model Context Protocol, connecting your preferred AI coding environment requires just a simple JSON block:

1. Claude Desktop Configuration (claude_desktop_config.json)

Open ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows) and add:

{
  "mcpServers": {
    "memwyre": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://server.memwyre.tech/mcp",
        "--header",
        "Authorization:Bearer YOUR_MEMWYRE_API_KEY"
      ]
    }
  }
}

2. Cursor AI IDE MCP Setup

Navigate to Cursor Settings → Features → MCP → Add New MCP Server. Choose Type: command and input:

npx -y mcp-remote https://server.memwyre.tech/mcp --header "Authorization:Bearer YOUR_MEMWYRE_API_KEY"

3. Windsurf & Roo-Code Integration

In Windsurf's mcp_config.json or Roo-Code's MCP settings panel, paste the exact same command configuration. Both agents will immediately gain the ability to search your architectural memory vault.

Frequently Asked Questions

What is the Model Context Protocol (MCP)?
MCP is an open standard created by Anthropic that allows AI models and IDE clients to securely discover and invoke tools, read context resources, and access external databases via standardized JSON-RPC protocols.
What is the difference between Stdio transport and HTTP/SSE transport in MCP?
Stdio transport spawns a local child process communicating via stdin/stdout pipes, which is fast and secure for local offline tooling but locked to a single workstation. Remote HTTP/SSE transport communicates over persistent HTTPS streams, enabling multi-machine context synchronization across work laptops, desktops, and CI/CD agents.
How does Memwyre prevent prompt injection attacks through MCP memory tools?
Memwyre routes candidate memories through an isolated extraction sandbox before writing them to the knowledge graph. This pipeline strips imperatival instructions, removes adversarial injection prompts, and only persists factual architectural assertions and schemas.
Which IDEs and tools support the Memwyre MCP Memory Server?
Any client implementing MCP can connect to Memwyre, including Cursor AI IDE, Claude Desktop, Claude Code CLI, Windsurf, Roo-Code, Cline, and custom Python/TypeScript agent frameworks.
What is the difference between this page (/mcp-memory) and /mcp?
This page provides the in-depth technical protocol specification, tool schemas, and transport reference for the MCP Memory Server. The /mcp page provides high-level step-by-step installation guides tailored for specific IDE clients.
How do agents authenticate with the MCP server?
Authentication is performed using HTTP Bearer tokens passed in the transport header (Authorization:Bearer YOUR_API_KEY) or via local configuration environment variables.
Can I self-host the Memwyre MCP server on my own infrastructure?
Yes. The Memwyre MCP server is open-source under Apache-2.0 and can be deployed via Docker inside your private VPC or on-prem Kubernetes cluster.
What is the latency of MCP tool calls in Memwyre?
Semantic memory searches execute with low overhead, ensuring that agentic loops and multi-file composer generations are never blocked by context retrieval.
How does Memwyre compare to SQLite or ChromaDB local MCP memory servers?
Local SQLite/Chroma servers cannot synchronize state across multiple developers or across separate machines without fragile SSH mounting. Memwyre provides a centralized cloud vault with multi-factor entity graphs and cross-encoder re-ranking.
Does Memwyre support MCP resource subscriptions?
Yes. Clients can subscribe to memory change events, receiving real-time notifications when another team member or agent updates an architectural convention.

Connect Any MCP Client to Memwyre

Deploy the universal Model Context Protocol memory server and equip Cursor, Claude Code, and VS Code with unified long-term context.

Start Free
Featured on ScrollLaunch Featured on Twelve Tools Featured on AltHunt Featured on LaunchIgniter Fazier badge Memwyre - Featured on Startup Fame Memwyre - Featured on Startup Fame Good AI Tools Acid Tools Listed on Turbo0 NavFolders Featured on aat.ee Featured on TinyHunt Featured on SaasHunt Featured on ShipThing Featured on Smol Hunt Featured on Smol Saas