Agent Skillskrakenfx/kraken-cli › kraken-mcp-integration

kraken-mcp-integration

GitHub

将 MCP 客户端连接至 kraken-cli,通过 stdio 实现结构化工具调用。支持多种 AI 客户端配置、服务过滤及凭证管理,统一 CLI 与 MCP 的错误处理逻辑。

skills/kraken-mcp-integration/SKILL.md krakenfx/kraken-cli

Trigger Scenarios

需要让 AI 客户端调用 Kraken 交易或数据工具 配置 MCP 服务器以集成第三方 AI 助手

Install

npx skills add krakenfx/kraken-cli --skill kraken-mcp-integration -g -y
More Options

Use without installing

npx skills use krakenfx/kraken-cli@kraken-mcp-integration

指定 Agent (Claude Code)

npx skills add krakenfx/kraken-cli --skill kraken-mcp-integration -a claude-code -g -y

安装 repo 全部 skill

npx skills add krakenfx/kraken-cli --all -g -y

预览 repo 内 skill

npx skills add krakenfx/kraken-cli --list

SKILL.md

Frontmatter
{
    "name": "kraken-mcp-integration",
    "version": "1.0.0",
    "metadata": {
        "openclaw": {
            "category": "finance"
        },
        "requires": {
            "bins": [
                "kraken"
            ]
        }
    },
    "description": "Connect MCP clients to kraken-cli for native tool calling without subprocess wrappers."
}

kraken-mcp-integration

Use this skill to connect any MCP-compatible client to kraken-cli for structured tool calling over stdio.

MCP tool calls execute through the same command path as CLI commands, so error handling and rate-limit behavior is identical between MCP and CLI.

Supported Clients

Claude Desktop, ChatGPT, Codex, Gemini CLI, Cursor, VS Code, Windsurf, and any client that supports the MCP mcpServers configuration block.

Setup

1. Configure your MCP client

Add this to your MCP client configuration (Claude Desktop: claude_desktop_config.json, Cursor: .cursor/mcp.json, etc.):

{
  "mcpServers": {
    "kraken": {
      "command": "kraken",
      "args": ["mcp", "-s", "market,paper,feedback"]
    }
  }
}

-s market,paper,feedback is the default service list: public market data, paper trading, and the local feedback tool. No real funds can be touched until you opt in explicitly by expanding the service list. See Enabling live trading below.

Credential resolution follows the standard CLI precedence: command-line flags, then KRAKEN_API_KEY / KRAKEN_API_SECRET in the MCP server's env block, then a secure local config file managed by the CLI (written by kraken auth set and kraken setup, stored with user-only permissions in your OS's standard config directory). The MCP server and the standalone CLI share the same config file, so a single kraken auth set serves both.

2. Set credentials (only needed for live trading)

If you stay on market,paper,feedback, skip this step — paper trading needs no keys.

For live trading, the MCP server reads credentials from environment variables:

export KRAKEN_API_KEY="your-key"
export KRAKEN_API_SECRET="your-secret"

3. Restart your MCP client

The client discovers tools on startup.

Service Filtering

Control which command groups the MCP server exposes:

kraken mcp -s market                    # public data only (safe, no auth)
kraken mcp -s market,paper,feedback              # market data + paper trading (marketplace default)
kraken mcp -s market,trade,paper        # add live trading
kraken mcp -s market,account,trade      # add account queries and live trading
kraken mcp -s all                       # everything (many tools, includes funding/earn/subaccount)

Keep the service list to what you need. MCP clients typically handle 50-100 tools well.

Service Auth Tools Risk
market No ~10 None
account Yes ~18 Read-only
trade Yes ~9 Orders (dangerous)
funding Yes ~10 Withdrawals (dangerous)
earn Yes ~6 Staking (dangerous)
subaccount Yes ~2 Transfers (dangerous)
futures Mixed ~39 Orders (dangerous)
paper No ~10 None (simulation)
auth No ~3 Read-only (auth set/auth reset excluded)

Enabling live trading

Every kraken-cli marketplace listing ships with -s market,paper,feedback by default, so a fresh install can never place a real order. To opt in to live trading, edit the MCP server args in your client's config and widen the service list:

{
  "mcpServers": {
    "kraken": {
      "command": "kraken",
      "args": ["mcp", "-s", "market,trade,paper"],
      "env": {
        "KRAKEN_API_KEY": "your-key",
        "KRAKEN_API_SECRET": "your-secret"
      }
    }
  }
}

Recommended upgrade path:

  1. Start with market,paper,feedback (the default).
  2. Add trade once you are comfortable and have an API key scoped to orders only. See the "Recommended key scope" section of skills/kraken-setup/SKILL.md before generating a key.
  3. Add account if you want the agent to read balances and positions.
  4. Only enable funding, earn, subaccount, or all if you specifically need those workflows. Each of these unlocks tools that can move funds off the exchange or alter account structure.

