Coming soon
Reason this release was yanked:
dev
Project description
mcp_context_pointer
A plug-in extension for Model Context Protocol (MCP) enabling Cross-App Memory Pointers (ContextPointer block) and seamless use of vaulted memory with LLM agents.
Built by Third Plane.
🚀 What is this?
mcp_context_pointer is an optional plug-in for the MCP Python SDK.
It provides the ContextPointer block—an efficient, privacy-stable, cross-application pointer for referencing conversation history, memory chunks, or arbitrary state, backed by a vault service.
- Save up to 40–60% on LLM context tokens
- Enable compliance (GDPR, Consent Ledger) and auditability
- Point to fast, managed vaults or your own self-hosted instance
Supports:
- Adaptive inlining out-of-the-box (fallbacks when vault or network is slow)
- Signature verification (Ed25519/PASETO or HMAC)
- Works with any MCP-compliant service, agent, or app
🛠️ Installation
pip install mcp-context-pointer
# or as an MCP extra:
pip install "modelcontextprotocol[context-pointer]"
💡 Quick Start
from mcp_context_pointer.block import ContextPointerBlock
from mcp.blocks.registry import get_block
import requests
# Compose a conversation:
history = [
{"role": "user", "text": "Can you summarize our last meeting?"},
{"role": "assistant", "text": "Certainly, here's a short summary..."},
{"role": "user", "text": "What was the action item?"}
]
# Inline last N, pointerize the rest:
from mcp_context_pointer.wrap import wrap_history_with_pointer
new_blocks = wrap_history_with_pointer(
history=history,
n_inline=2,
vault_url="https://vault.thirdplane.io" # managed or self-host
)
# Send new_blocks as your MCP resource.blocks[]
🏛️ ContextPointer Block Spec (v1)
{
"kind": "context_pointer",
"mrl": "ocsv1://vault.thirdplane.io/u/1234/c/77#t0-4",
"sig": "{signature}",
"privacy": "app_private",
"window": {"start": 0, "end": 256},
"maxCost": 512
}
- mrl: Opaque, signed Memory Reference Locator. Supports privacy, region pinning, selectors.
- sig: Signature (Ed25519/PASETO default, HMAC fallback)
- privacy: Recommended:
'app_private'(default: cross-app only if user explicit) - window: Optional byte or token range
- maxCost: LLM context size hint
🔒 Security
- All pointers must be signed and verified on-dereference.
privacyflags default to non-leaky mode; PII should never appear inmrl.- Vault fetch enforces same-site/tenant and access logging.
- Supports Ed25519 signatures by default; accepts legacy HMAC.
🏎️ Performance
- Fetch pointer blocks from edge-cached managed vaults in <35ms (p95, global).
- Fallback: If vault unreachable, package will inline fallback for full compatibility ("never worse" policy).
- Prometheus (or JSON) metrics on all pointer ops.
📝 License
Apache-2.0 — matches MCP ecosystem, allows both independent & up-streaming use, and is enterprise-friendly.
Copyright (c)
📡 Roadmap
- 🚀 Upstream into MCP core once the ContextPointer profile is standardized
- Edge cache + multi-region support for managed vault
- Optional Consent Ledger & Answer-Cache APIs
- Thin wrappers for Node, Go, Rust
🤝 Acknowledgments
Special thanks to the MCP community, spec maintainers, and early design partners. Questions? Open an issue or DM .
⭐ About Third Plane
Third Plane is building the "Cloudflare for AI State"—portable, privacy-stable, edge-cached memory for every AI app.
Legal
This package is independent of, but interoperates with, the core MCP SDK.
No license or support is implied by the Model Context Protocol working group.
Start saving tokens and gaining memory: Read the full docs ➔ or Try managed vault for free ➔
FAQ
Q: Can I use this without a managed vault?
A: Yes—just set vault_url to your own self-hosted endpoint.
Q: How do I upstream to MCP if the spec merges?
A: Final API/class names will be stable; your wrap() just imports from MCP core once standardized.
Q: Does this lock me in?
A: No. It is Apache-2.0, and all data is exportable via MRL.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp-context-pointer-0.0.1.tar.gz.
File metadata
- Download URL: mcp-context-pointer-0.0.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdbd477465ee7da4910725a1149f23d2e8ceea293f94c783f7731495c1fb3051
|
|
| MD5 |
1e0bea14c2de3e707bba3a8b2fe6c6fa
|
|
| BLAKE2b-256 |
dd6f2f7695ff8a365aafc055c8b201135534f8f809387bcee14cdf639c9490aa
|
File details
Details for the file mcp_context_pointer-0.0.1-py3-none-any.whl.
File metadata
- Download URL: mcp_context_pointer-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f937594eb644f489cca89219775dc0b658033e4a47ed7e7919343bdcbdfa98d
|
|
| MD5 |
0834173b36eb11ec3cee6fceed581d5c
|
|
| BLAKE2b-256 |
38d7542f8cde47b939616f1e2ff4f7db4f0f5af2fab5f278fd907c82091afcfd
|