Cypher Mcp

io.github.lonniev由 GitHub 账号 lonniev 发布v0.9.0更新于 Nov 4, 2026

Monetized graph answers via named Cypher queries — Tollbooth DPYC operator

已验证Streamable HTTP可网页运行数据库金融开发者工具

概览

AI 生成的概览

远程 MCP 服务器,通过运行运营者编写的参数化 Cypher 模板,按比特币闪电网络 sats 计费出售图数据库查询答案。

可以做什么
  • 按 key 和参数执行已发布的具名 Cypher 查询,按成功返回的答案计费
  • 查询余额与价格、购买额度、查看账户对账单等 Tollbooth 支付功能
  • 管理查询目录:创建、更新、获取、列出和删除查询模板
  • 将目录中的查询发布为以其 key 命名的独立类型化工具,或将其下架
  • 读取免费的聚合工厂统计数据,用于公开落地页
适用场景
当你希望助手通过经过审核的具名模板查询精选图数据、而不是直接写原始 Cypher,并接受按答案以 sats 付费时使用。适合 DPYC/Tollbooth 运营者的付费用户,或需要编写、定价并发布图查询工具的运营者。
运行要求
远程 streamable HTTP 端点,需 OAuth 认证;无需本地安装或软件包。付费用户需通过 Tollbooth 购买额度。运营者还需获得 Authority 采纳,并通过 Secure Courier 提交 Neo4j 连接信息与 BTCPay 闪电网络凭据;服务器启动本身只需 TOLLBOOTH_NOSTR_OPERATOR_NSEC。
安装前请注意
调用付费查询会实际花费 sats,额度通过闪电网络购买。运营者入驻需提交敏感密钥(Neo4j 凭据、BTCPay API key、运营者 nsec),经 Secure Courier 传递。运营者专用工具可创建、更新、发布和删除目录查询,已发布的写入模板会修改图数据。查询结果与账户数据会发送至远程运营者。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Cypher Mcp,将其添加到工作区。
  2. 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.lonniev%2Fcypher-mcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。

{
  "mcpServers": {
    "cypher": {
      "type": "http",
      "url": "https://cypher-mcp.fastmcp.app/mcp"
    }
  }
}

README

cypher-mcp

Monetized graph answers over Bitcoin Lightning. A Tollbooth-DPYC Operator that sells priced answers from a graph — operator-authored, parameterized, named Cypher query templates — not raw database access.

The OSS Neo4j MCP servers are a free pipe to a database the operator separately expenses (Neo4j invoice) and separately bills for (Stripe stack). cypher-mcp collapses infrastructure cost, application billing, and access control into one metered MCP surface: the operator stops selling seats and starts selling answers, settled in sats, with no Stripe stack and no Neo4j invoice passed to the customer.

Live at https://cypher-mcp.fastmcp.app/mcp.

How it works

Two planes, cleanly separated:

  • Settlement / identity plane — Neon + Nostr + Tollbooth, shared with every other DPYC operator. It never knows a graph exists.
  • Value-delivery plane — Bolt → Neo4j, sealed inside the tool handlers (graph.py), opened and torn down per request (no pool). The backing store is an implementation detail invisible to patrons, so it can be swapped without changing the MCP surface.

Three conceptual layers:

LayerWhereWhat
L1 — primitivecode (shipped once)execute_query_by_key(key, params) + catalog CRUD
L2 — catalogNeon query_catalogkey → vetted Cypher template + param schema (what's possible)
L3 — pricingTollbooth pricing modelwhat's sold, named, priced

Status: live, with named tools. L1 + L2 are shipped and serving real, billed answers — an operator adopted by an Authority, AuraDB-backed, with refund-on-raise verified end to end. Named tools are now live (L3 tool synthesis): an operator can publish_tool(key) to project a query as a first-class, typed tool (e.g. cypher_which_service_handles(keyword)), priced individually in Pricing Studio. Per-key parametric pricing formulas remain a later step — see CHANGELOG.md.

Tools

Patron (priced):

  • cypher_execute_query_by_key(key, params) — run a published query. You supply only parameters; the operator owns the query text, and parameters bind as Cypher $params (never string-interpolated). You're charged only for a delivered answer — an unknown key, invalid parameters, or a failed query rolls back the debit (refund-on-raise).

Free: cypher_public_factory_stats — aggregate counts only (no titles, paths or npubs), cached in-process, for the unauthenticated landing pages of the read-only Cypher Lab Notebook front end in frontend/.

Plus the standard DPYC surface from the wheel: cypher_check_balance, cypher_check_price, cypher_purchase_credits, Secure Courier, npub proof, Oracle delegation, account statements, constraint-based dynamic pricing, etc.

Operator-only (restricted, unpriced) — the authoring plane:

  • cypher_create_query / cypher_update_query / cypher_get_query / cypher_list_queries / cypher_delete_query
  • cypher_publish_tool(key) / cypher_unpublish_tool(key) — project a query as a first-class, typed named tool (or retire it). See Named tools below.

Raw Cypher never reaches patrons — only named, parameterized templates.

Authoring in Neo4j's own UI — no second editor to learn

A DB-analyst refines templates in Neo4j Browser, not in a bespoke tool. cypher_get_query(key) returns the template plus an edit_url — a deep link into the hosted Neo4j Browser (browser.neo4j.io) that pre-targets the operator's AuraDB and loads the statement in edit mode (cmd=edit). Refine it with autocomplete, run-to-test, visualization, and PROFILE; then save it back with cypher_update_query. The template is just a string flowing over MCP — no files, no desktop, no exported bundles. The link carries the DBMS URI but never the password, and get_query is operator-only, so neither ever reaches a patron.

Named tools — publish a query as its own tool

cypher_publish_tool(key) projects a catalog query as a first-class MCP tool named cypher_<key> whose flat, typed parameters come from the query's schema — e.g. cypher_which_service_handles(keyword). An agent then calls it by name with typed params instead of execute_query_by_key(key, params). Internally every named tool funnels through the same shared executor (look the stored Cypher up by key → parameter-bind → run), so there is one code path and the same refund-on-raise guarantee. A published tool registers unpriced — it appears in Pricing Studio like any new tool; set its price there (calls return "not priced yet (TBD)" until you do). cypher_unpublish_tool(key) retires the tool (the query itself stays, still runnable by key). Published tools survive restarts (re-materialized from the catalog); reconnect to observe tool-list changes.

The synthesis machinery is a generic tollbooth-dpyc primitive (register_dynamic_tool) — named Cypher queries are one realization; the same primitive can back a synthesized tool with a REST call, SQL, or a stored prompt.

Onboarding (operator)

  1. Request adoption from an Authority (cypher_request_adoption, signed with the operator's key). Adoption is the only way in: once the Authority's owner approves the request, the Authority provisions an isolated Neon tenant automatically. cypher_adoption_status reports progress.
  2. Deliver operator secrets via Secure Courier (cypher_request_credential_channel, service cypher-operator):
    • neo4j_uri, neo4j_user, neo4j_password — the graph store (e.g. a Neo4j AuraDB instance)
    • btcpay_host, btcpay_api_key, btcpay_store_id — Lightning
  3. Author your catalog with cypher_create_query; patrons then execute by key.

Develop

bash
pip install -e ".[dev]"pytest -vpython -m cypher_mcp.server   # needs TOLLBOOTH_NOSTR_OPERATOR_NSEC

Deployed on Prefect Horizon (FastMCP runtime); see fastmcp.json. The only env var required to boot is TOLLBOOTH_NOSTR_OPERATOR_NSEC — every other secret arrives via Secure Courier.


DPYC Ecosystem

RepoRole
tollbooth-dpycPython SDK — vault, auth, pricing, payments, Nostr identity
dpyc-communityGovernance registry, membership, advisories, threat model
dpyc-oracleCommunity concierge — free onboarding help and membership lookup
tollbooth-authorityCertification backbone — Schnorr-signed purchase order certificates
tollbooth-sampleSample Operator — canonical template for new MCP services
tollbooth-pricing-studioiOS app — visual pricing-model editor and operator console
schwab-mcpCharles Schwab brokerage data (operational example)
thebrain-mcpTheBrain personal knowledge graph (operational example)
excalibur-mcpX/Twitter posting (operational example)
taxsort-mcpTax classification + Cloudflare Pages UI (operational example)
goodearth-mcpRegion-scoped farm climate analytics (operational example)
beesknees-mcpMultiplayer race to the queen (operational example)
roastify-mcpRoastify coffee catalog and packaging artwork (operational example)
ChartRemotely-mcpRemote desktop charting via a patron's own agent (operational example)
tollbooth-webShared browser SDK for operator front ends
tollbooth-oauth2-collectorOAuth2 callback handler — shared advocate service
stablecoin.myshopify.comDPYC merch and Austrian economics

Prior Art & Attribution

The methods, algorithms, and implementations contained in this repository may represent original work by Lonnie VanZandt, first published on June 15, 2026. This public disclosure establishes prior art under U.S. patent law (35 U.S.C. 102).

All use, reproduction, or derivative work must comply with the Apache License 2.0 included in this repository and must provide proper attribution to the original author per the NOTICE file.

How to Attribute

If you use or build upon this work, please include the following in your documentation or source:

Based on original work by Lonnie VanZandt and Claude.aiOriginally published: June 15, 2026Source: https://github.com/lonniev/cypher-mcpLicensed under Apache License 2.0

Visit the technologist's virtual cafe for Bitcoin advocates and coffee aficionados at stablecoin.myshopify.com.

Patent Notice

The author reserves all rights to seek patent protection for the novel methods and systems described herein. Public disclosure of this work establishes a priority date of June 15, 2026. Under the America Invents Act, the author retains a one-year grace period from the date of first public disclosure to file patent applications.

Note to potential filers: This public repository and its full Git history serve as evidence of prior art. Any patent application covering substantially similar methods filed after the publication date of this repository may be subject to invalidation under 35 U.S.C. 102(a).

Further Reading

The Phantom Tollbooth on the Lightning Turnpike — the full story of how we're monetizing the monetization of AI APIs, and then fading to the background.

Software Factory intent vocabulary (DPYC agents)

cypher-mcp is the graph substrate for the DPYC Software Factory: its agents (Porter = Service Desk, Journeyman = Engineering) read and write an institutional-memory graph here without ever holding a raw Cypher tool. They call a fixed vocabulary of operator-authored, parameterized templates — write templates and read templates — published as typed cypher_<key> tools.

  • Write templates capture the memory: record_triage, note_rejection, route_rejection (anti-ping-pong: bounce a rejection back to its origin), record_scope, link_root_cause, link_pr, assert_rationale, bind_rationale_to_symbol, anchor_symbol (post-edit grep-scoping anchor), upsert_capability, assert_invariant, upsert_patent_element, register_service, and more.
  • Read templates are the intention-service forward map — the RAG surface that resolves "which service handles X / why does this capability exist" in one query instead of a twelve-repo grep: which_service_handles, explain_capability, what_realizes_capability, capability_patents, context_pack (the flagship grep-scoping bundle), list_capabilities, list_invariants, list_patent_elements, routing_history, recent_activity, factory_resolution_stats, and their provenance readers.

assert_rationale hard-codes provenance:'llm-inferred-unverified' as a Cypher literal, so an agent key can never claim authoritative provenance.

Start unlimited, limit later. Seeding just authors + publishes the tools; they then appear in Pricing Studio unpriced. Price them and any funded patron can call — the two agents just purchase api_sats like any patron. When you want to restrict calls to the two, add — in a Pricing Studio session — a json_expression allow-list on patron.npub per tool (Constraint Engine, not a bespoke ACL): listed npub allowed, everyone else denied by default, runtime-mutable with no deploy. Containment is also by balance — fund the Porter thin and the Journeyman thicker; a drained agent stops writing the graph but still triages on GitHub.

Seeding (operator, idempotent). scripts/seed_factory_vocabulary.py authors + publishes the vocabulary. --dry-run needs no server or nsec and also prints the exact allow-list to replicate in Pricing Studio when you limit access:

bash
python scripts/seed_factory_vocabulary.py --dry-run \    --porter-npub npub1ymg... --journeyman-npub npub1m5q...

Apply against the live operator (the operator nsec, read from OPERATOR_NSEC or a hidden prompt, is used transiently to sign each request (NIP-98) — never logged or written to disk). Add --gate (with both npubs) to also apply the per-npub allow-list programmatically instead of in Pricing Studio:

bash
python scripts/seed_factory_vocabulary.py \    --url https://cypher-mcp.fastmcp.app/mcp --operator-npub npub1fuhq0... \    --porter-npub npub1ymg... --journeyman-npub npub1m5q...

The vocabulary itself lives in scripts/factory_vocabulary.py (data, no I/O) and is covered by tests/test_factory_vocabulary.py. Pipeline wiring (agents signing and calling these tools), NIP-05 publication, and funding are downstream of this substrate.

Trademarks

DPYC™, Tollbooth DPYC™, and Don't Pester Your Customer™ are trademarks of Lonnie VanZandt. See TRADEMARKS.md in the dpyc-community repository for usage guidelines.

License

Apache License 2.0 — see LICENSE and NOTICE for details.


Because in the end, the tollbooth was never the destination. It was always just the beginning of the journey.

来源:README.md,提交 022960a

工具

0
该服务器需要登录,因此 SourceWeft 无法在没有账号的情况下读取其工具,也未收录。已连接账号所能看到的内容可能因账号及其权限而异。

版本历史

2
  1. v0.9.0最新Oct 21, 2026
  2. v0.8.6Sep 16, 2026

评分

已满足适用检查项的 85%

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

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分

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

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