Switching to -s all expands the set of tools the agent can reach by prompt-injection or mistake. Prefer a narrow list and widen it deliberately.

Safety

Dangerous tools include [DANGEROUS: requires human confirmation] in their description and carry the MCP destructive_hint annotation. In guarded mode (default), calls must include acknowledged=true. In autonomous mode (--allow-dangerous), the per-call confirmation is disabled. MCP clients that respect annotations may still prompt at the client layer.

For fully autonomous operation, see skills/kraken-autonomy-levels/SKILL.md.

Gemini CLI Extension

If using Gemini CLI, install the extension directly:

gemini extensions install https://github.com/krakenfx/kraken-cli

The gemini-extension.json includes mcpServers config, so the MCP server starts automatically.

Troubleshooting

"No tools found": Check that kraken is on your PATH and the service list is valid. Run kraken mcp -s market manually to verify it starts.

Auth errors on tool calls: Set KRAKEN_API_KEY and KRAKEN_API_SECRET in the environment where your MCP client runs.

Too many tools: Reduce the service list. kraken mcp -s market,trade is a good starting point.

Streaming commands not available: WebSocket streaming commands are excluded from MCP v1. Use kraken ws ... directly from the terminal for streaming.

If you hit a mismatch between what you are trying to do and the CLI's interface or responses — including a mismatch between this skill and the installed CLI version's contract — feel free to submit feedback with kraken feedback.

Version History

  • aa56e59 Current 2026-08-20 04:44

    默认服务列表增加 feedback 模块;文档补充 Workspaces 和 autoresearch lab 等新增功能说明。

  • aa32814 2026-07-25 10:28

Same Skill Collection

skills/kraken-alert-patterns/SKILL.md
skills/kraken-autonomy-levels/SKILL.md
skills/kraken-basis-trading/SKILL.md
skills/kraken-dca-strategy/SKILL.md
skills/kraken-earn-staking/SKILL.md
skills/kraken-error-recovery/SKILL.md
skills/kraken-fee-optimization/SKILL.md
skills/kraken-funding-carry/SKILL.md
skills/kraken-funding-ops/SKILL.md
skills/kraken-futures-risk/SKILL.md
skills/kraken-grid-trading/SKILL.md
skills/kraken-lab-experiment/SKILL.md
skills/kraken-liquidation-guard/SKILL.md
skills/kraken-market-intel/SKILL.md
skills/kraken-multi-pair/SKILL.md
skills/kraken-order-types/SKILL.md
skills/kraken-paper-strategy/SKILL.md
skills/kraken-paper-to-live/SKILL.md
skills/kraken-playground/SKILL.md
skills/kraken-portfolio-intel/SKILL.md
skills/kraken-rate-limits/SKILL.md
skills/kraken-rebalancing/SKILL.md
skills/kraken-risk-operations/SKILL.md
skills/kraken-setup/SKILL.md
skills/kraken-spot-execution/SKILL.md
skills/kraken-stop-take-profit/SKILL.md
skills/kraken-subaccount-ops/SKILL.md
skills/kraken-tax-export/SKILL.md
skills/kraken-twap-execution/SKILL.md
skills/kraken-ws-streaming/SKILL.md
skills/recipe-basis-trade-entry/SKILL.md
skills/recipe-daily-pnl-report/SKILL.md
skills/recipe-drawdown-circuit-breaker/SKILL.md
skills/recipe-earn-yield-compare/SKILL.md
skills/recipe-emergency-flatten/SKILL.md
skills/recipe-fee-tier-progress/SKILL.md
skills/recipe-funding-rate-scan/SKILL.md
skills/recipe-futures-hedge-spot/SKILL.md
skills/recipe-launch-grid-bot/SKILL.md
skills/recipe-morning-market-brief/SKILL.md
skills/recipe-multi-pair-breakout-watch/SKILL.md
skills/recipe-paper-strategy-backtest/SKILL.md
skills/recipe-playground-dca-triggered/SKILL.md
skills/recipe-playground-dca/SKILL.md
skills/recipe-playground-price-alert/SKILL.md
skills/recipe-playground-rebalance/SKILL.md
skills/recipe-playground-webhook/SKILL.md
skills/recipe-portfolio-snapshot-csv/SKILL.md
skills/recipe-price-level-alerts/SKILL.md

Metadata

Files
0
Version
aa56e59
Hash
91206dad
Indexed
2026-07-25 10:28

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 10:25
浙ICP备14020137号-1 $Гость$