SolidInvoice
Create and send invoices and quotes, manage clients, and track payments in SolidInvoice.
Point-in-time exchange trading rules with sources: A-share price limits, stamp duty, ticks, futures
Lists are ordered by a usage score (out of 100) built from these parts
| Popularity | 4/80 | GitHub stars or weekly downloads: the larger counts 60, the smaller 20 |
|---|---|---|
| Freshness | 12/12 | Full marks for a release or code change within 30 days |
| Still answering | 0/8 | The cloud endpoint answered at the last check |
| Usage score | 16/100 |
Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)
Pick the AI app you use, then copy the settings.
Let your AI install it with one sentence
Please install Marina rules. Follow https://mcp.popnx.com/i/david-marina-marina-rules.md, show me the commands and wait for my OK before running them.Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads
Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 16, 2026
First: which AI do you use?
Pick your app and the steps appear below.
Works with Claude, with some setup first
Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.
Please install the MCP server Marina rules for Claude on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "marina-rules": { "command": "uvx", "args": [ "marina-rules", "mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Marina rules tools really show up.This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.
Already installed? Check first · Open Terminal, type this command and press Enter
uv --versionMac: press ⌘ + Space, type Terminal, press Enter
Windows: open Start, type Windows PowerShell, then Open
Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required
When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version
Install once; it works for everything that needs uv
SettingsDeveloperEdit Config
{
"mcpServers": {
"marina-rules": {
"command": "uvx",
"args": [
"marina-rules",
"mcp"
]
}
}
}Use Marina rules and tell me what you can do for me, then show me one thing✓ If Claude says it is using Marina rules or shows a Marina rules tool in the answer, you are connected
Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version
ChatGPT cannot connect Marina rules yet
Marina rules runs on your computer, but ChatGPT can only connect servers that run on the web
A · Use an app that can connect Marina rules
B · Others in Accounting, finance & tax that work with ChatGPT
Picked from the most used in the same category, only ones that connect by address with no key
Works with Claude Code, with some setup first
Install Python (uv) on your computer first (one time)
Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.
Please install the MCP server Marina rules for Claude Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user marina-rules -- uvx marina-rules mcp 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Marina rules tools really show up.This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.
Already installed? Check first · Open Terminal, type this command and press Enter
uv --versionMac: press ⌘ + Space, type Terminal, press Enter
Windows: open Start, type Windows PowerShell, then Open
Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required
When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version
Install once; it works for everything that needs uv
Mac: press Command+Space and type Terminal · Windows: open PowerShell
claude mcp add --scope user marina-rules -- uvx marina-rules mcpYou should see Marina rules listed as connected
Use Marina rules and tell me what you can do for me, then show me one thing✓ If Claude Code says it is using Marina rules or shows a Marina rules tool in the answer, you are connected
Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version
Works with Cursor, with some setup first
Install Python (uv) on your computer first (one time)
Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.
Please install the MCP server Marina rules for Cursor on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "marina-rules": { "command": "uvx", "args": [ "marina-rules", "mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Marina rules tools really show up.This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.
Already installed? Check first · Open Terminal, type this command and press Enter
uv --versionMac: press ⌘ + Space, type Terminal, press Enter
Windows: open Start, type Windows PowerShell, then Open
Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required
When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version
Install once; it works for everything that needs uv
Use Marina rules and tell me what you can do for me, then show me one thing✓ If Cursor says it is using Marina rules or shows a Marina rules tool in the answer, you are connected
Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version
Works with VS Code, with some setup first
Install Python (uv) on your computer first (one time)
Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.
Please install the MCP server Marina rules for VS Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "marina-rules": { "type": "stdio", "command": "uvx", "args": [ "marina-rules", "mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Marina rules tools really show up.This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.
Already installed? Check first · Open Terminal, type this command and press Enter
uv --versionMac: press ⌘ + Space, type Terminal, press Enter
Windows: open Start, type Windows PowerShell, then Open
Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required
When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version
Install once; it works for everything that needs uv
Use Marina rules and tell me what you can do for me, then show me one thing✓ If VS Code says it is using Marina rules or shows a Marina rules tool in the answer, you are connected
Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version
Claude Code
claude mcp add --scope user marina-rules -- uvx marina-rules mcpClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"marina-rules": {
"command": "uvx",
"args": [
"marina-rules",
"mcp"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"marina-rules": {
"command": "uvx",
"args": [
"marina-rules",
"mcp"
]
}
}
}VS Code (mcp.json)
{
"servers": {
"marina-rules": {
"type": "stdio",
"command": "uvx",
"args": [
"marina-rules",
"mcp"
]
}
}
}These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.
pypi: marina-rulesBased on how this server connects and on each app’s own docs, checked Nov 10, 2026.
Run on your computer in
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
Runs on your computer; the tool list appears in your AI app after you install it.
We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 20, 2026
The registry name was verified with the GitHub account David-Marina, which owns the repo
Code last changed 4 days ago
Uses MIT
This one runs on your computer; there is no internet endpoint
Runs on your computer and uses local settings instead
Runs on your computer; we can only read tool lists from internet endpoints
No entries on OSV.dev for marina-rules@2026.11.16
Checks only this package version, not every dependency · checked Nov 16, 2026
If you made this, paste this code into your README. The badge links back to this page.
[](https://mcp.popnx.com/en/servers/david-marina-marina-rules)Ask, share a tip or report that it does not work. Sorted by what people marked helpful.
No posts yet. Be the first to ask or share.
Posts here are written by users, not the PopNx team.
No reviews yet
Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.
It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.
The registry does not list a required key, though some servers ask you to sign in on first use.
It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).
The GitHub repo last changed 4 days ago, and the latest version (2026.11.16) reached the registry 4 days ago.
Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Python (uv) on your computer.
In the same category: SolidInvoice, Signal8, Journalit, Beancount.io, Tapetide - Indian Stock Market MCP
Same category, other makers, commands already checked. Official ones first, then by stars.
Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi
Create and send invoices and quotes, manage clients, and track payments in SolidInvoice.
Trading journal in Obsidian. Ask Claude or ChatGPT about your trades; edits are previewed first.
Query, edit, and reconcile a hosted Beancount ledger: BQL, reports, files, and bank imports.
48 tools for ~8,000 NSE & BSE stocks: quotes, screener, financials, filings, FII/DII, options
| This one Marina rules | SolidInvoice | Signal8 | Journalit | Beancount.io | Tapetide - Indian Stock Market MCP | |
|---|---|---|---|---|---|---|
| Runs where | Installs on your computer | Runs in the cloud, nothing to install | Cloud or install on your computer | Runs in the cloud, nothing to install | Runs in the cloud, nothing to install | Cloud or install on your computer |
| Needs a key | No | No | Yes | No | No | Yes |
| Add with + in Claude | No | No | No | No | No | No |
| Basic checks | 3/3 | 4/6 | 5/5 | 4/4 | 4/4 | 5/5 |
| License | MIT | MIT | MIT | NOASSERTION | MIT | MIT |
| Price | No cost listed in the registry | No cost listed in the registry | No cost listed in the registry | No cost listed in the registry | No cost listed in the registry | No cost listed in the registry |
Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.
Auditable backtests: the exchange trading rules in force on each day, as data with sources.
Price limits, fees, trading sessions, ticks, settlement — every record says *when* a rule took effect and *where* it was published. A backtest asks for the rule of each trade date instead of hard-coding today's; marina-check then verifies every fill against the rules of its day and, on a strict pass, emits a stamp that anyone holding the same fill log and the same rules version can recompute; citation() names the exact, byte-pinned rules a result ran under.
What a stamp certifies is deliberately narrow: the fills respected these rules. It says nothing about look-ahead in prices, survivorship or overfitting. as_of closes one more gap: it answers only from rules that had been published by a given date, so a backtest cannot use a rule change before it was announced (a rule whose publication date was not located is refused, not assumed).
Use it to check that a backtest applied the rules in force on each day — China A-share daily price limits (limit-up / limit-down), stamp duty and transfer fees, tick sizes and sessions; futures margins, limits and fees; Hong Kong and US equity rules — and to validate a fill log against them (marina-check). It holds rules only: no prices, index constituents, ST or suspension lists, adjustment factors or trading calendars.
中文 · 市场交易规则的「tzdata」:涨跌幅、费用、交易时段、tick 等制度从哪天起、依据什么,每条记录都带官方原文出处、引文和内容哈希。它给回测引擎和 AI Agent 用——查不到就报错,不猜;
coverage()预检整段窗口,resolve()返回统一判定,diff_rules告诉你升级后哪些回测要重跑。目前覆盖 A 股、中金所股指期货与国债期货、上期所 / 上期能源 / 郑商所 / 广期所商品期货(自 2024 年起)、港股和美股;大商所尚未覆盖,各市场的具体范围见 Coverage。CC0 数据 + MIT 代码。中文入门:README.zh-CN.md。
rules: marina-rules@2026.11.16 sha256:80188ec249ce22ae
Marina is to trading rules what the tz database is to time zones and what exchange_calendars is to trading days: small, boring, free, and meant to be the one copy everyone imports instead of the thousand copies everyone gets slightly wrong.
Status: 2026.11.16. 2873 records — 1421
verified, 1451single-source, 1unverified— each traced to primary sources with quotes and content hashes. Maturity differs by market: China A-share, CFFEX, SHFE and INE records are mostlyverified; CZCE, GFEX, Hong Kong and US records are mostlysingle-source— a first pass, to be read as such (counts per market, what the levels mean). China A-shares: price limits, fees, sessions, ticks and holding periods, measured from 2006-07-01; CFFEX stock-index futures from 2010; CFFEX treasury bond futures from 2013; SHFE (20 products, incl. night sessions), INE (5 products), CZCE (27 products, mostlysingle-source) and GFEX (5 products, no sessions yet): margin, price limits, fees and same-day round trips from 2024-01-01; Hong Kong shares and ETFs from 2010; US stocks and ETFs from 2010. DCE, crypto and other markets are not covered. Details per market: Coverage. Treat the exchange's own notice as authoritative, always.
What changed in each release, and which backtests a release asks you to re-run: CHANGELOG.md.
Every backtest engine, every trading agent, and every research notebook re-implements the same handful of rules — "ChiNext limit is 20%" — and a large share of them get the *date* wrong (it was 10% before 2020-08-24), the *scope* wrong (ST stocks differ), or the *rounding* wrong (exchanges round half-up; round() doesn't). These errors used to live in one firm's code. Now that AI agents write backtests by the thousand, the same error gets copied by the thousand.
A shared, cited, versioned table fixes this the way tzdata fixed time zones: not by being authoritative, but by being the same for everyone and traceable to the source.
examples/hardcoded_vs_marina.py prints six such fills side by side — the number a backtest gets from today's rule, and the number that applied on the trade date:
| fill | hard-coded with today's rule | rule of that day |
|---|---|---|
| ChiNext, 2020-08-21, previous close 10.00: limit-up / limit-down | 12.00 / 8.00 | 11.00 / 9.00 |
| ST main-board stock, 2024-06-14, previous close 10.00 | 11.00 / 9.00 | 10.50 / 9.50 |
| Main-board IPO in its first five days, 2024-01-30 | 11.00 / 9.00 | no limit |
| Sell 100,000 on 2008-04-23: stamp duty + transfer fee | 51.00 | 302.55 |
| Sell 100,000 on 2023-08-25 | 51.00 | 101.00 |
pip install marina-rules # self-contained: the dataset ships inside the wheel, byte-pinned
import marina_rules as mr
mr.rule_at("stamp_duty_sell", "2023-08-28") # 0.0005 mr.rule_at("price_limit_pct", "2020-08-23", "chinext", "XSHE") # 0.10 mr.limit_price(10.00, "chinext", "2021-03-01", "XSHE") # (12.0, 8.0) — exchange rounding mr.limit_price(10.00, "ipo_first5_main", "2024-01-30", "XSHG+XSHE") # None — unlimited band mr.rule_at("stamp_duty_sell", "2005-01-01") # KeyError — no defaults, ever mr.citation() # 'rules: marina-rules@ sha256:<16 hex>'
mr.coverage("XSHE", "chinext", ["price_limit_pct"], "2019-01-01", "2026-10-19")
Dates are ISO YYYY-MM-DD strings or date / datetime objects (a timestamp such as 2020-08-23 09:30:00 counts as its day). Any other spelling — 20200823, 2020/8/23, an integer — raises ValueError and names the ISO form. It is refused rather than parsed because record intervals are compared as ISO text: read as given, 20200102 would select the rule of a later period.
python -m marina_rules.diff <old> <new> # in a clone: what changed, and what must be re-run; git tags or data directories
A rule is answered only under the name it is recorded with, for a scope that exists. Look the names up instead of guessing them — from Python or from the command line (marina-rules and python -m marina_rules are the same program):
mr.scopes() # scope → description, and the context it requires ("hk" / "us" for those registries)
mr.rules_for("cffex_if", "CCFX") # {'margin_ratio': [[from, to], …], 'price_limit_pct_of_prev_settlement': […], …} mr.statutory_fee_floor(86420.00, "sell", "2023-08-28", "XSHG") # 44.0742 — stamp duty + transfer fee of one fill mr.statutory_fee_components(86420.00, "sell", "2023-08-28", "XSHG") # the same, per rule, with record ids mr.skill_text() # the usage notes (SKILL.md) shipped inside the package
marina-rules # lists the subcommands
marina-rules scopes # add hk or us for those registries marina-rules rules cffex_if CCFX # rule names of one scope, first / last date (--intervals for all) marina-rules query price_limit_pct 2024-06-14 st_main XSHE --context board=main_board,st_status=true marina-rules fees 86420 sell 2023-08-28 XSHG # components, record ids and their sum marina-rules skill # the usage notes
When a lookup finds nothing, the refusal says what does exist: a KeyError message names the rules the scope has (or the intervals the rule has), and a decision from resolve() carries the same as alternatives (scope_rules, similar_rules, rule_intervals, similar_scopes). Names only, never a value — a similar name is a different rule (price_limit_pct is a fraction of the previous close; futures scopes carry price_limit_pct_of_prev_settlement), so read its definition and ask again. tick_size falls back to the stock family for mainland securities scopes only: a futures, Hong Kong or US scope asked for tick_size is refused.
coverage() answers "can Marina serve every (rule, day) in this window for this scope?" — complete, partial (with the exact gaps), or unsupported. It also tells you what you must already know about each security to select the scope legitimately (required_context): Marina holds rules, never a security's ST or listing history, and it will not guess them for you. Gaps carry known_gap_ids when they match data/cn/known_gaps.yaml (Hong Kong: data/hk/known_gaps.yaml; US: data/us/known_gaps.yaml) — the list of things Marina knows it does not cover (pre-2006 sessions and convertibles, the 2013 T+0 switch for bond/money/gold ETFs…), each with a reason and a status, so "unsupported" can be cited rather than worked around. Agents: read SKILL.md.
The data is plain YAML under data/. You do not need the Python package; read the files from any language.
The same questions can be put to the dataset by an AI assistant through the Model Context Protocol, without writing code. The server runs locally over stdio.
pip install "marina-rules[mcp]" # adds the MCP Python SDK; the server needs Python 3.10+, the rest of the package 3.9+
marina-rules-mcp # the same server: marina-rules mcp, python -m marina_rules.mcp_server
Add it to the MCP client's configuration (most clients read this mcpServers shape; where the file lives differs per client). If the client does not start in the environment where the package is installed, give the full path to marina-rules-mcp.
{
"mcpServers": { "marina-rules": {"command": "marina-rules-mcp"} } }
| tool | answers |
|---|---|
resolve | one rule on one trading day for one scope: the decision of resolve(), acted on only when status is DETERMINED |
limit_price | limit-up / limit-down price from the previous close; unlimited: true when no daily limit applied |
statutory_fees | stamp duty and transfer fee of one A-share stock fill, per component and summed (commission not included) |
coverage | whether every (rule, day) of a backtest window can be answered for a scope, with the gaps |
list_scopes | the scopes of cn, hk or us and the context each requires |
list_rules | the rule names a scope holds, with their first and last dates |
check_fills | the marina-check checks on up to 500 fills passed inline as JSON (not a file path) |
citation | the citation line and version of the dataset |
Every answer carries citation. Arguments the library refuses (a date not written YYYY-MM-DD, an unknown side) and questions with no record in force come back as tool errors whose text says what to change or what is missing; no value is filled in. The usage notes (SKILL.md) are offered as the resource marina-rules://skill.
What it does not do: it is read-only and deterministic, uses no network, and reads no file but the dataset shipped in the package. Like the package, it holds rules only — no prices, ST or suspension lists, constituents or trading calendar; a security's board, ST status and listing day are the caller's to supply.
<!-- mcp-name: