Arabic Pipeline API

io.github.skypantherr由 GitHub 帳號 skypantherr 發布v0.2.0更新於 Oct 31, 2026

Pay-per-call Arabic text, audio and document utilities over x402. USDC on Base, no API key.

已驗證Streamable HTTP可網頁執行檔案與儲存AI 與機器學習

概覽

AI 產生的概覽

遠端 MCP 伺服器,提供按次付費的阿拉伯語文字、音訊轉錄與文件欄位擷取工具,以 Base 上的 USDC 結算,無需 API 金鑰。

可以做什麼
  • 統計文字:字元、詞、句子、閱讀時間以及阿拉伯語/拉丁語比例
  • 將阿拉伯語文字正規化以供搜尋或索引,辨識阿拉伯語、英語或混合語言,並把長文字切成帶精確位移的片段
  • 逐詞比對兩段文字,並以正規化、整詞、片語或模糊方式搜尋文字
  • 把以 base64 送出的阿拉伯語或英語音訊轉錄為純文字
  • 從阿拉伯語文件影像或 PDF 擷取金額、日期、姓名、稅號等結構化欄位,可單份或最多五份批次處理
適用情境
適合需要處理阿拉伯語內容的情況,例如變音符號、字母變體與阿拉伯-印度數字讓一般字串比對失效時;也適合需要阿拉伯語語音轉錄,或從收據、發票、證件擷取欄位而不想自行建置模型的情況。
執行需求
無需安裝,是遠端 streamable HTTP 端點。不需要 API 金鑰、帳號或訂閱。每次工具呼叫須透過 x402 流程以 Base 主網 USDC 付款,因此用戶端需要已儲值的錢包並支援 x402 付款。音訊與文件工具接受最大 12 MB 的 base64 資料。
安裝前請注意
每次工具呼叫都會花費真實的 Base 主網 USDC,文字工具低至 0.002 美元,文件批次最高 0.10 美元,款項結算至提供方錢包。用戶端需要簽署付款,因此涉及錢包憑證。音訊與文件內容會傳送到遠端服務並由第三方模型處理,文字與文件資料會離開本機。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Arabic Pipeline API,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.skypantherr%2Farabic-pipeline/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "arabic-pipeline-api": {
      "type": "http",
      "url": "https://arabic-pipeline-mcp.arabic-pipeline.workers.dev/"
    }
  }
}

README

Arabic Pipeline API

[Arabic Pipeline API MCP server]

Pay-per-call utilities for Arabic text, audio and documents, sold over x402 in USDC on Base.

No API key. No account. No subscription. The first request returns 402 Payment Required; the client signs a payment and retries; the money lands in the provider's wallet. That is the whole protocol — and it is why this service can pay a provider directly, with no payment processor in between.

bash
# Claude Code (any Streamable HTTP MCP client works the same way)claude mcp add --scope user --transport http arabic-pipeline-mcp \  https://arabic-pipeline-mcp.arabic-pipeline.workers.dev/

No install, no key: the tools are already on the other end. A tool call without payment answers with the x402 challenge, and your client pays it on Base.

Live endpoints

URL
REST APIhttps://arabic-pipeline.arabic-pipeline.workers.dev
MCP server (streamable HTTP)https://arabic-pipeline-mcp.arabic-pipeline.workers.dev/
OpenAPIhttps://arabic-pipeline.arabic-pipeline.workers.dev/openapi.json
x402 manifest (/.well-known/x402)https://arabic-pipeline.arabic-pipeline.workers.dev/.well-known/x402
llms.txt (agent-readable summary)https://arabic-pipeline.arabic-pipeline.workers.dev/llms.txt
x402scanhttps://www.x402scan.com/server/298e1e2b-3f5c-4890-9791-6d063fd20931
mcprush (MCP marketplace)https://mcprush.com/skypantherr/arabic-pipeline-api-mcp
PayAPI Market (settlement-verified listing)https://payapi.market/api/arabic-pipeline-api
MCP registryio.github.skypantherr/arabic-pipeline (v0.2.0, active)
Sourcehttps://github.com/skypantherr/arabic-pipeline

