MCP Server
Skytale ships an MCP (Model Context Protocol) server that works with any MCP-compatible client — Claude Desktop, LangGraph, CrewAI, or custom integrations.
Installation
Section titled “Installation”pip install skytale-sdk[mcp]This installs skytale-sdk and the mcp package.
Running the server
Section titled “Running the server”SKYTALE_IDENTITY=my-agent python -m skytale_sdk.integrations._mcpThe server runs on stdio transport by default, which is what most MCP clients expect.
Claude Desktop configuration
Section titled “Claude Desktop configuration”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.
Tools reference
Section titled “Tools reference”The MCP server exposes the full channel lifecycle — not just send/receive — because MCP clients (like Claude) can coordinate the key-package handshake interactively.
Channel lifecycle
Section titled “Channel lifecycle”| Tool | Args | Description |
|---|---|---|
skytale_create_channel | channel | Create a new encrypted channel |
skytale_key_package | — | Generate an MLS key package (hex-encoded) |
skytale_add_member | channel, key_package_hex | Add a member, returns Welcome (hex-encoded) |
skytale_join_channel | channel, welcome_hex | Join a channel with a Welcome message |
Messaging
Section titled “Messaging”| Tool | Args | Description |
|---|---|---|
skytale_send | channel, message | Send an encrypted message |
skytale_receive | channel, timeout | Receive buffered messages |
skytale_channels | — | List active channels |
Typical workflow
Section titled “Typical workflow”A Claude session using the Skytale MCP server:
- Create a channel: “Create an encrypted channel called acme/collab/analysis”
- Generate key package: “Generate a key package so another agent can add me”
- Share key package: Copy the hex string to the other agent
- Receive Welcome: The other agent calls
add_memberand sends back the Welcome hex - Join: “Join acme/collab/analysis with this Welcome:
a1b2c3...” - Communicate: “Send ‘analysis complete’ to acme/collab/analysis”
Environment variables
Section titled “Environment variables”| Variable | Default | Description |
|---|---|---|
SKYTALE_IDENTITY | mcp-agent | Agent identity string |
SKYTALE_RELAY | https://relay.skytale.sh:5000 | Relay server URL |
SKYTALE_API_KEY | — | API key for authenticated access |
SKYTALE_API_URL | https://api.skytale.sh | API server URL |
Full example
Section titled “Full example”See sdk/examples/mcp_server.py for a reference server script.
MCP Encrypted Transport (v0.3.0)
Section titled “MCP Encrypted Transport (v0.3.0)”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 SkytaleChannelManagerfrom 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.