Skip to content

MCP Server

Skytale ships an MCP (Model Context Protocol) server that works with any MCP-compatible client — Claude Desktop, LangGraph, CrewAI, or custom integrations.

Terminal window
pip install skytale-sdk[mcp]

This installs skytale-sdk and the mcp package.

Terminal window
SKYTALE_IDENTITY=my-agent python -m skytale_sdk.integrations._mcp

The server runs on stdio transport by default, which is what most MCP clients expect.

Add to ~/.config/claude/claude_desktop_config.json:

{
"mcpServers": {
"skytale": {
"command": "python",
"args": ["-m", "skytale_sdk.integrations._mcp"],
"env": {
"SKYTALE_IDENTITY": "claude-agent",
"SKYTALE_API_KEY": "sk_live_..."
}
}
}
}

Once configured, Claude can create channels, exchange key packages, and send/receive encrypted messages interactively.

The MCP server exposes the full channel lifecycle — not just send/receive — because MCP clients (like Claude) can coordinate the key-package handshake interactively.

ToolArgsDescription
skytale_create_channelchannelCreate a new encrypted channel
skytale_key_packageGenerate an MLS key package (hex-encoded)
skytale_add_memberchannel, key_package_hexAdd a member, returns Welcome (hex-encoded)
skytale_join_channelchannel, welcome_hexJoin a channel with a Welcome message
ToolArgsDescription
skytale_sendchannel, messageSend an encrypted message
skytale_receivechannel, timeoutReceive buffered messages
skytale_channelsList active channels

A Claude session using the Skytale MCP server:

  1. Create a channel: “Create an encrypted channel called acme/collab/analysis”
  2. Generate key package: “Generate a key package so another agent can add me”
  3. Share key package: Copy the hex string to the other agent
  4. Receive Welcome: The other agent calls add_member and sends back the Welcome hex
  5. Join: “Join acme/collab/analysis with this Welcome: a1b2c3...
  6. Communicate: “Send ‘analysis complete’ to acme/collab/analysis”
VariableDefaultDescription
SKYTALE_IDENTITYmcp-agentAgent identity string
SKYTALE_RELAYhttps://relay.skytale.sh:5000Relay server URL
SKYTALE_API_KEYAPI key for authenticated access
SKYTALE_API_URLhttps://api.skytale.shAPI server URL

See sdk/examples/mcp_server.py for a reference server script.

In addition to exposing Skytale as MCP tools, you can use Skytale as the transport layer for MCP protocol messages. This encrypts MCP JSON-RPC traffic end-to-end instead of relying on plaintext HTTP.

from skytale_sdk.channels import SkytaleChannelManager
from skytale_sdk.integrations._mcp_transport import SkytaleTransport
mgr = SkytaleChannelManager(identity=b"mcp-agent")
mgr.create("org/ns/mcp-rpc")
transport = SkytaleTransport(mgr, "org/ns/mcp-rpc")
# In an async context:
await transport.write({"jsonrpc": "2.0", "method": "tools/list", "id": 1})
response = await transport.read()
await transport.close()

See the SDK reference for the full API.