The MCP server exposes the same nine capabilities as tools, each behind its own x402 payment (text_metrics, text_normalize, text_detect_language, text_chunk, text_diff, text_search, audio_transcribe, doc_extract, doc_extract_batch).

Why not a generic text tool

Arabic breaks naive string handling in ways that are invisible until they cost you a failed match:

  • Tashkeel — فَاطِمَة and فاطمة are the same name, but not the same bytes.
  • Letter variants — أ إ آ → ا, ى → ي, ة → ه are folded on purpose, not by accident.
  • Arabic-Indic digits — ١٢٣ must match 123, and the tashkeel range overlaps the digit range, so order of operations matters.
  • Bidi control characters — LRM/RLM and zero-width joiners are invisible, and strip "clean" text unless removed deliberately.
  • Offsets — every text tool returns start/end into the original string, so a result can be applied to the caller's own text rather than a rewritten copy.

The paid routes declare this in the 402 itself: each challenge carries a Bazaar input schema and an output example, so a client can see exactly what it is buying before it signs anything.

Endpoints

RouteWhat it doesPriceCost to serve
GET /text/metrics?text=…Counts, language mix, sentence/word stats, reading time$0.002$0 (pure code)
POST /text/metricsSame, JSON body$0.002$0 (pure code)
POST /text/normalizeArabic text cleanup: tashkeel/tatweel, alef/ya/ta-marbuta folding, digit unification, bidi-control removal, whitespace collapse$0.005$0 (pure code)
POST /text/detectArabic / English / mixed detection with confidence and script mix$0.002$0 (pure code)
POST /text/chunkSentence-aligned chunks with exact offsets, for model context windows$0.002$0 (pure code)
POST /text/diffWord-level diff after Arabic normalisation: equal flag, similarity, added/removed$0.002$0 (pure code)
POST /text/searchNormalised Arabic search (phrase / whole-word / fuzzy) with exact offsets and snippets$0.002$0 (pure code)
POST /audio/transcribeAudio → clean text (Arabic or English)$0.02model call
POST /doc/extractDocument image/PDF → structured fields (receipts, invoices, IDs)$0.03model call
POST /doc/extract/batch1–5 documents in one call, independent results and partial failures$0.10model call ×n

POST /text/normalize accepts a mode:

  • light — lossless: whitespace, digit unification, bidi cleanup only.
  • search — light + tashkeel removal + letter folding (أإآ→ا, ى→ي, ة→ه).
  • index — search + punctuation stripped (use as a dedup / index key).

Try it

bash
# 1. Any paid route answers 402 with a payment challengecurl -i https://arabic-pipeline.arabic-pipeline.workers.dev/text/normalize \  -H 'content-type: application/json' \  -d '{"text":"مُحَمَّدٌ عَلِيّ","mode":"search"}'
# 2. Free routes (no payment needed)curl https://arabic-pipeline.arabic-pipeline.workers.dev/openapi.jsoncurl https://arabic-pipeline.arabic-pipeline.workers.dev/

How x402 payment works (for agents)

  1. Call the route with no payment header → 402 Payment Required.
  2. The response carries a base64 PAYMENT-REQUIRED header and, in the body, accepts[] entries describing how to pay (network, asset, price, payTo).
  3. Pick one entry, sign a payment for it, and retry the request with the PAYMENT-SIGNATURE header (base64 payment payload).
  4. The server verifies and settles the payment (via the facilitator) and returns the real result plus a PAYMENT-RESPONSE header with the receipt.

The full machine-readable contract — including per-operation x-payment-info — is at GET /openapi.json.

