Skip to main content
Glama
base64-codec

base64-codec

by Br0ski777

Base64 Codec API

MCP Server x402 License: MIT

将文本编码为 base64,或将 base64 解码为文本。支持标准与 URL 安全变体,并附带元数据。通过 x402 按调用付费(USDC on Base L2)——无需 API 密钥、无需注册,也无速率限制。

属于 klymax402 市场的一部分——为 AI 智能体提供 100 个 x402 微支付 API:一个钱包,USDC on Base。

快速入门 -- MCP

将以下内容添加到 MCP 客户端配置中(Claude Desktop、Cursor、ElizaOS 等):

{
  "mcpServers": {
    "base64-codec": {
      "url": "https://base64-codec.api.klymax402.com/mcp"
    }
  }
}

Related MCP server: mcp-x402

快速入门 -- HTTP (x402)

curl -X POST "https://base64-codec.api.klymax402.com/api/encode" \
  -H "Content-Type: application/json" \
  -d '{"data":"..."}'
# -> 402 Payment Required, with an x402 payment challenge in the response body

任何支持 x402 的客户端(@x402/fetch、x402-agent-tools、ATXP)都会自动处理“402 -> 签名 -> 重试”的循环。

工具

工具名称

方法

路径

价格

描述

utility_encode_base64

POST

/api/encode

$0.003

编码或解码 base64 数据

utility_encode_base64

当需要将文本编码为 base64,或将 base64 解码回文本时,请使用此工具。返回结果字符串及编码元数据。

参数

名称

类型

必填

说明

data

string

是

要编码或解码的数据

action

string

否

操作:'encode' 或 'decode'(默认:encode)

示例响应:

{"result":"SGVsbG8gV29ybGQ=","action":"encode","inputLength":11,"outputLength":16,"urlSafe":false}

适用时机:在 JSON 中嵌套二进制数据、准备电子邮件附件(MIME),或解码来自 API base64 令牌时。在通过仅支持 ASCII 的渠道发送数据之前,请使用此工具。

不适用于:哈希(使用 crypto_generate_hash)、JWT 解码(使用 security_decode_jwt)、URL 别名生成(使用 text_generate_slug)。

示例智能体提示词

  • "将文本编码为 base64,或将 base64 解码回纯文本"

支付

  • 协议:x402 -- 原生 HTTP 按调用计费,无需注册,无需 API 密钥

  • 网络:Base L2 (eip155:8453)

  • 资产:USDC

  • 服务商:Coinbase CDP(主要)、PayAI(备用)

  • 也可通过 ATXP 访问(OAuth 包装的 x402,RFC 9728 受保护资源元数据)

属于 klymax402

为 AI 智能体提供 100 个 x402 微支付 API -- 一个钱包,USDC on Base,零注册门槛。

许可证

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Provides AI agents with 10 pay-per-call utility tools (QR generation, DNS lookup, OCR, etc.) using USDC on Base via the x402 protocol, with agent's private key never leaving the agent.
    11
    55 npm
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables per-request paid AI analysis of public URLs, condition verification, and AI consultation via x402 micropayments on Base, with no account or subscription.
    2 npm
    ISC
  • A
    license
    C
    quality
    B
    maintenance
    Keyword Metrics for Google Ads search volume, CPC, advertising competition and monthly history. Optional AI Search Volume provides modeled question-demand signals, not actual ChatGPT or Perplexity query counts. Free discovery and quotes; paid calls require an approved budget and use USDC on Base via x402. Also includes SERP, domain and local-market research.
    78
    83 npm
    MIT