Fortran Companion MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| explain_best_practicesA | Returns a comprehensive guide of modern Fortran coding standards, design patterns, and practices. |
| lint_codeA | Statically analyzes a string of Fortran code for legacy syntax, implicit typing, missing intents, and bad practices. |
| lint_fileA | Statically analyzes a local Fortran source file for legacy syntax, implicit typing, missing intents, and bad practices. |
| format_codeB | Auto-formats a string of Fortran code using fprettify to enforce modern indentation and spacing. |
| format_fileA | Auto-formats a local Fortran file in-place using fprettify to enforce modern indentation and spacing. |
| initialize_projectA | Initializes a new, modern Fortran project at the specified path. Uses fpm if available, or bootstraps a standard layout with a Makefile. |
| compile_projectA | Compiles the Fortran project. Automatically detects and runs 'fpm build' or 'make' depending on layout. |
| run_testsA | Runs tests for the project. Automatically detects and runs 'fpm test' or 'make test' depending on layout. |
| suggest_design_patternA | Provides boilerplate templates and architectural explanations for modern Fortran design patterns mapping to GoF / Refactoring.Guru. |
| suggest_refactoringA | Analyzes a block of Fortran code and suggests modern design patterns and refactoring options mapped to Refactoring Guru. |
| suggest_refactoring_fileA | Analyzes a local Fortran file and suggests modern design patterns and refactoring options mapped to Refactoring Guru. |
| modernize_fileC | Performs automated syntax replacements to jumpstart modernizing a legacy Fortran file. Updates obsolete operators, converts legacy types, and formats spacing. |
| verify_regressionA | Runs a legacy binary and a modernized binary, comparing their outputs to verify that the refactoring has no regressions. |
| rename_legacy_identifiersA | Safely renames legacy variables to descriptive modern names across a file scope. Validates scope rules, renames variables in code while preserving comments, and builds using compiler flags to verify correctness. |
| convert_common_to_moduleB | Extracts a legacy COMMON block and generates an encapsulated modern Fortran module. Comments out the legacy COMMON statement and inserts matching module imports. |
| analyze_pure_candidatesA | Scans procedures in a file and identifies subprograms suitable for 'pure' or 'elemental' attributes. Helps promote parallelization, vectorization, and side-effect-free code design. |
| audit_implicit_interfacesA | Audits the project and lists all subroutine/function calls lacking an explicit interface. Prevents runtime memory crashes and type mismatches. |
| scaffold_unit_testB | Generates unit testing templates for a specific module procedure. Inspects dummy arguments, intents, and shapes, and registers the test target. |
| scaffold_hpc_gridB | Bootstraps a modern HPC template for grid/stencil calculations using Coarrays or OpenMP. Sets up stencil iteration loops and ghost cell exchange wrappers. |
| generate_c_bindingsB | Auto-generates a standard C binding layer module for a modern Fortran module. Maps Fortran types to C-compatible types using iso_c_binding, and generates bind(c) wrapper interfaces. |
| generate_python_interfaceA | Auto-generates ctypes/numpy binding wrapper scripts for Python integration. Also calls generate_c_bindings first to ensure the C-binding Fortran code is present. |
| project_metricsA | Computes project-wide quality metrics and generates a 'legacy heatmap'. Scans all Fortran files in the project, aggregates lines of code, comment density, counts legacy constructs (COMMON, EQUIVALENCE, GOTO, etc.), and assigns a modernization score. |
| dependency_graphA | Computes module dependency graph and detects modules exposing mutable public state. Scans all Fortran modules in the project, identifies 'use' statements (excluding standard intrinsics), computes fan-in/fan-out metrics, and generates a Mermaid diagram representing the module hierarchy. |
| find_large_unitsA | Detects oversized procedures and modules (complexity / 'god-unit' analysis). Analyzes physical lines, actual code lines, maximum control-flow nesting depth, and SELECT CASE arity across the project. Highly useful for detecting decomposition targets. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/enkiEng/fortran-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server