Use fortranspire from Claude Code¶
fortranspire ships a ready-to-install Claude Code skill
so Claude can analyze, port, and document Fortran 90 code from inside
the IDE — no MCP plumbing required.
Local skill (recommended)¶
The skill is skills/claude-code/fortranspire/ in the repo. Copy it
into your project’s .claude/skills/:
pip install fortranspire # the actual binary
# In whatever Claude-Code project you want to use it from:
mkdir -p .claude/skills
cp -r <fortranspire-repo>/skills/claude-code/fortranspire .claude/skills/
…then reload Claude Code. The /fortranspire slash command appears,
and Claude auto-invokes the skill on Fortran-related requests.
The skill’s SKILL.md
documents every subcommand and includes a decision flow — Claude always
runs fortranspire explain first (zero LLM cost, tells you whether the
file is portable) before recommending the paid gpu or translate
verbs.
What needs the LLM, and what doesn’t¶
Verb |
LLM call? |
API key needed? |
|---|---|---|
|
No |
No |
|
No |
No |
|
No |
No |
|
No |
No |
|
No |
No |
|
No |
No |
|
No |
No |
|
No |
No |
|
Yes |
Yes |
|
Yes |
Yes |
|
Yes |
Yes |
|
Yes |
Yes |
For LLM verbs, see LLM endpoints.
Remote MCP (advanced)¶
If your Claude Code is configured to talk to an MCP server (e.g., on a
shared GPU host), point it at a running fortranspire mcp:
# On the server
fortranspire mcp --port 8000
# or with env vars for the container
MCP_HOST=0.0.0.0 MCP_PORT=8000 fortranspire mcp
…and register http://<host>:8000/sse in Claude Code’s MCP settings.
The server exposes nine tools — the same surface as the CLI minus the
format / diff / report verbs which are best run locally on the
user’s filesystem:
analyze_kernels— static analysis, optional SARIF outputexplain_port_cost— pre-flight estimate (no LLM)build_call_graph— Mermaid call-graphgenerate_docs—!>docstring injection (no-LLM or LLM-driven)translate_kernel_gpu— Phase 1 porttranslate_kernel— Phase 2 JAX translationprofile_kernels— performance comparisonask_agent— natural-language queryagent_status— server config dump
When FORTRANSPIRE_TOKENS_FILE or API_KEY is set, the MCP server runs
authenticated with rate-limiting + HMAC-signed audit logs
(docs/concepts/security.md).
Troubleshooting¶
/fortranspirenot in the slash-command menu — verify.claude/skills/fortranspire/SKILL.mdexists and Claude Code has been reloaded (close and re-open the project).Claude says “fortranspire: command not found” —
pip install fortranspirein the same venv Claude Code uses, or in~/.local/binif you’re using system Python.LLM verb fails with “no MISTRAL_API_KEY” — add the key to
.envat the project root, or export it in the shell Claude Code spawns (~/.zshrc,~/.bashrc).