stemseal
A local MCP server that hands small LLMs verified, locked deterministic "cells" to call for calculations instead of guessing.
find_cell— describe a calculation need in plain words (optionally 3–6 standard names); returns matching cells with their required inputs and an example, or an empty list if nothing fits.call_cell— run a cell by its exact name, passing inputs inline (input) or from a ≤1MB.jsonfile (input_file); returnsok,not_available, orinvalid_input, and shows the exact input to retry when refused. Never invents a result.list_cells— cheaply list every locked cell on the machine with what it computes and its inputs.request_cell— record a need for a cell that doesn't exist yet; alike requests are counted together and cells are built in demand order.Built-in cells cover annual leave days, currency conversion, food calories, growth rates, Korean-spoken amounts, menu/order totals, monthly wage from hourly, party sets, percentage-point differences, percentile rank, target-margin pricing, store FAQ and hours, and VAT supply price.
Model-aware assistance — with
STEMSEAL_MODELset,find_cellreturns a guide tuned to that model family's weak spots andcall_cellrepairs common input mistakes (wrapped arguments, renamed keys) before running.Korean/English — guides answer in Korean when the request contains Hangul, English otherwise; fixable via
STEMSEAL_LANG.Fully local and safe — no server, account, dependencies, or telemetry; cells run in an isolated
python -Iprocess with time/memory/process limits; onlystemseal update(download-only) touches the network.Local ledger — unmet needs and token savings are recorded on your machine (
stemseal demand,stemseal savings,stemseal measure), with aminimal/offprivacy mode.
Enables previewing and opening GitHub issues to request new calculation cells when no existing cell fits, with sensitive information redacted and user confirmation required before opening.
Integrates with a local Ollama instance to measure per-cell token baselines using local models, supporting token-savings estimates without sending data off-machine.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@stemseal 5년 근속이면 연차가 며칠인지 계산해줘"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
stemseal (lite)
Small LLMs guess at calculations. stemseal gives them verified cells to call instead. 작은 LLM은 계산을 어림짐작합니다. stemseal은 그 대신 부를 수 있는 검증된 세포를 줍니다.
A cell is one small, deterministic function. It enters the bank only after it passes a purity check (no I/O, no clock, no randomness) and at least 20 ground-truth cases. Then it is locked by sha256. A locked cell never changes. A fix becomes a new version. If no cell fits, the model gets an honest "not available" instead of an invented answer.
세포는 작고 결정적인 함수 하나입니다. 순수성 검사와 정답 사례 20개 이상을 통과해야 들어오고, sha256으로 잠깁니다. 잠긴 세포는 바뀌지 않으며, 고치면 새 버전이 됩니다. 맞는 세포가 없으면 지어낸 답 대신 "없음"을 정직하게 돌려줍니다.
This lite version runs entirely on your machine. There is no server, no account, no dependencies, and no telemetry. Only stemseal update, when you run it, downloads new cells.
이 판은 전부 내 컴퓨터에서 돕니다. 서버, 계정, 의존성, 원격 수집이 없습니다.
What we measured / 측정 결과
52 held-out tasks, 3 runs each (156), local models through Ollama:
Model | Alone | With stemseal + model guide |
EXAONE 3.5 7.8B | 23% | 78% |
qwen2.5:3b | 11% | 66% |
llama3.2:3b | 7% | 50% |
Caveats, honestly / 솔직한 한계:
One test set, written by us, mostly Korean business arithmetic. Your tasks will differ.
우리가 만든 시험 하나, 주로 한국어 업무 계산입니다. 여러분의 일과는 다를 수 있습니다.
Cells help only where a cell exists. Writing, translation and judgment stay with the model.
세포가 있는 계산에서만 돕습니다. 글쓰기, 번역, 판단은 모델 몫입니다.
On an old laptop / 구형 노트북에서
On a 2011 laptop (2-core i5-2430M, no AVX2, no GPU), exaone3.5:2.4b got 4 of 20 hours-and-price questions right alone and 15 of 20 with cells, asked the customer back on all 5 questions where am/pm was unknown, and told no customer a wrong number (the other 5 went to staff). Expect about 10-25 seconds per answer. Putting a long menu into the prompt instead took about 65 seconds per question. A 1.5B model refused to guess (no wrong numbers) but could not copy the customer's words, so most questions went to staff; use 2B or larger (measured on exaone 2.4B only). Details: the case.
2011년형 노트북(2코어 i5-2430M, AVX2·GPU 없음)에서 exaone3.5:2.4b는 영업시간·금액 질문 20개를 혼자 4개, 세포로 15개 맞혔고, 오전·오후를 알 수 없는 5개는 모두 손님께 되물었으며, 손님에게 틀린 숫자는 0이었습니다(나머지 5개는 직원 호출). 답 하나에 10~25초쯤 걸립니다. 긴 메뉴판을 프롬프트에 넣으면 질문당 65초쯤 걸렸습니다. 1.5B 모델은 틀리지는 않았지만 손님 말을 그대로 옮기지 못해 대부분 직원 호출로 넘어갔으니 2B 이상을 권합니다(실측은 exaone 2.4B뿐). 자세한 내용: 사례.
Related MCP server: math-logic-mcp
Install / 설치
pip install stemseal
stemseal verify # re-checks every lock and ground-truth caseConnect to your model (MCP) / 모델에 연결
Any MCP client (LM Studio, Claude Desktop, Ollama front-ends that speak MCP, ...):
{
"mcpServers": {
"stemseal": {
"command": "stemseal-mcp",
"env": { "STEMSEAL_MODEL": "qwen2.5:3b" }
}
}
}STEMSEAL_MODEL is optional. When set, find_cell returns a short selection guide written for that model family's known weak spots (too many candidates, wrapped arguments, renamed keys), and call_cell repairs those input mistakes before running the cell.
STEMSEAL_MODEL을 넣으면 그 모델 계열의 약점에 맞춘 고르기 안내가 함께 오고, 흔한 입력 실수를 고친 뒤 실행합니다.
Tools: find_cell, call_cell, list_cells, request_cell.
Language: guides answer in Korean when the request contains Hangul and in English otherwise. Set STEMSEAL_LANG=ko or en to fix it. The numbers above were measured with the Korean wording; the English wording is a translation and has not been re-measured yet.
안내 문구는 요청에 한글이 있으면 한국어, 없으면 영어로 나갑니다. 위 수치는 한국어 문구로 잰 것이고, 영어 문구는 아직 따로 재지 않았습니다.
Command line
stemseal list
stemseal find 연평균 성장률
stemseal call currency_convert '{"amount": 100, "rate": 1385.5}'
stemseal request 대출 원리금 균등상환 월 납입액
stemseal demand # unmet needs on this machine, alike requests counted together
stemseal demand --open 1 # show the cell-request issue text for the top one, then open it if you agree
stemseal update # get cells from the newest signed cell release
stemseal savings # tokens the cells saved on this machineCells
cell | computes | inputs |
annual_leave_days | 근속 연수로 연차 일수 (15일, 2년마다 +1, 최대 25) | years |
currency_convert | 외화를 원화로 환산 (원 미만 버림) | amount, rate |
food_calories | 100g당 열량과 먹은 양으로 섭취 열량 | kcal_per_100g, grams |
geometric_mean_growth | 기간별 성장률의 기하평균 성장률 (%) | rates |
korean_amount | 손님이 한글로 말한 금액·수량 읽기 ("만이천구백원" 12900, "두 잔" 2), 손님 문장에 있는 말인지 확인 · built from a store kiosk test | text, question |
menu_order_total | 손님이 말한 메뉴 이름·수량을 가게 메뉴판에서 찾아 합계 (가격은 메뉴판에서만, 애매하면 손님께 할 질문) · built from a store kiosk test | question, menu, items (8.0: 수량은 세포가 원문에서 읽음, 읽지 못한 말이 하나라도 남으면 되묻기("더", "추가", "빼", "취소"처럼 수량·주문을 바꾸는 말 포함), 수량 말 없는 메뉴는 1개(qty_assumed), "두 개씩"은 앞 메뉴에도, 빠진 메뉴는 거절) |
order_total | 주문 항목(가격×수량) 합계, 할인, 결제 금액 · built from a store kiosk test | question, items[{name, price, qty}], discount_pct, discount_won (9.0: 손님 말 그대로 받고 원문에 있는지 확인, 빠진 수량은 세포가 읽고 1개로 친 품목은 qty_assumed, 읽지 못한 말(넘기지 않은 음식 이름, "더", "추가", "빼"처럼 수량·금액을 바꾸는 말 포함)이 남으면 거절, 한 name에 두 음식을 이으면 거절, 받는다고 한 할인을 넘기지 않거나 금액이 없으면 거절) |
monthly_wage_from_hourly | 시급을 월 209시간 기준 월급으로 | hourly_wage |
party_set | "둘이서", "4명"을 읽어 인원에 맞는 세트와 가격 · built from a store kiosk test | question, sets, people 선택 (4.0: 인원은 세포가 문장에서 찾음, 부정한 인원은 빼고 후보가 둘 이상이면 되묻기) |
percentage_point_diff | 두 비율의 차이 (%p) | before_pct, after_pct |
percentile_rank | 값이 목록에서 몇 % 위치인지 | values, value |
price_for_target_margin | 원가와 목표 마진율로 판매가 | cost, margin_pct |
store_faq | 가게가 정해 둔 안내(맵기, 원산지, 주차…)를 그대로 꺼냄, 답이 없으면 직원에게 · built from a store kiosk test | question, faq |
store_hours | 지금 영업 중인지, 마감·오픈까지 남은 분 (자정 넘는 영업, "오후 9시 45분" 같은 한국어 시각 포함, 오전·오후 없는 시각은 짐작하지 않고 되묻게 함, 쉬는 시간·주문 마감 말이 있으면 직원 안내) · built from a store kiosk test | question, now, open, close (7.0: 손님 말 그대로, 모델이 붙인 오전·오후는 손님 말 기준, 여는·닫는 시각 역할 확인, 애매하면 손님께 할 질문을 돌려줌) |
vat_supply_price | 부가세 포함 금액을 공급가액과 부가세로 (부가세 원 미만 절사) · first cell built from a request (#4) | total, vat_pct |
Making a cell / 세포 만들기
How to make a cell that small models can trust (refuse when ambiguous, read the customer's own words, measure on fresh questions), learned on a store laptop: CELL_GUIDE.md. 작은 모델이 믿고 쓸 세포를 만드는 지침은 CELL_GUIDE.md에 있습니다.
Need a cell that isn't here? / 필요한 세포가 없나요?
When nothing fits, the need is saved without the model having to do anything: a find_cell that comes back empty, or a call to a cell name that does not exist, is written to your own ledger (~/.stemseal/ledger.jsonl) with the time, the words searched, the model name (STEMSEAL_MODEL) and the closest cell. The model can also ask on purpose with request_cell (just need, one sentence; example is optional). Either way the reply is not a refusal: it says the request is saved and counted, to answer on its own for now and say so, and to look again next time, and it points at the closest cell when one comes near.
Requests for the same calculation are counted together (numbers, word order, spacing and words like "계산" or "amount" aside; a different word such as 복리/단리 keeps them apart); the count is how strong the demand is. stemseal demand lists them, most asked first. Nothing is sent anywhere: stemseal demand --open <n> first shows the GitHub cell-request issue it would open (the need, other wordings, the example, how often it was asked), with phone numbers, e-mail addresses, ID numbers and long number runs hidden, and opens it only if you agree. The repository is public, so check the text for names or anything private before you submit. Requested cells are built as demand gathers. Run stemseal update to get them: it takes only a numbered cell release (tag cells-N) whose release.json is signed with a stemseal release key built into your version, never an older release than the one it took last, and re-checks each new cell on your machine (file hashes, its lock, the checker, every ground-truth case) before it can be used; the requests a new cell answers drop off your list. A cell a release withdraws is no longer used. If update had to take an older release than the newest one, it prints a warning: line saying why. Cell folders it replaced are kept in ~/.stemseal/replaced/ and can be deleted. stemseal 0.2.3 and older read cells from the main branch; update stemseal to get new cells. Update is the only command that reaches the internet, and it only downloads. (stemseal measure talks only to the Ollama on your own machine.)
세포가 없으면 모델이 따로 하지 않아도 요청이 남습니다. find_cell이 빈손으로 돌아오거나 없는 세포 이름을 부르면, 시각, 찾던 말, 모델 이름, 가장 가까운 세포가 내 컴퓨터의 장부에만 기록됩니다. 모델이 request_cell로 직접 요청할 수도 있습니다(need 한 문장이면 되고 example은 선택). 돌려주는 말은 거절이 아니라 "기록했고 곧 그 물길을 만든다, 다음에 다시 찾아 달라"이고, 가까운 세포가 있으면 함께 알려 줍니다. 같은 계산의 요청은 숫자, 낱말 순서, 띄어쓰기, "계산" 같은 말이 달라도 한 건으로 묶어 횟수를 셉니다(복리/단리처럼 낱말이 다르면 따로 둡니다). stemseal demand로 쌓인 요청을 보고, stemseal demand --open <번호>로 GitHub 세포 요청 이슈의 내용을 먼저 확인한 뒤 동의하면 엽니다. 전화번호, 이메일, 주민번호, 긴 숫자열은 가려지지만 저장소는 공개이니 이름 같은 개인 정보가 없는지 보고 제출하세요. 요청이 모이는 순서대로 세포를 만들고 stemseal update로 받습니다. update는 번호가 붙은 세포 출시(태그 cells-N) 가운데 설치된 판에 든 출시 열쇠로 서명된 것만, 마지막으로 받은 출시보다 옛것이 아닌 것만 받고, 새 세포마다 내 컴퓨터에서 파일 해시, 잠금, 검사기, 정답 사례를 모두 다시 확인한 뒤에 씁니다. 그 세포가 답한 요청은 목록에서 빠지고, 출시에서 회수한 세포는 더 쓰지 않습니다. 가장 새 출시를 받지 못하고 그 아래 출시를 받았으면 warning: 줄로 까닭을 알려 줍니다. update가 바꿔 끼운 세포 폴더는 ~/.stemseal/replaced/에 남으며 지워도 됩니다. 0.2.3 이하는 main 가지에서 세포를 받으므로 새 세포를 받으려면 stemseal을 올려 주세요. 인터넷을 쓰는 명령은 update 하나뿐이고, 내려받기만 합니다(stemseal measure는 내 컴퓨터의 Ollama에만 붙습니다).
What the ledger keeps / 장부에 남는 것
STEMSEAL_LOG sets how much of a request the ledger keeps: full (default) keeps the sentence (up to 300 characters); minimal keeps only a hash of it and at most 4 calculation words found in it (words of the cells' own descriptions or of a fixed list such as 이자, 대출, 할인, written as that list spells them, so names, phone numbers and the rest of the sentence are not kept), keeps a model's search words the same way, keeps no examples, and keeps only the exception type of a cell's error; off writes no ledger. Switching to minimal does not change rows already written: stemseal ledger says whether such rows are there, and stemseal ledger --minimize rewrites them as minimal would have written them (nothing does this on its own). Rows older than 90 days, and the oldest rows once the file passes 20MB, move to ledger.1.jsonl when the MCP server starts (the previous ledger.1.jsonl is replaced). Records of installed cells and answered requests are kept. A cell's error message reaches the model as the cell wrote it, on one line, up to 200 characters; in full mode the ledger keeps its first 60.
call_cell's input_file reads only a .json file of at most 1MB under ~/.stemseal/inputs (or STEMSEAL_INPUT_DIR), or under the folder the MCP server was started in when that folder is not a drive's top, your home folder or a folder above it. A relative name is looked up in the inputs folder first. When a file is not read, the reply names only the file, not the folders on your machine.
STEMSEAL_LOG=minimal이면 요청 문장 대신 해시와 계산 낱말 최대 4개(세포 설명이나 정해진 목록에 있는 낱말만, 그 목록의 표기로)만 남아 이름, 전화번호, 나머지 문장은 남지 않습니다. 세포 오류도 예외 종류만 남고, 예시는 남지 않습니다. off면 장부를 쓰지 않습니다. minimal로 바꿔도 이미 쓰인 줄은 그대로라서, stemseal ledger로 확인하고 stemseal ledger --minimize로 직접 정리합니다(저절로 지우지 않음). 90일 지난 줄과 20MB를 넘는 오래된 줄은 MCP 서버를 띄울 때 ledger.1.jsonl로 옮겨집니다. input_file은 ~/.stemseal/inputs(또는 STEMSEAL_INPUT_DIR) 아래, 그리고 서버를 띄운 폴더가 드라이브 맨 위, 홈 폴더, 그 위 폴더가 아닐 때 그 폴더 아래의 1MB 이하 .json 파일만 읽습니다.
Tokens saved / 아낀 토큰
Every cell call records, in the same local ledger, what it cost and what it saved. It is always on and never leaves your machine.
cost: the call the model wrote plus the reply it read, estimated from the text (1 token per 4 ASCII characters, 1 per Hangul or other character). stemseal never sees your model's tokenizer.
baseline: the tokens the same model spends doing the job without the cell, measured per cell and per model.
saved = baseline − cost. Negative stays negative. A refused call saves nothing (saved = −cost), and the tokens spent on
find_cellare subtracted from the total.
Measured and estimated numbers are kept apart. A model with no measurement of its own gets the smallest baseline measured on any other model, marked estimate. A cell with no measurement at all gets no number (none), never a guess.
stemseal savings --days 30 # totals by cell, model and day
stemseal measure vat_supply_price qwen2.5:3b # measure a baseline with your local Ollama model (5 cases)세포를 부를 때마다 든 토큰과 아낀 토큰이 같은 장부에 저절로 남습니다. 끄는 옵션은 없고, 내 컴퓨터 밖으로 나가지 않습니다. 아낀 양은 "세포 없이 같은 일을 할 때 그 모델이 쓰는 토큰(기준값)"에서 이번 호출에 든 토큰을 뺀 값입니다. 기준값은 세포마다, 모델마다 stemseal measure로 잽니다. 실측과 추정은 섞지 않고, 잰 적 없는 세포에는 숫자를 지어내지 않습니다.
Safety
Cells run in a separate python -I process with a timeout, and only after the purity gate. This is process isolation, not an OS sandbox. Every cell here was reviewed before locking, and stemseal verify lets you check that none changed.
That process runs under limits set before it receives the cell: the call's time limit for both wall and CPU time, 256 MB of memory (not enforced on macOS, where only time limits apply), no child processes (on Linux and macOS this needs a regular user: the system exempts root, and stemseal verify says so), no file content written and 16 open files (Linux, macOS; creating, emptying, renaming or removing files is stopped by the runner's audit hook, not by these limits), no core dumps, and lower priority, so the rest of the machine comes first. STEMSEAL_MEM_MB can lower the memory limit, not raise it. If the limits cannot be applied, the cell does not run and the call answers not_available.
License
MIT. See LICENSE.
Available Tools
4 toolscall_cellA
Run a locked cell found with find_cell (use its exact name; do not guess names). Use the cell's required input keys exactly, as in its input example. Pass its input either inline as input or, for large data, as input_file (path to a JSON file holding the input object) so the data need not be retyped. Returns status ok (verified result), not_available, or invalid_input. Never invents a result. If refused, the reply's how_to_fix shows the exact input to send again.
Inputs: cell (required), input, input_file.
find_cellA
Call this first whenever the user asks for a number worked out by rules: wages, salary, rates, growth, margins, prices, percentiles, calories, currency, leave days and similar. Verified cells give the exact checked answer, and small models get these wrong when computing alone. State the need in plain words. Returns the cells that fit, each with its required inputs and an input example, or an empty list when nothing fits.
Inputs: need (required), words.
list_cellsA
List every locked cell on this machine with what it computes and its required inputs. Cheap; use it when unsure what exists.
Inputs: no named parameters.
request_cellA
Ask for a cell that does not exist yet. When find_cell had nothing that fits (or only something close but different), say in one sentence what you needed computed. The request is saved, requests asked alike are counted together, and cells are made in the order they are asked for, so the next time this calculation comes up there may be an exact answer waiting. Only need is required.
Inputs: need (required), example.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The four tools have mostly distinct purposes: list_cells enumerates all cells, find_cell searches by need, call_cell executes, and request_cell creates new requests. However, list_cells and find_cell both serve discovery, which could cause some confusion, though the descriptions clarify when to use each.
All tools follow a verb_noun pattern (list_cells, request_cell, call_cell, find_cell), which is consistent. The only minor inconsistency is that list_cells uses plural 'cells' while the others use singular 'cell'.
Four tools is well-scoped for this registry of locked computation cells. Each tool covers a distinct operation (discover, execute, request) and none feels redundant or excessive.
The tools cover the full lifecycle for a locked cell registry: discovering cells (find and list), executing them (call), and requesting new ones (request). There are no obvious gaps such as update or delete, which are likely unnecessary for immutable locked cells.
Maintenance
Related MCP Connectors
AI memory governance & hallucination-blocking MCP server with verifiable knowledge cells.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
MCP delegation fallback for AI agents to discover capabilities, knowledge, tools, and collaborators.
Mycel: hire AI agents over MCP. Keyless discovery, self-service agent keys, pay per hire.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceConnects local LLMs to external tools (calculator, knowledge base) via MCP protocol, enabling automatic tool detection and execution to enhance query responses.MIT
- AlicenseAqualityDmaintenanceMCP server that gives small LLMs verified symbolic-math & logic tools.62Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables cloud LLM agents to discover and invoke physical hardware on edge and IoT devices through standard MCP tools, bridging constrained device channels like UART, BLE, and Wi-Fi.3MIT
- FlicenseNot gradedqualityCmaintenanceEnables an LLM to perform safe arithmetic calculations and web searches through a standardized MCP interface, returning results to generate informed responses.-