
Mapleai Mcp
io.github.veenrekv0.3.1更新於 Oct 5, 2026
Pay-per-request GPT chat, embeddings, agents and prepaid keys with local x402 USDC signing
概覽
讓助理呼叫按次計費的 GPT 對話、圖像、音訊、嵌入與結構化決策 API,並透過本機 x402 簽章以 USDC 逐次付款。
- 功能
- 這是一個供 MapleAI 閘道使用的本機 stdio MCP 伺服器。它提供免費的模型目錄、免費嵌入與預付金鑰狀態查詢,以及付費的對話、Jev 結構化決策、代理執行與預付金鑰包。付款透過 x402 協定以 EVM 或 Solana 錢包金鑰在本機簽章,購買到的預付金鑰可在伺服器內直接使用,不需錢包。
- 適用情境
- 當助理需要取用 GPT、圖像、音訊或嵌入模型,又不想註冊帳號或訂閱,且可接受按次以 USDC 付款時,適合使用。也適合想改用預付代幣額度而非逐次結算的代理。
- 執行需求
- 以 npm 套件(mapleai-mcp)透過 stdio 在本機執行,僅限桌面端。需要 Node.js、連線至 MapleAI 端點的網路,以及有餘額的錢包金鑰:Base、Polygon 或 Arc 使用 EVM_PRIVATE_KEY,Solana 使用 SVM_PRIVATE_KEY。選用變數 MCP_MAX_PAYMENT_USDC、MCP_MAX_PREPAID_USDC、MCP_NETWORK 與 MCP_PAY_TO_* 收款位址可設定支出上限與網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Mapleai Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
MapleAI — GPT and Image API with x402 Pay-Per-Request
OpenAI-compatible GPT, image, embeddings and structured-decision APIs behind one endpoint. No accounts, no subscriptions, no API keys for the pay-per-request tier — an agent pays per call in USDC over the x402 protocol. Prepaid API keys are available for clients that prefer a token budget over per-request payments.
Live endpoints
Prepaid key endpoint (shared): https://mapleai.shop/v1
Models and pricing
GPT (per 1M tokens)
A request is quoted as counted input tokens × input rate + requested output tokens × output rate, plus the network settlement fee (about $0.001; the exact amount is always in the 402 challenge). Failed calls (HTTP ≥ 400) are cancelled, not settled.
Images (per image)
POST /api/v1/images/generations and POST /api/v1/images/image2image
(edit a PNG/JPEG/WebP data URI, max 10 MB). On Solana these routes settle
upfront (image generation outlives a Solana blockhash) and retry transient
upstream failures inside the same paid request.
Audio (per request)
TTS takes JSON {model, input, voice?, response_format?} and returns a WAV
stream; OpenAI voice presets map to Gemini voices, the orpheus models use
their own emotive voices (en: autumn/diana/hannah/austin/daniel/troy, ar:
fahad/sultan/noura/lulwa/aisha/abdullah; [laughs]-style tags and real speed
supported). STT takes multipart file + model or JSON base64, up to 25 MB;
whisper-large-v3* add verbose_json word timestamps and srt/vtt.
Responses carry x-audio-upstream and x-fallback-used headers — when the
primary vendor fails the request fails over to a secondary one inside the
same payment (for TTS the voice differs then).
Jev structured decisions
POST /jev — jev-latest, $0.06 per 1M input tokens, output free. SystemOne
protocol: send model, state and named questions (noul, choice or
score with instructions), read answers from the response.
Free embeddings
POST /v1/embeddings — free NVIDIA nvidia/nemotron-3-embed-1b (2048
dimensions). Send input as a string or an array of up to 128 strings;
model is optional and ignored.
Quickstart
A runnable end-to-end demo (free embeddings → paid GPT answer) lives in
examples/embeddings-to-chat/ and online at
https://base.mapleai.shop/examples/embeddings-to-chat/.
Building an agent? Fork the agent-starter/ template —
repo instructions for agent clients (CLAUDE.md/AGENTS.md), MCP wiring,
a full paid scenario script (free embeddings → prepaid tap → prepaid chat),
and a free CI smoke for all four gateways.
Prepaid API keys
Buy a prepaid bearer key for one GPT model with a single x402 payment:
Budgets run in 100 000-token steps from 100 000 to 1 000 000, priced at the model input rate plus the settlement fee:
The key works at https://mapleai.shop/v1 (OpenAI-compatible). Check usage
and status for free:
Discovery
GET /v1/models— free model catalog with live pricingGET /.well-known/x402— x402 resource manifestGET /openapi.json— OpenAPI 3.1 specificationGET /llms.txt,GET /AI-AGENTS.md— agent-oriented docsGET /developers— developer guide with examples
Repository layout
src/— the x402 gateway (Express, TypeScript, runs undertsx)admin/— OmniRoute-based admin app: provider connections, combos, prepaid key issuance and wallet-only (SIWE) dashboardexamples/— runnable client examplespackages/mapleai-mcp/— local stdio MCP server (free model catalog, embeddings and prepaid status; paid chat, Jev, agent execution and prepaid key packs with local x402 signing; bought keys spend in-server via prepaid_chat with no wallet)tools/— payment and upstream test scriptsdeploy/— systemd units and Apache vhosts used on the VDS
Development
Required env: UPSTREAM_API_KEY, PAY_TO, MODEL_PRICES, MODEL_MAPPING.
Optional features are enabled by their own keys (IMAGE_UPSTREAM_API_KEY,
NVIDIA_API_KEY, JEV_UPSTREAM_API_KEY, PREPAID_ISSUER_TOKEN, …) — see
.env.example for the full list.
來源:README.md,提交 520ec70
工具
0版本歷史
1- v0.3.1最新Oct 5, 2026


