Lingshu Solver

io.github.genesis-plan由 GitHub 帳號 genesis-plan 發布v1.0.23更新於 Oct 24, 2026

Deterministic MCP solver for real equation systems (<=6 vars), Krawczyk-certified.

已驗證Streamable HTTP可網頁執行資料與分析AI 與機器學習

概覽

AI 產生的概覽

確定性的非 LLM 數學伺服器,用來求解實數方程組與幾何問題,回傳可驗證、可重現的結果。

可以做什麼
  • 求解實數方程組(最多 6 個變數),給出經認證的根以及結構化的可信度與完備性欄位
  • 求多項式的全部實根,每個根都附誤差區間認證
  • 檢驗某個宣稱的答案,錯誤時回傳經認證的修正值
  • 計算一維、二維、三維幾何:距離、交點、面積、體積、角度、凸包、點在多邊形內、旋轉
  • 把求解遇到的問題寫入本機日誌回報
適用情境
當助理需要給出會被下游依賴的數值——解方程、求根或幾何計算——而且算錯代價很高時適用;也適合在把自行計算的結果傳出去之前做一次獨立檢核。
執行需求
可使用託管的 Streamable HTTP 端點(免安裝、免金鑰),或以 Node.js 透過 npx 執行本機 npm 套件(可離線)。未宣告任何帳號、API 金鑰或環境變數。託管端點的 solve 工具接受選用的 honorPaid 參數。
安裝前請注意
pay 工具會透過付款管道記錄一筆自願支持款項,可能產生實際支出;此工具為選用,且託管端點目前依說明不按次收費。give_feedback 只寫入本機日誌。託管端點不保存方程內容,但使用遠端形式時方程會傳送到該端點。結果為數值解而非符號推導,完備性僅在存在定理支撐的上界時才能證明。

安裝

在 SourceWeft 中

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

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

交給代理程式安裝

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

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

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

其他 MCP 客戶端

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

{
  "mcpServers": {
    "lingshu-solver": {
      "type": "http",
      "url": "https://hongchenlingjing.com/mcp"
    }
  }
}

README

Lingshu Solver

Category: Certified Real-Root Computation

[License] [MCP] [Deterministic] [npm]

A deterministic solver for systems of real equations. The same problem always produces the same answer — no language model, no randomness, no hallucination. Every solution it reports is reproducible and checkable by substitution, and the result carries structured decision fields that tell the calling agent exactly what to do next.

Built for AI agents. Connect it as an MCP tool and your model stops guessing arithmetic. It is a deterministic, non-LLM numerical engine: same input, same answer, every reported solution checkable by substitution, and — crucially — every result comes with a trust block that tells the agent whether the answer is complete, safe to use, or needs more work. You branch on those fields; you never re-derive completeness yourself. Three things matter to a calling agent, and all three are built in:

What an agent needsWhat this tool does
A verdict it can branch on without guessingevery result carries a conclusion — exactly one of 全部解 / 部分解 / 无解 / 计算资源不足 (all / partial / none / budget-exhausted) — plus canAssert for programmatic use, so you never have to re-derive completeness yourself
An 8-level trust block for the "how much do I believe it" questiontrustLevel (8 values, incl. complete_but_shown_partially — search finished, only the page was capped), safeToUse, and provenCount / candidateCount so you never have to count solutions yourself
Honesty about "no answer"an empty result is never silently "no real solution" — meaningOfEmpty distinguishes proven empty / not found within budget / input not solvable
A proof of completeness when one existstrust.completeness compares the number of solutions found against a theorem-proven upper bound (BKK mixed volume of the Newton polytopes, Bézout, multi-homogeneous Bézout, Milnor–Thom, Descartes/fewnomial). complete = the count hits the bound, so you may say "these are all of them". Anything else says so instead of guessing
Inequality constraints that are actually enforcedx^2=0, x>0 returns no solution, not x=0 — a final gate substitutes every candidate back into the problem's own inequalities (open endpoints included) and drops the violators
A way to fix its own mistakeverify returns the certified corrected value and how far off the original was, so a wrong number becomes a repair, not a retry loop

