MCP Server
Engram ships @engram-sdk/mcp, exposing SDK capabilities as MCP tools for IDEs and clients.
Run the Server
bash
OPERATOR_PRIVATE_KEY=0x... ENGRAM_NETWORK=calibration npx @engram-sdk/mcpDefault endpoint:
text
http://localhost:3456/mcpRuntime Model
The server runs over HTTP with:
- MCP endpoint at
/mcp - health endpoint at
/health - stateless request handling per HTTP request
Cursor Configuration
Create .cursor/mcp.json in your project:
json
{
"mcpServers": {
"engram": {
"url": "http://localhost:3456/mcp"
}
}
}Claude Desktop Configuration
Add to claude_desktop_config.json:
json
{
"mcpServers": {
"engram": {
"url": "http://localhost:3456/mcp"
}
}
}Tool Catalog
engram_store
Input:
data(required)context.priority(critical|standard|temporary|ephemeral)context.encryptcontext.ttlDayscontext.replication
Output includes cid, dealId, ttlTimestamp, spendUSDFC, policy, optional attestationTx.
engram_retrieve
Input:
cid(required)
Output is stored payload (stringified JSON when needed).
engram_renew
Input:
cid(required)force(optional)
Output is RenewResult.
engram_prune
Input:
cid(required)
Output is PruneResult.
engram_delegate
Input:
cid(required)recipientDID(required)ttlHours(optional, default 24)
Output includes tokenCid and token.
engram_verify_delegation
Input:
tokenCid(required)callerDID(required)
Output includes verification result and token envelope fields.
engram_status
Input: none
Output includes:
- identity info (
agentId,pkpAddress,network) when available - spend/cap values
- active CID list and count
- storage provider and attestation mode
- SDK version
Required and Optional Environment Variables
Required:
OPERATOR_PRIVATE_KEY
Optional:
VINCENT_SECRET_API_KEYENGRAM_NETWORKENGRAM_MCP_PORTENGRAM_ATTEST_ON_CHAINENGRAM_BUDGET_MAX_USDFCENGRAM_RENEW_THRESHOLD_DAYSENGRAM_BUDGET_SAFETY_MARGIN_PCTENGRAM_LOG_PATHBASE_RPC_URLFILECOIN_RPC_URLERC8004_IDENTITY_REGISTRYERC8004_REPUTATION_REGISTRY
Health Check
bash
curl http://localhost:3456/healthUse this in deployment probes before allowing MCP clients to connect.
Raw MCP Tool Call Example
For debugging client integrations, this is the payload shape for a direct tools/call to engram_store:
json
{
"method": "tools/call",
"params": {
"name": "engram_store",
"arguments": {
"data": { "context": "agent working state" },
"context": { "priority": "standard" }
}
}
}