Askell

io.github.Neschadin由 GitHub 账号 Neschadin 发布v0.5.0更新于 Nov 13, 2026

MCP server for the Askell payment and subscription API (Bun + stdio)

概览

AI 生成的概览

面向 Askell 支付与订阅 API 的本地 MCP 服务器,让助手查找接口、查看客户、合约与账单,并调用 API。

可以做什么
  • 检索并查看内置的 OpenAPI v1/v2 操作,包括参数、请求体结构和错误码
  • 调用只读接口(GET/HEAD),并自动跟进分页列表接口
  • 通过独立的变更工具执行写入操作(POST/PUT/PATCH/DELETE)
  • 查看客户及其订阅与合约、合约账单运行记录,以及账单运行排查
  • 列出已配置的 webhook,其中 HMAC 密钥会被隐去
  • 以资源形式加载 OpenAPI 规范与 webhook 事件文档,并提供内置指引技能
适用场景
当你使用 Askell 处理支付或订阅,希望助手在聊天客户端内查询 API 操作、查看客户、合约和账单数据,或直接发起 API 调用时适用。若同时需要生产与沙箱环境,可配置两个独立条目。
运行要求
通过 bunx(需 Bun 1.4.4 或更高版本)或预编译二进制以 stdio 在本地运行。需要 Askell 账户,并在 ASKELL_PRIVATE_API_KEY 中提供密钥;ASKELL_PUBLIC_API_KEY 可选,仅少数结账与支付方式接口使用。ASKELL_ENV 选择 production(默认)或 sandbox,密钥不能跨主机使用。需要访问 Askell API 的网络。
安装前请注意
密钥可访问真实的支付账户,应放在被 git 忽略的 dotenv 文件中,尽量避免明文写入 JSON,测试时使用沙箱密钥。变更工具会创建、修改或删除数据,默认确认模式依赖客户端自身的批准界面,可考虑改为 elicit。客户门户登录链接和组件令牌会以完整形式返回。

安装

在 SourceWeft 中

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

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

askell-mcp

MCP server for the Askell payment and subscription API.

Connect it to Cursor, Claude Desktop, or any MCP client to discover Askell endpoints, inspect customers/contracts/billing, and call the API. Reads and writes are separate tools so clients can show their own approval UI on mutations.

Requirements

  • An Askell account and secret API key (from the Askell dashboard). The public key is optional — only temporary payment-method and checkout status endpoints use it
  • One of:
    • Bun ≥ 1.4.4 (for bunx), or
    • a prebuilt binary from Releases (no Bun needed)

Quick start

Prefer two server entries if you have both production and sandbox keys. Tool names are the same on both; the client distinguishes them by the server key (askell-prod vs askell-sandbox). Each instance's instructions include the environment it is talking to.