It also does 1D/2D/3D geometry through one geometry tool (130 closed-form ops: distance, intersection, area, volume, angle, convex hull, point-in-polygon, rotation, bounding box, plus the classical triangle and circle theorems — five centres, Euler line and OI² = R(R−2r), Heron, Stewart, Ceva, Menelaus, Ptolemy, Miquel, Napoleon, Pick, pole/polar, Brahmagupta, plus a tropical/convex bridge (Newton polytope, BKK mixed-volume bound, regular-subdivision multiplicities) — and 3D tetrahedron/Monge point). Same contract as the solver: a trust block tells the agent whether the value is exact, whether the computation proved there is definitely_none, or whether the input itself is degenerate (parallel / collinear / coplanar) — and in the last case the correct move is to report the degeneracy, never to invent a number.

Humans can use the web page too (zero install) — but the design target is the agent: compact tool descriptions, structured errors that say what to change, and no prose the model has to pay for on every turn.

🔬 Live demo against the production endpoint: https://hclj-1409755229.cos.ap-guangzhou.myqcloud.com/lingshu-solver/demo.html — call the real MCP endpoint right from the browser and watch poly_roots return certified real roots and verify judge a candidate value. Thirty seconds is enough to see why "an LLM will mis-compute this, Lingshu can certify it".

Yesa deterministic (non-LLM) numerical engine for systems of real equations; algebraic equations and common transcendentals (sin/cos/tan/log/exp/sqrt/abs) all work
Noa symbolic CAS (no analytic derivation), an ODE solver, an integer-programming solver, and it does not claim completeness it did not prove — the completeness block is a theorem-backed bound where one exists, and unknown everywhere else

30 seconds to start

① AI agent (MCP — pick either form)

json
// local stdio — permanently free, unlimited, offline. Recommended.{ "mcpServers": { "lingshu-solver": { "command": "npx", "args": ["-y", "lingshu-solver"] } } }
json
// hosted endpoint — no install, always on, reachable over the public internet{ "mcpServers": { "lingshu-solver": { "type": "http", "url": "https://hongchenlingjing.com/mcp" } } }

It also works if you never pay: the hosted endpoint runs on an honor system — pass "honorPaid": true in the solve arguments and the call is released for free (no verification, no balance deduction). The npx local version and the web version are permanently free. If you do want to support it, see the payment page — a corporate account, self-service crediting, effective immediately, no human approval anywhere in the loop.

② Web (zero install, permanently free)

Type equations into the box (for example x^2 + y^2 = 25 and x + y = 7) and press solve. Everything is computed inside your browser; the equations never leave your device.

③ Developer

bash
git clone https://github.com/genesis-plan/lingshu-solver.gitcd lingshu-solvernode mcp-server.js          # start the local MCP (stdio) servernode test/regression.js     # standing regression suite

Discovery — where agents find Lingshu

  • npm — npx -y lingshu-solver (local stdio, permanently free, offline)
  • Hosted endpoint — https://hongchenlingjing.com/mcp (MCP Streamable HTTP; always on, no install, no key)
  • Auto-indexed MCP directories — Glama · HiMCP · LobeHub

To surface it in more clients, point any MCP client at the hosted endpoint above, or submit the repo to Smithery, the official MCP Registry, or mcp.so. The hosted endpoint is the canonical discovery URL.

Honest boundaries

DimensionWhat it means
Verified solutionsevery reported solution is Krawczyk-certified (tier=proven); error is within the certified radius; mathematically faithful
Completenessproved where a bound exists. For polynomial systems the engine derives a rigorous upper bound on the number of isolated solutions (BKK mixed volume of the Newton polytopes, Bézout, multi-homogeneous Bézout, Milnor–Thom, Descartes/fewnomial) and reports trust.completeness. complete means the number found equals that bound, so "these are all the solutions" is a theorem, not a guess. incomplete / unknown never pretends otherwise
scope caveatthe bound's scope is a closed enum. "(C*)^n" (BKK) counts only solutions where every variable is non-zero, so a solution with a zero coordinate is outside the count — complete there means "all non-zero solutions found"
truncated semanticsonly means "the global branch search did not finish inside the budget"; it does not mean solutions were missed. In most cases every real solution was found
Variables≤ 6
Equations1–64 (server-side guard), and the count must be ≥ the variable count
Search rangedefault ±1e6 per variable; supply domain explicitly for fast-growing functions (exp/sinh)
Output precisionNo user-facing switch. Internal computation is fixed at 6 decimals; the agent-facing display is 4 decimals (precisionDecimals) while solutions[].values keep full float precision
Determinismno random branching; identical input always yields identical output, so caching is safe
Dataweb version sends nothing upward; local version runs offline; the hosted endpoint does not persist equation contents
Dependencieszero third-party dependencies (Node built-ins and standard browser APIs only)

