@contextcapsule/mcp-server
v0.1.2
Published
MCP server for Context Capsule — portable execution context for AI agent workflows
Downloads
335
Maintainers
Readme
@contextcapsule/mcp-server
MCP server for Context Capsule — portable execution context for AI agent workflows. Create and fetch structured context capsules that carry decisions, next steps, and working memory between agents and sessions.
Tools
create_capsule
Create a context capsule to hand off execution context between agents or sessions.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| summary | string | Yes | What happened — max 500 chars |
| decisions | string[] | No | Key decisions made (max 20 items) |
| next_steps | string[] | No | What should happen next (max 20 items) |
| payload | object | No | Structured JSON data (max 32KB) |
| refs | object | No | Workflow references (workflow_id, agent_id, etc.) |
| expires_in | number | No | TTL in seconds (60–604800, default 7 days) |
| idempotency_key | string | No | Prevents duplicate capsules on retry |
| audience | "human" | No | Enrich view page with social cards |
Requires: CONTEXTCAPSULE_API_KEY environment variable.
fetch_capsule
Fetch a capsule to resume work from where another agent left off.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| capsule_id | string | Yes | The capsule ID (starts with cap_) |
No API key required.
signup
Get a free API key (500 capsules/month).
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| email | string | Yes | Your email address |
No API key required.
Usage Example
You: "Create a capsule summarizing the database migration we just finished"
Agent calls create_capsule:
summary: "Migrated user table — split into users + profiles with dual-write"
decisions: ["Used addColumn for backward compat", "2-week transition period"]
next_steps: ["Run integration tests", "Update API serializers"]
refs: { workflow_id: "migration-456", agent_id: "schema-agent" }
→ Returns capsule_id and capsule_url
You: "Fetch capsule cap_abc123 and continue the migration work"
Agent calls fetch_capsule:
capsule_id: "cap_abc123"
→ Returns full context: summary, decisions, next_steps, payload, refs
→ Agent picks up exactly where the previous session left offSetup
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"contextcapsule": {
"command": "npx",
"args": ["-y", "@contextcapsule/mcp-server"],
"env": {
"CONTEXTCAPSULE_API_KEY": "ak_your_key_here"
}
}
}
}Cursor / Windsurf
Add to MCP settings:
{
"mcpServers": {
"contextcapsule": {
"command": "npx",
"args": ["-y", "@contextcapsule/mcp-server"],
"env": {
"CONTEXTCAPSULE_API_KEY": "ak_your_key_here"
}
}
}
}Claude Code
claude mcp add contextcapsule -- npx -y @contextcapsule/mcp-serverThen set your API key in your environment or .env file.
Configuration
| Variable | Required | Description |
|----------|----------|-------------|
| CONTEXTCAPSULE_API_KEY | For creating capsules | Your API key (starts with ak_) |
| CONTEXTCAPSULE_BASE_URL | No | API base URL (default: https://www.contextcapsule.ai) |
Get an API Key
Use the signup tool from any MCP client, or:
curl -X POST https://www.contextcapsule.ai/v1/auth/signup \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]", "source": "api"}'