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 分

    请在仓库或注册中心条目中声明许可证。