Not guaranteed: 100% exhaustiveness for every input, or convergence inside budget for highly pathological systems. That is the honest floor of numerical mathematics ("guaranteeing all solutions" is undecidable in the general case), not a defect to be fixed.


Documentation

The machine-readable description for AI agents lives at llms.txt.

Three of the design docs are in English; the deep-dive docs (design rationale, technical reference, licence and pricing, contract, versioning, history) are still in their original Chinese. Each row below tells you which is which.

DocLanguageContents
01 · Product roleENwhat it is, what problem it solves, who it is for, capabilities and limits, official wording
02 · User guideENthe three forms, the MCP tool contract (input/output/errors), self-hosting, FAQ
05 · Use casesENapplicable scenarios (agent backend / multi-agent / off-chain computation / tax and finance control / on-prem / education / audit) and the ones that do not apply
03 · Design ideas中文six design principles, why it is trustworthy, why no LLM, what it deliberately refuses to do
04 · Technical reference中文mathematical framework, algorithm pipeline, operator table, hard spec constraints, test suite
06 · Commercial licence and pricing中文licence model, what is free, hosted-endpoint metering, enterprise annual licence, invoicing
07 · Licence contract中文commercial licence template, clause walkthrough, signing flow
08 · Versioning中文version semantics, release flow and the consistency checklist, compatibility promises, history
09 · Project history中文how it got from the original problem to where it stands now

If you read only one page, read 01 · Product role — it states the limits and the approved wording.

Privacy and security commitments are published separately: privacy.html.


Licence (summary)

Free for non-commercial use; commercial use requires written permission (a proprietary licence of our own, not an open-source licence):

  • Non-commercial, free: personal study / research / teaching / evaluation; internal use by non-profit organisations and educational institutions; internal evaluation by teams with annual revenue up to RMB 1 million (≤ 3 instances).
  • Commercial use needs prior written permission: any product, service or business operated for profit, resale of SaaS/cloud/API, integration, embedding, or redistribution as a hosted service.
  • Version applicability: this licence applies from 1.0.4. Versions 1.0.3 and earlier remain under the Apache License 2.0 as published at the time (a historical fact, not revocable, and it does not extend to later versions).

Full terms in LICENSE · scope and pricing in 06 · Commercial licence and pricing · contract in 07 · Licence contract


Contact

  • Business / licence / feedback: [email protected] (or open an issue in this repository)
  • Copyright holder: Guangzhou Hongchen Lingjing Digital Technology Co., Ltd. (广州市红尘灵境数字科技有限公司)
  • Filing: 粤ICP备2026031206号-3 · 粤公网安备44011402001444号

來源:README.md,提交 846a05e

工具

6

solve

Deterministic (non-LLM) solver for systems of real equations. Use it instead of computing the math yourself whenever a wrong number has a cost. Same input always returns the identical result — no hallucination, no randomness, so caching and retries are safe. Supports algebraic equations and common transcendentals (sin/cos/tan/log/exp/sqrt/abs), max 6 variables, no initial guess needed. READ THE trust BLOCK: it tells you, per result, whether the value is safe to use directly or must be verified first. Pass domain explicitly for exp/sin or large ranges, else truncated may be true. Not for symbolic derivation, initial-value ODEs, or integer constraints. Optional: pass honorPaid:true to declare personal or evaluation use — then it is served free with no key, no balance and no deduction; payment is voluntary and never enforced.

輸入參數domainoptionsfastModeequations必填honorPaidvariables

