Skip to content
Back to search

hp-prime-mcp

Connect an HP Prime calculator to Claude and other AI assistants (MCP server): see its screen, send HP PPL programs, read programs and matrices back over USB

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/addzsurv--hp-prime-mcp/badge.svg)](/listings/addzsurv--hp-prime-mcp)

HTML

<a href="/listings/addzsurv--hp-prime-mcp"><img src="/api/listings/addzsurv--hp-prime-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

git clone https://github.com/JordiRigau/hp-prime-kit
git clone https://github.com/Addzsurv/hp-prime-mcp

Claude Code: add to your project's `.mcp.json` (or `claude mcp add`):

{
  "mcpServers": {
    "hp-prime": {
      "command": "python",
      "args": ["C:/path/to/hp-prime-mcp/hp_prime_mcp.py"],
      "env": {
        "HP_PRIME_KIT": "C:/path/to/hp-prime-kit/hpprime.py"
      }
    }
  }
}

Claude Desktop: the same block under `mcpServers` in `claude_desktop_config.json`.

Settings (environment variables)

| Variable | Default | |---|---| | `HP_PRIME_KIT` | `hp-prime-kit/hpprime.py` next to this file | | `HP_CK_DIR` | `~/Documents/HP Connectivity Kit` | | `HP_CK_EXE` | `C:\Program Files\HP\HP Connectivity Kit\ConnectivityKit.exe` | | `HP_VIRTUAL_DIR` | `~/Documents/HP Prime/Calculators` (HP's Virtual Calculator) | | `HPDEV` | unset (path to `hpdev.exe` to enable `prime_preview`) | | `HP_PRIME_MCP_OUT` | `hp-prime-mcp-out` in the working folder (screenshots, built programs) |

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 122 lines
  1. # hp-prime-mcp
  2. **Connect your HP Prime calculator to Claude and other AI assistants.**
  3. An [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server for the **HP Prime G2** graphing calculator. Plug the Prime into your PC with its USB cable and your AI assistant can **see the calculator's screen, write and install HP PPL programs on it, and read programs and matrices back**.
  4. Works with Claude Code, Claude Desktop and any MCP client. Windows, Python, no extra packages.
  5. ![examples/HELLO.txt as the Prime draws it (rendered on the PC with prime_preview)](docs/hello_preview.png)
  6. *Keywords: HP Prime, HP Prime G2, HP PPL, HP Prime programming, HP Connectivity Kit, MCP server, Claude, AI, calculator, USB, screenshot.*
  7. ## Try it in one sentence
  8. With it set up (below), plug in your Prime and ask your assistant:
  9. > "Check, send and run `examples/HELLO.txt` on my HP Prime, then show me its screen."
  10. The assistant lints the program, builds it, puts it on the calculator (you click Send in the Connectivity Kit, or it goes straight over USB), and takes a screenshot to confirm.
  11. ## What it's good for
  12. - **Writing Prime programs with an AI.** The assistant writes the PPL, checks it on the PC, installs it on the calculator, then looks at the screen to see it running. You only press the calculator's keys.
  13. - **Getting results off the calculator.** Read matrices and programs back to the PC, for spreadsheets, CAD or reports.
  14. - **Putting things on the calculator.** Programs built and sent from the PC.
  15. - **"What's on my screen?"** The assistant can see what the calculator shows, so it can help when something looks wrong.
  16. ## What it can't do
  17. - **Press keys or tap the screen.** It is not a remote control: on the firmware it was tested on (G2, build 15751), remote key presses have no effect. You drive the calculator; the assistant sees and exchanges data.
  18. - **Work without the cable.** The Prime has no network.
  19. - **Read data back on its own.** Matrices and programs are read from the copy HP's Connectivity Kit keeps on the PC, so the Kit has to have been open with the calculator plugged in.
  20. ## Tools
  21. | Tool | What it does |
  22. |---|---|
  23. | `prime_status` | Which calculators the PC has data for, their programs, and whether the Connectivity Kit is running |
  24. | `prime_screen` | A picture of the calculator's screen right now |
  25. | `prime_lint` | Check a PPL source for errors the Prime's compiler won't explain, including mistakes other checkers pass but the real calculator rejects (see below) |
  26. | `prime_send_program` | Lint, build and install a program, through the Connectivity Kit (default) or straight over USB |
  27. | `prime_list` | Programs, matrices, lists, apps and notes on a calculator |
  28. | `prime_read_matrix` | A matrix (M0..M9) as rows of numbers |
  29. | `prime_read_program` | A program's source code, read back off the calculator |
  30. | `prime_preview` | Run PPL on the PC and render the screen it draws (optional, needs hpdev) |
  31. ## Catches what the real calculator rejects
  32. Some PPL passes every PC checker and then stops with a bare "Syntax Error" on the calculator. `prime_lint` and `prime_send_program` look for the ones found the hard way on a real G2:
  33. - **A built-in name used as a variable.** `LOCAL det;` or `LOCAL e;` (or a function parameter called `det`) fails on the calculator. Other common built-ins (`max`, `size`, `SIZE`, `STRING`...) are flagged as warnings.
  34. - **More than 8 names on one `LOCAL` line.** The calculator allows 8; split the line in two.
  35. `prime_send_program` refuses to send a program with one of these errors, so it never reaches the calculator broken. Found another one? Please [open an issue](https://github.com/Addzsurv/hp-prime-mcp/issues).
  36. ## Needs
  37. - Windows, Python 3.9+ (standard library only).
  38. - An HP Prime G2 on its USB cable.
  39. - [hp-prime-kit](https://github.com/JordiRigau/hp-prime-kit) (MIT): the USB and file-format tools this server builds on.
  40. - HP Connectivity Kit (free, from HP): for reading data back and for the default install route.
  41. - Optional: [hpdev](https://github.com/golba98/hp-prime-development-toolkit) (MIT), for `prime_preview` and a second checker.
  42. ## Setup
  43. ```
  44. git clone https://github.com/JordiRigau/hp-prime-kit
  45. git clone https://github.com/Addzsurv/hp-prime-mcp
  46. ```
  47. Claude Code: add to your project's `.mcp.json` (or `claude mcp add`):
  48. ```json
  49. {
  50. "mcpServers": {
  51. "hp-prime": {
  52. "command": "python",
  53. "args": ["C:/path/to/hp-prime-mcp/hp_prime_mcp.py"],
  54. "env": {
  55. "HP_PRIME_KIT": "C:/path/to/hp-prime-kit/hpprime.py"
  56. }
  57. }
  58. }
  59. }
  60. ```
  61. Claude Desktop: the same block under `mcpServers` in `claude_desktop_config.json`.
  62. ### Settings (environment variables)
  63. | Variable | Default |
  64. |---|---|
  65. | `HP_PRIME_KIT` | `hp-prime-kit/hpprime.py` next to this file |
  66. | `HP_CK_DIR` | `~/Documents/HP Connectivity Kit` |
  67. | `HP_CK_EXE` | `C:\Program Files\HP\HP Connectivity Kit\ConnectivityKit.exe` |
  68. | `HP_VIRTUAL_DIR` | `~/Documents/HP Prime/Calculators` (HP's Virtual Calculator) |
  69. | `HPDEV` | unset (path to `hpdev.exe` to enable `prime_preview`) |
  70. | `HP_PRIME_MCP_OUT` | `hp-prime-mcp-out` in the working folder (screenshots, built programs) |
  71. ## Notes
  72. - **Windows gives the USB connection to one program at a time.** Screen capture and USB send need the Connectivity Kit closed; `prime_screen` can close and reopen it for you (`close_kit=true`).
  73. - **The USB send replaces a program of the same name without asking**, and the calculator acknowledges nothing: check with `prime_screen`. The Connectivity Kit route (`method: "kit"`) is the safer default.
  74. - hp-prime-kit's USB send was measured on firmware 15515; this server passes `--any-build` so it also runs on newer builds. Tested by the author on a G2, build 15751, with the Kit route; treat the USB route as experimental.
  75. - While a program is running on the calculator, the screen shows that program, and the Connectivity Kit can't browse the calculator.
  76. ## Related projects
  77. Other MCP servers for the HP Prime work on the PC side, without the calculator:
  78. - [hp-prime-tutorial](https://github.com/dominikmaslak11/hp-prime-tutorial) (Polish): its `ppl` tool includes an MCP server that validates, formats and runs PPL in a simulator and builds `.hpprgm` files.
  79. - [hpprime-markdown-viewer](https://github.com/abaccin/hpprime-markdown-viewer): includes an MCP server that searches the HP Prime user guide and scaffolds Python apps.
  80. hp-prime-mcp is for the other half: the calculator on the cable (its screen, sending to it, reading back from it). They work well side by side.
  81. ## Questions, other models and firmware
  82. Tested on an HP Prime G2, firmware build 15751, on Windows 11. If you try it on a G1, another firmware or another OS, please [open an issue](https://github.com/Addzsurv/hp-prime-mcp/issues) with what worked.
  83. ## Licence
  84. MIT. Not affiliated with HP.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.