Put keys in gitignored dotenv files, not in JSON. Copy .env.example:

  • .env — production (ASKELL_ENV=production and that dashboard's keys)
  • .env.sandbox — sandbox (ASKELL_ENV=sandbox and that dashboard's keys)

Bun does not auto-load .env.sandbox. --no-env-file stops the sandbox process from also reading a production .env that happens to sit in the cwd.

Cursor

Project file: .cursor/mcp.json. mcp.json.example is this shape. ${workspaceFolder} is the directory that contains that mcp.json (the repo root when the file is .cursor/mcp.json). In ~/.cursor/mcp.json, use an absolute envFile path.

With Bun:

json
{  "mcpServers": {    "askell-prod": {      "command": "bunx",      "args": ["--no-env-file", "x", "askell-mcp"],      "envFile": "${workspaceFolder}/.env"    },    "askell-sandbox": {      "command": "bunx",      "args": ["--no-env-file", "x", "askell-mcp"],      "envFile": "${workspaceFolder}/.env.sandbox"    }  }}

With a binary (download askell-mcp-<os>-<arch> from Releases, then chmod +x). Same envFile; the binary reads the environment Cursor injects:

json
{  "mcpServers": {    "askell-prod": {      "command": "/absolute/path/to/askell-mcp-linux-x64",      "envFile": "${workspaceFolder}/.env"    }  }}

Reload the window after saving.

Claude Desktop

Config file:

  • Linux: ~/.config/Claude/claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

No envFile field. The desktop process cwd is not your repo, so a relative .env path does not resolve. With Bun, pass an absolute --env-file:

json
{  "mcpServers": {    "askell-prod": {      "command": "bunx",      "args": [        "--no-env-file",        "--env-file=/absolute/path/.env",        "x",        "askell-mcp"      ]    },    "askell-sandbox": {      "command": "bunx",      "args": [        "--no-env-file",        "--env-file=/absolute/path/.env.sandbox",        "x",        "askell-mcp"      ]    }  }}

A binary has no --env-file. Put the keys in env (plaintext in that JSON file):

json
{  "mcpServers": {    "askell-prod": {      "command": "/absolute/path/to/askell-mcp-linux-x64",      "env": {        "ASKELL_ENV": "production",        "ASKELL_PRIVATE_API_KEY": "your_production_secret_api_key",        "ASKELL_PUBLIC_API_KEY": "your_production_public_api_key_optional"      }    }  }}

Quit Claude Desktop completely and reopen it. Saving the file is not enough.

Claude Code

Project .mcp.json expands ${VAR} from the environment of the process that launched claude. It does not load a dotenv file. The Bun --env-file args from the Desktop section work here as well; a relative path is fine when you start claude from the repo. ${ASKELL_PRIVATE_API_KEY} inside env only works when that variable is already exported in that environment. A .env file alone is not read.

Configuration

VariableRequiredDefaultDescription
ASKELL_PRIVATE_API_KEYyes*—Secret API key (or ASKELL_SECRET_API_KEY)
ASKELL_PUBLIC_API_KEYno—Public key for a few checkout/payment endpoints
ASKELL_ENVnoproductionproduction | sandbox — selects the official API host
ASKELL_API_BASE_URLno—Custom/local API base only. Do not set together with ASKELL_ENV unless it matches
ASKELL_RESPONSE_MAX_BYTESno131072Max response size returned to the model
ASKELL_MUTATION_GATEnoautoauto / elicit / off — see below
ASKELL_REQUIRE_MUTATION_APPROVALno—Deprecated alias: true→elicit, false→off

ASKELL_ENV picks a stable host (same v1/v2 surface):

  • production — https://askell.is/api
  • sandbox — https://sandbox.askell.is/api (isolated tenant; keys from that dashboard)

Point a second MCP server entry at sandbox (ASKELL_ENV=sandbox) rather than switching env on one process. Keys do not work across hosts. Áskell Test Gateway is a payment acquirer (fake cards) on either host — not the same as the sandbox API. Official prose at docs.askell.is still documents Test Gateway and may omit the sandbox host.

ASKELL_MUTATION_GATE:

  • auto (default) — confirmation form only if this request's _meta envelope declared form elicitation (MCP 2026-07-28). 2025-era clients (Cursor, most hosts) do not send that envelope, so the mutation runs and their own “allow this tool” UI is the gate.
  • elicit — always return an elicitation form. The SDK refuses the call if the client cannot fulfil it (2026 envelope / 2025 initialize via the legacy shim).
  • off — never ask (eval / trusted automation).

If both ASKELL_MUTATION_GATE and ASKELL_REQUIRE_MUTATION_APPROVAL are set, ASKELL_MUTATION_GATE wins.

What you can do

Tools

ToolDescription
askell_list_operationsSearch bundled OpenAPI operations (paths, tags, error codes)
askell_describe_operationParams, body schema, and response/error codes for one operation
askell_callGET/HEAD any v1/v2 endpoint
askell_mutatePOST/PUT/PATCH/DELETE any v1/v2 endpoint
askell_paginate_allFollow paginated list endpoints
askell_customer_overviewv1 customer + subscriptions (+ optional v2 contracts)
askell_contract_overviewv2 subscription contract + billing runs
askell_billing_run_triagev2 billing run (+ optional contract)
askell_list_webhooksList configured webhooks (hmac_secret redacted)

hmac_secret is the only field redacted in tool output. Customer-portal sign-in URLs and widget tokens (POST /v2/customer-portal-entries/, POST /v2/customer-portal-sessions/) are returned in full so the browser can use them. Do not put the widget token in a URL.

Resources

URIContent
askell://spec/v1OpenAPI v1
askell://spec/v2OpenAPI v2
askell://docs/webhook-eventsWebhook event reference

Skills (SEP-2640)

Clients supporting MCP Skills (skills/list, skills/get) can load bundled guidance on demand:

SkillPurpose
askell-docsLive Askell docs workflow and integration traps (claims, coupons, checkouts, webhooks)
askell-mcpTool selection, discovery, read/mutate split, and prod vs sandbox safety

Docs: docs.askell.is · OpenAPI: v1 · v2

License

MIT

Contributing

See CONTRIBUTING.md for local development, tests, and releases.

来源:README.md,提交 dffe611

工具

0
SourceWeft 曾在隔离沙箱中以无凭据方式启动该软件包一次,以列出其工具,但未能完成:服务器未能启动。

版本历史

11
  1. v0.5.0最新Nov 13, 2026
  2. v0.4.27Nov 3, 2026
  3. v0.4.26Oct 29, 2026
  4. v0.4.25Oct 26, 2026
  5. v0.4.24Oct 16, 2026
  6. v0.4.23Oct 9, 2026
  7. v0.4.21Oct 5, 2026
  8. v0.4.20Oct 2, 2026
  9. v0.4.19Oct 1, 2026
  10. v0.4.18Sep 30, 2026
  11. v0.4.17Sep 25, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

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

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