NordBastion 北极熊吉祥物坐在战术任务控制工作站,悬浮的全息终端显示器呈现青色代码,带青色发光键帽的机械键盘和青色 N 形盾牌靠在身旁,置身于裸露 Nordic 石墙的控制室内,窗外极光映照
API.v1 · REST · MCP · API

通过代码运行 NordBastion。
无 KYC,加密货币付款,完全可脚本化。

注册、创建密钥,然后测试访问。无需充值。

快速入门

付款前即可创建 API 密钥。

注册、创建密钥,然后测试访问。无需充值。

cURL

使用注册或登录时获得的访问令牌创建具有指定权限的 API 密钥。密钥仅以明文返回一次。

# bash + curl + jq
# Set NB_EMAIL and NB_PASSWORD in your environment.
set -eu
: "${NB_EMAIL:?Set NB_EMAIL}" "${NB_PASSWORD:?Set NB_PASSWORD}"
API=https://nordbastion.com/v1
TOKEN=$(jq -n '{email:env.NB_EMAIL,password:env.NB_PASSWORD}' |
  curl --fail-with-body -sS "$API/auth/register" \
    -H 'Content-Type: application/json' --data-binary @- |
  jq -er '.tokens.access_token')
KEY=$(curl --fail-with-body -sS "$API/auth/api-keys" \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"name":"agent-read","scope":"read"}' |
  jq -er '.plaintext')
curl --fail-with-body -sS "$API/account/balance" \
  -H "Authorization: Bearer $KEY"
# Store KEY in your secret store. Do not print it.
unset TOKEN KEY

Python

付款前即可创建 API 密钥。

import os
import requests

api = "https://nordbastion.com/v1"
with requests.Session() as client:
    signup = client.post(api + "/auth/register", json={
        "email": os.environ["NB_EMAIL"],
        "password": os.environ["NB_PASSWORD"],
    }, timeout=30)
    signup.raise_for_status()
    token = signup.json()["tokens"]["access_token"]
    created = client.post(api + "/auth/api-keys",
        headers={"Authorization": f"Bearer {token}"},
        json={"name": "agent-read", "scope": "read"},
        timeout=30)
    created.raise_for_status()
    key = created.json()["plaintext"]
    # Store key in your secret store; never log it.
    balance = client.get(api + "/account/balance",
        headers={"Authorization": f"Bearer {key}"},
        timeout=30)
    balance.raise_for_status()
    print(balance.json())

API 密钥访问与付款无关。每个账户最多可有 10 个有效密钥;请撤销不再使用的密钥。

兼容性与版本

托管 MCP 端点在此更新。按版本提供的 stdio 下载包含源代码和 SHA-256 校验和。

托管 MCP

https://nordbastion.com/mcp
版本
1.1.0
协议版本
2026-07-28 · 2025-11-25 · 2025-06-18 · 2025-03-26
最近验证
2026-09-15

在 Authorization 请求头中发送凭据;如果 MCP 客户端无法设置请求头,请使用 access_token 参数。

暂不提供浏览器 OAuth 授权。请使用 Bearer 令牌或显式 access_token 参数。

Server metadata · MCP specification

MCP · register_account → create_api_key

{"name":"register_account","arguments":{
  "email":"agent@example.com",
  "password":"YOUR_STRONG_PASSWORD"
}}

{"name":"create_api_key","arguments":{
  "name":"agent-read",
  "scope":"read",
  "access_token":"ACCESS_TOKEN_FROM_SIGNUP"
}}

{"name":"get_balance","arguments":{
  "access_token":"PLAINTEXT_FROM_CREATE_API_KEY"
}}

在本地生成 SSH 密钥。仅上传公钥,将私钥保留在自己的设备上。

ssh-keygen -t ed25519 -f ~/.ssh/nordbastion_agent
# add_ssh_key: public_key = contents of the .pub file

下载 MCP 0.2.0

Python ≥ 3.10 · MCP SDK 2.2.0 · MIT

Wheel · 源代码 · SHA-256 · Changelog

pip install https://nordbastion.com/downloads/nordbastion_mcp-0.2.0-py3-none-any.whl
nordbastion-mcp

端点参考

OpenAPI 3.1 · llms-agents.txt

Python、TypeScript、Go、Rust SDK 及 CLI 尚在规划中。现在可使用 REST 或 MCP。

Method端点权限范围状态
POST/v1/auth/registerpublicLIVE
POST/v1/auth/loginpublicLIVE
POST/v1/auth/login/totppublicLIVE
POST/v1/auth/token/refreshpublicLIVE
POST/v1/auth/recoverpublicPLANNED
GET/v1/auth/sessionsfullLIVE
DELETE/v1/auth/sessions/{token_id}fullLIVE
POST/v1/auth/totp/setupfullLIVE
POST/v1/auth/totp/enablefullLIVE
POST/v1/auth/totp/disablefullLIVE
POST/v1/auth/passwordfullLIVE
POST/v1/auth/api-keysfullLIVE
GET/v1/auth/api-keysreadLIVE
DELETE/v1/auth/api-keys/{key_id}fullLIVE
GET/v1/accountreadLIVE
PATCH/v1/accountfullPLANNED
GET/v1/account/balancereadLIVE
GET/v1/account/usagereadLIVE
GET/v1/account/audit-logreadLIVE
GET/v1/billing/coinspublicLIVE
POST/v1/billing/topupsbillingLIVE
GET/v1/billing/topupsreadLIVE
GET/v1/billing/topups/{order_number}readLIVE
POST/v1/billing/topups/{order_number}/cancelbillingLIVE
GET/v1/billing/bonus-tierspublicLIVE
GET/v1/catalogpublicLIVE
GET/v1/catalog/vpspublicLIVE
GET/v1/catalog/dedicatedpublicLIVE
GET/v1/catalog/bastionspublicLIVE
GET/v1/catalog/imagespublicLIVE
GET/v1/catalog/{code}publicLIVE
POST/v1/serversserversLIVE
GET/v1/serversreadLIVE
GET/v1/servers/{order_number}readLIVE
PATCH/v1/servers/{order_number}serversLIVE
DELETE/v1/servers/{order_number}serversLIVE
POST/v1/ssh-keysserversLIVE
GET/v1/ssh-keysreadLIVE
GET/v1/ssh-keys/{id}readLIVE
DELETE/v1/ssh-keys/{id}serversLIVE
POST/v1/webhooksfullLIVE
GET/v1/webhooksreadLIVE
DELETE/v1/webhooks/{id}fullLIVE
POST/v1/webhooks/{id}/testfullLIVE
GET/v1/transparency/canarypublicLIVE
GET/v1/transparency/peeringpublicLIVE
GET/v1/transparency/statuspublicLIVE
GET/v1/agents/directorypublicLIVE
POST/v1/agents/directoryfullLIVE
POST/v1/oauth/registerpublicLIVE
POST/v1/oauth/tokenpublicLIVE
POST/v1/oauth/revokepublicLIVE
GET/v1/oauth/introspectpublicLIVE

支付方式

充值前先浏览并测试。只有付费服务需要加密货币充值。

POST /v1/billing/topups · {"amount_usd":50,"crypto":"XMR"} · USD 30–10,000

x402 可通过充值端点处理 Base 网络上的 USDC 签名付款。下单前请等待余额确认到账。

x402: POST /v1/billing/topups · X-Payment-Mode: x402 · {"amount_usd":50}

速率限制

API key: 120 / min · 3,000 / hour · public: 30 / min · HTTP 429 + Retry-After

账户活动会记录在 API 审计日志中。凭据和请求正文不会写入该日志。

获取 API 密钥

私密托管,源自北欧。