
Excalibur Mcp
io.github.lonniev由 GitHub 帳號 lonniev 發布v0.43.0更新於 Nov 4, 2026
FastMCP server for posting formatted content to X (Twitter) — Tollbooth-monetized, DPYC-native
概覽
遠端 MCP 伺服器,讓 AI 助理撰寫、排程並發佈格式化貼文到 X(Twitter),依呼叫次數以點數付費。
- 可以做什麼
- 發佈文字或附圖推文到 X(Markdown 轉為 Unicode 富文字),並發佈公開 Nostr 筆記
- 建立、讀取、更新、列出與刪除儲存的貼文,作為草稿或排程項目
- 管理可重複使用的片段與寫作風格設定,並用伺服器端 LLM 潤飾指定段落
- 搜尋、列出、回覆並標記 X 上的對話線索,儲存產生線索的查詢
- 讀取貼文指標、衍生成效分數與 SVG 成效資訊圖
- 處理工作階段、餘額、點數購買、優惠券、定價、公證與導入相關工具
- 適用情境
- 適合希望由助理代寫並發佈 X 貼文、維護草稿與發佈排程,或尋找並回覆 X 上相關對話的情境。較適合已在 DPYC/Tollbooth 生態系中、且接受按次付費的使用者。
- 執行需求
- 透過 streamable HTTP 連線的遠端端點,無需本機安裝。需要 OAuth 驗證,並在連線上證明 Nostr npub 身分(NIP-98 簽章或私訊證明流程),還需以 OAuth2 加 PKCE 授權 X 帳號。工具呼叫會從預先儲值的比特幣閃電點數餘額扣款,驗證與餘額類工具免費。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Excalibur Mcp,將其新增到工作區。
- 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
交給代理程式安裝
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/io.github.lonniev%2Fexcalibur-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。
{
"mcpServers": {
"excalibur": {
"type": "http",
"url": "https://excalibur-mcp.fastmcp.app/mcp"
}
}
}README
eXcalibur MCP
Sword-swift posting of pretty tweets to X (Twitter) via AI agents, monetized with Bitcoin Lightning micropayments through the DPYC(TM) Tollbooth protocol.
eXcalibur is a FastMCP server that lets AI agents post to X (Twitter) with rich Unicode formatting and optional images. Patron authentication for X uses OAuth2 Authorization Code + PKCE -- no credentials appear in chat. Operator credentials (X app keys, BTCPay) arrive via human-in-the-loop Secure Courier and are stored in the operator's per-operator Neon vault schema. Tool calls are metered with Tollbooth DPYC(TM) pre-funded Lightning balances -- Don't Pester Your Customer.
Part of the DPYC(TM) Social Contract.
Getting Started
Connect via Horizon -- no local install needed:
The web editor at https://excalibur.tollbooth-dpyc.com drives the same tools from a browser.
Step 1: Check Session
Call excalibur_session_status to see your current session state. If you have
an active session with funded credits, you are ready to post.
Step 2: Prove Your Npub on the Connection
Identity rides on the connection, not on tool arguments. Connecting from an AI
assistant is an OAuth holder connection: call
excalibur_request_npub_proof(patron_npub=<npub>), reply to the Nostr DM it
sends, then call excalibur_receive_npub_proof(patron_npub=<npub>, nonce=<nonce>)
once. The connection then holds your npub for the lifetime you chose in the
reply (up to 30 days), and every tool call passes only npub. A caller that
holds the nsec may instead sign each HTTP request (NIP-98).
Step 3: X OAuth2 + PKCE (Patron Credentials for X)
- Get your Nostr npub -- use the dpyc-oracle's
how_to_join()tool, or any Nostr client. - Call
excalibur_begin_oauth(npub=<npub>)-- returns anauthorize_url. Open the primaryauthorize_url(not a shortlink) in your browser and authorize the app on X. - Call
excalibur_check_oauth_status(npub=<npub>)-- completes the code exchange, vaults the tokens, and activates your session.
Sessions are keyed by npub. Tokens are stored in the Neon vault and auto-refresh on expiry.
Step 4: Secure Courier (Operator Credentials)
Operator credentials (X OAuth2 app keys, BTCPay connection) are delivered via
Secure Courier (service="excalibur-operator"). This is a human-in-the-loop
flow: the operator consciously approves each credential delivery via their
Nostr client. On receive_credentials, the relay DM is destructively drained
-- credentials exist only in the Neon vault after receipt.
Credits Model
Tool calls cost api_sats per call. Each purchase creates a tranche; it
expires only if the operator's pricing model sets a tranche_lifetime.
Auth and balance tools are always free. Use excalibur_check_balance to see
your balance and tranche expiry. Top up via excalibur_purchase_credits.
Available Tools
Standard Tools (from the wheel)
Standard DPYC(TM) tools are registered by register_standard_tools() from
tollbooth-dpyc. These include
session management, credit operations, Secure Courier, pricing, notarization,
and Oracle delegation. Each tool is identified by a deterministic UUID v5.
Domain Tools (eXcalibur-specific)
Domain tools are defined in server.py (with storage handlers under
tools/). Prices are set by the operator's pricing model -- preview any
call with check_price. Read and auth tools are free.
Posting to X
Stored posts (drafts & scheduling)
Snippets & Voice
AI editorial & dynamic blocks
Conversation leads
Post metrics
Scheduler
OAuth flow tools (begin_oauth, check_oauth_status) are now standard tools
provided by the wheel (see the Standard Tools table above).
Tools that take an npub take only the npub: the connection proves it (see
Security).
Security
- Npub identity -- Patrons are identified by a Nostr public key (
npub), not an email or password. One keypair per role, managed by the user. - Identity on the connection -- A connection proves its npub in one of
two ways: each HTTP request is signed with the npub's key (NIP-98, kind
27235), or an OAuth holder connection carries an Operator-signed grant
earned through
request_npub_proof/receive_npub_proof. The patron chooses the grant's lifetime, up to 30 days;held_identitiesandcheck_proof_statusshow what a connection holds. - Human-in-the-loop Secure Courier -- Credential delivery requires conscious operator approval via Nostr DM. On receipt, the relay message is destructively drained so secrets exist only in the encrypted Neon vault.
- Per-operator Neon schema -- Each operator's credentials are stored in an isolated Postgres schema with a dedicated LOGIN role. No cross-operator access.
Architecture
Key design choices:
- OAuth2 Authorization Code + PKCE -- Patron tokens acquired via browser
flow.
begin_oauthreturns the primaryauthorize_url(not a shortlink);check_oauth_statuscompletes the exchange. Tokens stored in Neon vault, auto-refreshed on expiry. No OAuth 1.0a. - UUID v5 tool identity -- Every tool (standard and domain) has a deterministic UUID derived from its capability name. Pricing, constraints, and billing all key on UUID.
- Standard tools from the wheel --
register_standard_tools()provides all DPYC(TM) infrastructure tools. Only domain-specific X/Twitter tools are defined inserver.py. - Markdown to Unicode -- Converts
**bold**,*italic*, and# headersto Unicode characters that render in tweets without markup syntax.
Self-Hosting
Environment Variables
DPYC(TM) Identity (required to boot)
This is the only env var required to start. All other secrets (X app keys, BTCPay credentials) arrive via Secure Courier credential templates and are stored in the per-operator Neon vault schema.
Operator Credentials (via Secure Courier)
These are delivered via Secure Courier (service="excalibur-operator"), not
set as environment variables:
Certified operators bootstrap their Neon database URL from the Authority via
encrypted Nostr DM -- NEON_DATABASE_URL is not read from the environment.
Optional Tuning
Troubleshooting
Cold start
On first request after deploy, the service may take a few seconds to initialize Neon connections and load the pricing model. The runtime handles this with inline retry -- the caller receives the result after the warm-up completes, not a "service unavailable" error.
Common tool call situations
Responses describe the current lifecycle state with guidance on the next step, not bare error messages.
proof_required-- The connection does not prove that npub (or its grant expired). Callrequest_npub_proof, reply to the DM, thenreceive_npub_proofonce.check_proof_statusshows how long a grant has left.- "Insufficient credit balance" -- Call
purchase_creditsto top up. Check tranche expiry withcheck_balance. - "Operator credentials not configured" -- Operator setup issue, not the patron's problem.
Don't Pester Your Customer: Do NOT ask the patron to re-authenticate, re-authorize, or re-do OAuth unless the response specifically says the upstream token is expired or invalid.
Development
DPYC(TM) Ecosystem
- tollbooth-dpyc -- Python SDK for Tollbooth monetization (vault, auth, pricing, Lightning payments, Nostr identity)
- dpyc-community -- Governance registry: membership, advisories, threat model
- dpyc-oracle -- Community concierge (free onboarding + member lookup)
- tollbooth-authority -- Certification backbone (Schnorr-signed purchase-order certificates)
- tollbooth-sample -- Sample Operator (canonical template)
- tollbooth-pricing-studio -- iOS pricing-model editor / operator console
- cypher-mcp -- Monetized graph answers: named Cypher templates over Neo4j/AuraDB
- schwab-mcp -- Charles Schwab brokerage data
- thebrain-mcp -- TheBrain personal knowledge graph
- excalibur-mcp -- X/Twitter posting
- taxsort-mcp -- Tax classification + Cloudflare Pages UI
- optionality-mcp -- Options-trading practice game
- goodearth-mcp -- Region-scoped climate analytics for small farms
- beesknees-mcp -- The Bee's Knees race game
- roastify-mcp -- Roastify coffee catalog and packaging artwork
- ChartRemotely-mcp -- Puts a security on a desktop chart remotely
- tollbooth-web -- Shared browser SDK for operator front ends
- tollbooth-oauth2-collector -- OAuth2 callback handler (advocate service)
- tollbooth-shortlinks -- URL shortener utility
Trademarks
DPYC, Tollbooth DPYC, and Don't Pester Your Customer are trademarks of Lonnie VanZandt. See the TRADEMARKS.md in the dpyc-community repository for usage guidelines.
License
Apache License 2.0 -- see LICENSE for details.
來源:README.md,提交 a78286f
工具
0版本歷史
2- v0.43.0最新Oct 21, 2026
- v0.40.2Sep 16, 2026
評分
已滿足適用檢查項的 75%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。