Lingshu Solver

io.github.genesis-planPublished by GitHub account genesis-planv1.0.23Updated Oct 24, 2026

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

VerifiedStreamable HTTPWeb executableData & AnalyticsAI & ML

Overview

AI-generated overview

Deterministic, non-LLM math server that solves systems of real equations and geometry problems, returning certified, checkable results.

What you can do
  • Solve systems of real equations (up to 6 variables) with certified roots and structured trust/completeness fields
  • Find all real roots of a polynomial, each certified with an error box
  • Verify a claimed answer and get the corrected certified value when it is wrong
  • Compute 1D/2D/3D geometry: distances, intersections, areas, volumes, angles, convex hull, point-in-polygon, rotations
  • Report a problem with a solve to a local log
When to use it
Useful when an assistant must produce numbers that will be relied on downstream — equation solving, root finding, or geometry — and a wrong value is costly, or when a computed answer needs an independent check before being passed on.
Requirements
Either the hosted Streamable HTTP endpoint (no install, no key) or the local npm package run via npx with Node.js, which works offline. No accounts, API keys or environment variables are declared. The solve tool accepts an optional honorPaid argument on the hosted endpoint.
Before you install
The pay tool records a voluntary support contribution through a payment channel, so money can be spent; it is optional and the hosted endpoint is described as free per call today. give_feedback writes to a local log only. Equation contents are not persisted by the hosted endpoint, but they are sent to it when using the remote form. Results are numerical, not symbolic, and completeness is only proven where a theorem-backed bound exists.

Installation

In SourceWeft

  1. Open Lingshu Solver in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.genesis-plan%2Flingshu-solver/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "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号

Source: README.md at commit 846a05e

Tools

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.

ParametersdomainoptionsfastModeequationsrequiredhonorPaidvariables

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.

Parameterscontextmessagerequired

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).

Parameterstolerancecoefficientsrequired

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.

Parametersequationrequiredcandidaterequiredtolerancevariables

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

Parametersoprequired

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.

ParameterschannelorderIdselfReportNoteselfReportPaid

Version history

5
  1. v1.0.23LatestOct 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

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.