Fibtec · pyvar.com · Claude Code plugins
Claude Code

385 functions,
right inside your agent.

8 domain skills, 5 architecture skills, and an MCP server exposing every pyvar function as a Claude Code tool — all generated straight from this repo, so none of it can drift out of sync with the live API.

13
Skills
1
MCP server
385
Functions as tools
MIT
Licence
Quickstart

Two commands to get started

# add the marketplace, once
$ /plugin marketplace add fibtecltd/pyvar

# install any skill…
$ /plugin install pyvar-market-risk@pyvar-marketplace

# …or the MCP server
$ /plugin install pyvar-mcp@pyvar-marketplace
1
Skills need nothing else
A skill is instructions Claude Code reads before touching that domain — architecture context, function signatures, routing notes on where the REST/async pattern differs from what you'd expect. No dependencies, no API key required just to install.
2
The MCP server needs a free API key
You'll be prompted for a pyvar API key during install — sign in and create one here (free, no password or credit card; it lasts a year and you can revoke it any time). Every tool call is a real HTTPS request against the live API, so results always match what's actually deployed.
3
The MCP server needs uv
The plugin starts the server with uvx pyvar-mcp, which downloads it from PyPI the first time, so uv must be on your PATH. If a tool call fails with "command not found", a missing uv is almost certainly why.
8 domain skills

One skill per risk domain

📈
pyvar-market-risk
68 functions: VaR, ES, stress, Greeks, P&L attribution, backtesting, GARCH, FRTB SA/IMA
Use case: a trading or market risk desk computing daily VaR/ES, running Basel traffic-light backtesting, or building FRTB SA/IMA capital numbers from inside a Claude Code session.
🏦
pyvar-credit-risk
55 functions: PD/LGD/EAD, IRB/SA, XVA full suite, IFRS 9 ECL, CDS, SA-CCR, scoring
Use case: a credit risk team computing IRB/SA regulatory capital, pricing XVA adjustments, provisioning IFRS 9 ECL, or scoring counterparty PDs for a credit committee memo.
💧
pyvar-liquidity-risk
40 functions: LCR, NSFR, HQLA, cash flow, ILAAP, intraday, LiqVaR
Use case: a treasury or liquidity risk team computing LCR/NSFR for a regulatory filing, building a cash-flow ladder, or running an internal ILAAP stress scenario.
⚠️
pyvar-operational-risk
44 functions: LDA, AMA, SMA, RCSA, KRI, scenario, BEICF, cyber/model/IT risk
Use case: an op risk team running LDA/AMA/SMA capital models, scoring RCSA control effectiveness, or tracking KRI breaches ahead of a risk committee report.
📊
pyvar-portfolio-analytics
50 functions: Markowitz/BL/risk-parity, Sharpe/Sortino, Brinson, FF5, PCA, HMM, ESG
Use case: a portfolio manager or quant running mean-variance/Black-Litterman/risk-parity optimisation, Brinson performance attribution, or ESG-integrated portfolio construction.
📋
pyvar-regulatory
30 functions: Basel III/IV, FRTB, ICAAP/SREP, MiFID II, EMIR, Solvency II, CRR2
Use case: a regulatory reporting or compliance team computing Basel III/IV capital ratios, checking MiFID II/EMIR transaction-reporting scope, or running a Solvency II SCR calculation.
∿
pyvar-derivatives
62 functions: BS/Heston/SABR/Dupire/LSM, exotic options, bonds, IRS/CDS, FX
Use case: a derivatives desk pricing vanilla or exotic options (Black-Scholes through Heston/SABR/LSM), valuing bonds/IRS/CDS, or computing FX derivative sensitivities.
⚖️
pyvar-alm
33 functions: Duration gap, NII/EVE, IRRBB 6 shocks, repricing, NMD, FTP
Use case: a treasury/ALM team computing duration gap, NII/EVE sensitivity under IRRBB's 6 standard shocks, or modelling non-maturity deposit behaviour.
5 architecture skills

How pyvar is actually built

Not risk domains — the infrastructure layers underneath them. Load these when you're extending pyvar itself, not just calling it: the Numba JIT rules, the Celery/SQS broker constraints, the storage and observability conventions this repo's own CLAUDE.md enforces.

🌐
pyvar-arch-api-gateway
FastAPI, Pydantic v2, JWT and API-key auth, orjson, rate limiting, OpenAPI
Use case: an engineer adding a new REST route, request/response schema, or auth/rate-limit rule to pyvar's own FastAPI layer.
📥
pyvar-arch-data-ingestion
Polars lazy scan, PyArrow, Parquet, Arrow IPC, schema validation
Use case: an engineer wiring a new market-data source or file format into pyvar's Polars/PyArrow ingestion layer.
⚙️
pyvar-arch-compute
NumPy/Numba JIT, SciPy, Dask, Ray, Celery+Redis task dispatch
Use case: an engineer adding a new Numba-JIT compute kernel or Celery async task to pyvar's own risk engine.
🗄️
pyvar-arch-storage
Redis cache, PostgreSQL/SQLAlchemy, S3/MinIO Parquet object store
Use case: an engineer touching pyvar's Redis result cache, its PostgreSQL/SQLAlchemy audit schema, or S3/MinIO Parquet storage.
📡
pyvar-arch-observability
Prometheus, Grafana, Sentry, Bandit, input validation security
Use case: an engineer adding a Prometheus metric, a Sentry integration, or a Bandit-checked security fix to pyvar's own stack.
The MCP server

Two tools to start.
385 more if you need them.

Use case: anyone who wants to call any of the 385 pyvar risk functions directly from a Claude Code session or Claude.ai chat — pricing an option, computing a VaR, checking a capital ratio — without writing HTTP client code by hand.

list_pyvar_functions(domain?)
Browse available functions, optionally filtered to one domain — alm, credit-risk, derivatives, liquidity, market-risk, operational, portfolio, regulatory.
call_pyvar_function(domain, function_name, params)
Call any function by name, with params validated against that function's own schema before the request goes out. These two tools are the intended first choice — reaching for one generic dispatcher over guessing among 385 individually named tools keeps tool selection reliable at this scale.

Every one of the 385 functions is also registered as its own precisely-typed tool — alm_stress_test, historical_simulation_var, and so on — for when you already know exactly which one you want.

# thin wrapper, not a bundled engine —
# every call is a real HTTPS request
# against the live pyvar API

tool call_pyvar_function(
  domain="market-risk",
  function_name="historical_simulation_var",
  params={...}
)
source of truth

Generated, not hand-maintained.

All 13 skills and the MCP server's 385+2 tools are generated straight from this repo's own skills and function catalogue — CI fails if the committed output ever drifts from what regenerating produces.