Settlement

  • Network: Base mainnet (eip155:8453), asset USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913).
  • Payments are verified and settled by a public x402 facilitator (https://x402.dexter.cash — no account, no fees). The facilitator only executes the buyer's signed payment; it never holds funds.
  • Settlement destination: 0x05523af5bd166816D1418Ebf7D6371e1fFB1D2e6.

PayAPI Market independently verified this deployment by buying a call and publishing the receipt: POST /text/normalize for $0.005 USDC, settled in transaction 0xfc3e42f9…73ce9c at block 53,330,178 on Base. The listing is payapi.market/api/arabic-pipeline-api.

Model endpoints

/audio/transcribe uses gemini-3.5-transcribe; /doc/extract and /doc/extract/batch use gemini-3.6-flash with a JSON response schema. Both model names are configurable (GEMINI_TRANSCRIBE_MODEL, GEMINI_VISION_MODEL). The six text endpoints are pure computation and cost nothing to serve.

A batch runs one model call per document, concurrently. At $0.10 for five documents that is $0.02 each, a third below the $0.03 single-document price; for one or two documents the single route is cheaper, and the batch route says so. A failed document is reported in place (ok: false plus error) instead of failing the whole call, so a bad scan costs one slot rather than the payment.

Local development

bash
npm installcp .dev.vars.example .dev.vars   # then add GEMINI_API_KEYnpm run dev                       # wrangler devnpm test                          # vitestnpm run typecheck

Deployment

See DEPLOY.md. The short version: npm run login → npm run secret → npm run deploy → register the listing.

Two Workers are deployed from this repo:

bash
npm run deploy              # REST API  -> arabic-pipeline.arabic-pipeline.workers.devnpx wrangler deploy -c wrangler.mcp.toml   # MCP server -> arabic-pipeline-mcp.arabic-pipeline.workers.dev

Licence

Proprietary — all rights reserved. The source is public so the service can be audited; it is not licensed for reuse or redistribution. The API itself is sold per call, not licensed.

來源:README.md,提交 e45562a

工具

9

text_metrics

Text metrics

Measure text deterministically: characters, words, unique words, sentences, lines, paragraphs, digits, punctuation, average word and sentence length, reading time and an Arabic/Latin language mix. Works on any language, not only Arabic.

輸入參數text必填

text_normalize

Normalize Arabic text

Canonicalise Arabic text for search, matching or indexing: remove tashkeel and tatweel, fold alef/ya/ta-marbuta, unify Arabic-Indic digits, strip bidi control characters and collapse whitespace. mode=light is lossless; search adds letter folding; index also strips punctuation so the result can be used as a dedup key.

輸入參數modetext必填

text_detect_language

Detect language

Identify whether text is Arabic, English, mixed or unknown from its script mix, with a confidence score and the count of Arabic, Latin and other letters. Deterministic and model-free, so it is cheap enough to run on every incoming message to route Arabic work.

輸入參數text必填

text_chunk

Chunk text

Split long text into chunks for a model context window. Cuts at sentence boundaries when possible, then at word boundaries, and never mid-word unless a single word is longer than max_chars. Returns each chunk with exact start/end offsets into the original string plus an optional overlap for context carry-over.

輸入參數text必填overlapmax_chars

text_diff

Diff two texts

Compare two texts word by word after Arabic normalisation (tashkeel, alef/ya/ta-marbuta and digit variants are treated as equal). Returns an equal flag, a similarity score and the added and removed words. Use it for deduplication, re-import checks and QA of edited Arabic copy. Each side is limited to 1500 words.

輸入參數a必填b必填

audio_transcribe

Transcribe audio

Transcribe Arabic or English speech to plain text. Send the audio as base64 (webm, mp3, wav or mp4); the payload limit is 12 MB of base64. Returns the transcript plus the model that produced it.

輸入參數mime_typeaudio_base64必填

doc_extract

Extract document fields

Extract structured fields from an Arabic document image or PDF (receipts, invoices, official letters, national IDs, bank slips) as JSON: amounts, dates, names, identifiers and tax numbers, with null for fields the document does not contain. Send the file as base64 (jpeg, png or pdf); the limit is 12 MB of base64.

輸入參數mime_typedocument_base64必填

doc_extract_batch

Extract document fields (batch)

Extract structured fields from 1 to 5 Arabic documents in one paid call: $0.10 for the batch, i.e. $0.02 per document instead of $0.03. Documents are processed independently and in parallel, results come back in request order with an echoed id, and one unreadable image does not fail the rest (it appears with ok=false and an error). Use this for a stack of receipts, invoices or bank slips.

輸入參數documents必填mime_type

版本歷史

2
  1. v0.2.0最新Oct 31, 2026
  2. v0.1.0Oct 22, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。