Skip to main content
Glama

pir-find

Find a closed-form formula in a table of numbers with PIR (symbolic regression, MIT), and check a candidate formula. Command line and MCP server. Your data stays on your computer: no uploads, no network calls, no telemetry.

Status: 0.1.0.dev0, not released. PIR 3.10.0 inside.

Install (Python 3.10+, needs git)

Not on PyPI yet, so install from GitHub:

pip install "git+https://github.com/Qazi-pk/pir-find.git"            # command line
pip install "pir-find[mcp] @ git+https://github.com/Qazi-pk/pir-find.git"   # plus the MCP server

Or from a clone: pip install . / pip install ".[mcp]".

Related MCP server: Portfolio Data Analytics MCP Server

Command line

pir-find data.csv --describe                      # columns, ranges, problems
pir-find data.csv --target y                      # find a formula for column y (all other columns are inputs)
pir-find data.csv --target y --check "a*b/(a+b)"  # evaluate a candidate formula, no fitting
pir-find data.csv --target y --json

Limits: 5 MB, 8 input columns, 20,000 rows (larger tables are sampled), 300 s per search.

MCP server (Claude Code, Claude desktop, Cursor, Cline)

Claude Code: claude mcp add pir-find -- pir-find-mcp

With uv installed, no separate install is needed: claude mcp add pir-find -- uvx --from "pir-find[mcp] @ git+https://github.com/Qazi-pk/pir-find.git" pir-find-mcp

Claude desktop / others (config file, after pip install):

{ "mcpServers": { "pir-find": { "command": "pir-find-mcp" } } }

Tools: describe_table(path), find_formula(path, target), check_formula(path, target, formula).

How to read the answer

  • law_found: true means PIR returned a formula that beat a straight-line fit. It is a candidate formula, not a proven law; the honest accuracy is r2_heldout_rows (rows not used in fitting).

  • law_found: false means no simple law found; the fallback is a linear model or the average. That does not prove no law exists.

  • PIR does not use units: check the formula for dimensional sense yourself.

  • PIR loses accuracy above about 1% noise, with many inputs, or for sums of many terms.

  • check_formula only evaluates; it never fits. A good R2 there is not a held-out score.

Test

pip install ".[test,mcp]" && pytest

Licence: MIT. Cite PIR: DOI 10.5281/zenodo.23460310.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to interact with local CSV and Parquet data files through natural language queries, facilitating tasks like summarizing datasets or retrieving specific information.
      4
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to analyze large CSV files locally by importing them into SQLite, profiling columns, and running read-only SQL queries without data leaving the machine.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables local, private analysis of CSV and TSV files through natural-language agents such as Grok Bot and Cursor, offering file listing, profiling, SQL-like queries, summaries, group-bys, pivot tables, cleaning previews and generated charts. All computation happens on the user's own machine against an allowlisted folder, with no network calls, telemetry or data leaving the host.
      8
      MIT