give_feedback

Report a problem to the operator when solve hits a dead end, returns an error, or produces something you believe is wrong. The text is written to a local log only and is never transmitted anywhere else.

輸入參數contextmessage必填

poly_roots

All real roots of a polynomial, each individually Krawczyk-certified with a strict error box. Coefficients are highest degree first: [1,-2,-5,6] means x^3-2x^2-5x+6. Use it instead of letting a language model estimate roots. Complex roots are not returned (real only).

輸入參數tolerancecoefficients必填

verify

Check whether a claimed answer is actually correct — call this on any number you computed yourself before passing it downstream. verdict=verified means it is a certified real root; verdict=refuted_or_unverified means it is NOT, and nearestCertifiedRoot then carries the correct value so you can self-correct in the same turn. Deterministic and reproducible.

輸入參數equation必填candidate必填tolerancevariables

geometry

Deterministic 1D/2D/3D geometry: distances, intersections, areas, volumes, angles, convex hull, point-in-polygon, rotations. Closed-form (not iterative), exact up to floating-point rounding, identical output for identical input. Use it instead of doing geometry yourself. Pass {op, ...args} with op one of: 1D: dist1,midpoint1,divide_point,divide_ratio,harmonic_conjugate,interval_length,interval_midpoint,interval_intersect,interval_union,interval_hull,interval_overlap_length,interval_contains,point_between | 2D: dist2,midpoint2,lerp2,line_from_points,point_line_distance,point_segment_distance,project_point_line,line_intersect,line_intersect_points,segment_intersect,segment_length,angle_3points,angle_vectors,line_angle,triangle_area,triangle_centroid,triangle_incenter,polygon_area,polygon_perimeter,polygon_centroid,point_in_polygon,convex_hull,polygon_is_convex,circle_from_3points,point_circle_position,circle_line_intersect,circle_circle_intersect,circle_measure,sector_area,rotate_point,reflect_point_line,scale_point,parallel_through,perpendicular_through,triangle_circumcenter,triangle_orthocenter,triangle_excenters,triangle_five_centers,euler_line,triangle_nine_point_circle,triangle_euler_inequality,triangle_medians,triangle_altitudes,triangle_bisector_lengths,cevian_concurrent,menelaus_collinear,power_of_point,radical_axis,polar_of_point,pole_of_line,ptolemy,miquel_point,napoleon_triangles,pick_theorem,cocircular_check,minimum_enclosing_circle,circumcircle | 3D: dist3,midpoint3,lerp3,plane_from_3points,point_plane_distance,project_point_plane,reflect_point_plane,coplanar,point_line_distance3,project_point_line3,line_plane_intersect,line_line_relation,plane_plane_intersect,tetra_volume,polygon_area3,face_normal,mesh_volume,sphere_from_4points,sphere_line_intersect,sphere_plane_intersect,sphere_measure,angle_vectors3,angle_line_plane,angle_plane_plane,rotate_axis,cross3,triple_product,tetrahedron_geometry,monge_point | any: distance,midpoint,lerp,norm,normalize,dot,cro

輸入參數op必填

pay

Optional voluntary-support only. The hosted endpoint is no per-call charge today (metering off) (metering off: no credential required, no call limit, no per-call charge), so no payment is needed at all. This tool records a support contribution of any amount: the channel is a corporate static collection code (UnionPay aggregate QR) settling into a corporate bank account, and no payment-platform merchant API is used. AFTER PAYING: nothing to do — there is no self-crediting step and no waiting for reconciliation; the operator reconciles against the corporate bank statement, and any positive amount counts as support, not a bill. If the server has no payment method configured the order is still created but payIntent.payTo is null; in that case just keep calling the endpoint with no credential at all.

輸入參數channelorderIdselfReportNoteselfReportPaid

版本歷史

5
  1. v1.0.23最新Oct 9, 2026
  2. v1.0.22Oct 3, 2026
  3. v1.0.19Oct 2, 2026
  4. v1.0.18Oct 1, 2026
  5. v1.0.15Sep 29, 2026

評分

已滿足適用檢查項的 90%

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

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

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