FirstKey

io.github.FirstKeyHQ由 GitHub 账号 FirstKeyHQ 发布v0.1.0更新于 Oct 24, 2026

FirstKey MCP: agent wallets, free cycles faucet, and one-command site deploys on ICP.

已验证Streamable HTTP可网页运行云端与基础设施金融

概览

AI 生成的概览

运行在 Internet Computer 上的远程 MCP 服务器,让助手创建代理钱包、领取免费 cycles、部署静态站点并查询兑换报价。

可以做什么
  • 创建 Ed25519 钱包,返回 principal 和仅出现一次的私钥
  • 领取一次性免费 cycles 补助,并查询某个 principal 的 cycles 余额
  • 部署静态站点 canister、分块上传大文件,并返回站点访问地址
  • 获取用于给代理充值的 Fuel 卡片支付链接
  • 查询只读的 ICPSwap 兑换报价(按代币或账本 principal)
适用场景
适合需要让代理在 Internet Computer 上拥有自己的链上身份和托管能力、又不想自建基础设施的场景:创建钱包、获取启动 cycles、发布小型静态站点,或在操作前查看兑换价格。
运行要求
使用 mcp.firstkey.io 的远程 Streamable HTTP 端点;未声明任何软件包、API 密钥或环境变量。客户端需通过 HTTP 使用 JSON-RPC 2.0 并接受纯 JSON 响应;服务器无状态,CORS 开放。
安装前请注意
create_wallet 会返回一次 PKCS#8 私钥且不保存,拿到该响应的人即控制该钱包。部署和 faucet 补助对每个代理 principal 仅限一次免费使用,后续部署需通过 Fuel 链接付费。部署类工具会创建 canister 并上传文件,写入链上状态并消耗 cycles。

安装

在 SourceWeft 中

  1. 打开 控制台中的 FirstKey,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.FirstKeyHQ%2Ffirstkey-mcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "firstkey": {
      "type": "http",
      "url": "https://mcp.firstkey.io/mcp"
    }
  }
}

README

FirstKey MCP Server

An MCP (Model Context Protocol) server running as a canister on the Internet Computer. One integration point that every MCP-compatible agent framework consumes natively: LangChain/LangGraph, CrewAI, AutoGen, Vercel AI SDK, OpenAI Agents SDK, Google ADK, Claude Desktop, Cursor, and more.

Endpoint: POST https://mcp.firstkey.io/mcp (JSON-RPC 2.0, Streamable HTTP)

Plain JSON responses, stateless (no session ids). CORS enabled (*).

Tools

ToolWhat it does
create_walletGenerates a fresh Ed25519 wallet (principal + PKCS#8 PEM private key). The key is returned once and never stored.
claim_faucet_grantClaims the one-time free 1T cycles grant from the FirstKey faucet for an agent principal.
deploy_siteCreates a site canister, installs the static host, uploads files, returns the live https://<canister>.icp.net URL. The agent becomes a controller of its own site. One free deploy per agent.
deploy_upload_chunkChunked upload of large files to an already-deployed agent site.
check_cyclesReads a principal's cycles balance on the cycles ledger.
get_fuel_linkReturns the FirstKey Fuel card-payment link to refuel an agent (https://firstkey.io/fuel?for=<principal>).
get_swap_quoteLive read-only ICPSwap quote (on-chain factory→pool): pay token/amount → receive amount + implied price. Symbols or ledger principals; no tokens move.

Quick test

bash
URL=https://mcp.firstkey.io/mcp# initializecurl -s $URL -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' \  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"0"}}}' | head -c 600# list toolscurl -s $URL -H 'Content-Type: application/json' \  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | python3 -c "import json,sys; [print(t['name']) for t in json.load(sys.stdin)['result']['tools']]"# create a walletcurl -s $URL -H 'Content-Type: application/json' \  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"create_wallet","arguments":{}}}'

Architecture

  • http_request (query): serves initialize, tools/list, ping, CORS preflight, /.well-known/ic-domains, and a landing page.
  • tools/call upgrades to http_request_update (update context) because it makes inter-canister calls: raw_rand (wallet), the faucet's claim_for (grants), the cycles ledger (balances), and the management canister (create_canister_with_extra_cycles / install_code / update_settings for deploys).
  • The static-site host WASM (firstkey-static-host) is embedded via include_bytes! and installed into every deployed site canister.
  • Deploy pool: the canister's own cycles balance. One free deploy per agent principal (tracked in stable memory); when the pool can't cover a deploy the tool returns the Fuel link instead.

Build & deploy

bash
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH"cd ~/workspace/firstkey-static-host && cargo build --target wasm32-unknown-unknown --releasecd ~/workspace/firstkey-mcp && cargo build --target wasm32-unknown-unknown --release
# create (needs ~5.5T cycles on the strider identity's cycles ledger)icp canister create -n ic --detached --cycles "5.5t" \  --controller fhvid-ondyx-ziq2v-udsry-cfgki-okcur-gcryu-2wwai-b63ku-ptgkk-yqe \  --controller o5joj-543gr-ibdnq-q6f26-sbevy-iorvz-lqo2i-ocyr7-crp2u-sggj7-cae \  --identity strider -q# installicp canister install <CANISTER> \  --wasm ~/workspace/firstkey-mcp/target/wasm32-unknown-unknown/release/firstkey_mcp.wasm \  -n ic --identity ops -y# authorize on the fauceticp canister call --network ic 3l667-lyaaa-aaaam-ajkqa-cai set_mcp_canister \  --candid ~/workspace/firstkey-faucet/faucet.did --identity ops \  '(principal "<MCP_CANISTER>")'

Custom domain (mcp.firstkey.io)

DNS records needed at Porkbun (see DNS.md):

  1. CNAME mcp.firstkey.io → mcp.firstkey.io.icp1.io
  2. TXT _canister-id.mcp.firstkey.io → <canister-id>
  3. CNAME _acme-challenge.mcp.firstkey.io → _acme-challenge.mcp.firstkey.io.icp2.io

Then validate + register:

bash
curl 'https://icp.net/custom-domains/v1/mcp.firstkey.io/validate'curl -X POST 'https://icp.net/custom-domains/v1/mcp.firstkey.io'curl 'https://icp.net/custom-domains/v1/mcp.firstkey.io'  # poll until "registered"

The canister already serves /.well-known/ic-domains.

Registry publishing

  • Official MCP registry (registry.modelcontextprotocol.io): see registry/server.json (draft). Publish via GitHub OIDC from the repo's CI.
  • Smithery (smithery.ai/new): submit the public HTTPS URL once mcp.firstkey.io is live.

Faucet counterpart

claim_for(agent) lives on the faucet canister (3l667-lyaaa-aaaam-ajkqa-cai, source ~/workspace/firstkey-faucet/). It enforces the once-per-principal rule against the agent principal and performs the standard 1T ledger grant. Only the principal set via set_mcp_canister (controller-only) may call it.

来源:README.md,提交 90944a4

工具

0
SourceWeft 尚未读取此服务器的工具。

版本历史

1
  1. v0.1.0最新Sep 24, 2026

评分

已满足适用检查项的 75%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。