nonmem-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| NONMEM_NMFE_PATH | No | Path to the NONMEM nmfe executable (e.g., /opt/NONMEM/nm75/run/nmfe75). Required for executing NONMEM runs via the submit_run tool. |
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": false
} |
| prompts | {
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| read_ext_fileA | Parse a NONMEM .ext file to extract parameter estimates, standard errors, OFV, eigenvalues, and condition number. |
| read_lst_fileA | Parse a NONMEM .lst file for termination status, minimization success, shrinkage, condition number, and warnings. |
| parse_control_streamA | Parse a NONMEM control stream (.ctl/.mod) into structured components: $THETA, $OMEGA, $SIGMA, $EST options, input columns, data file, and ADVAN/TRANS. |
| read_nm_datasetA | Read and summarize a NONMEM dataset: subject count, observation count, dose records, missing values, and column overview. |
| read_nm_tablesB | Parse NONMEM table output files (SDTAB, PATAB, etc.) and compute summary statistics for key columns (CWRES, PRED, IPRED, ETAs). |
| compare_modelsA | Compare multiple NONMEM runs by OFV, delta-OFV, parameter counts, and AIC. Accepts a list of run directories or .ext file paths. |
| summarize_runB | Generate a comprehensive summary of a NONMEM run by combining control stream, .ext, and .lst results. |
| list_runsA | Scan a project directory for NONMEM run files and list their status (completed/failed/running). |
| submit_runA | Submit a NONMEM run (async). Returns a job ID for polling. Requires NONMEM installation. |
| check_run_statusB | Check the status and progress of a submitted NONMEM run by job ID. |
| get_run_resultsB | Get full parsed results of a completed NONMEM run by job ID. |
| cancel_runA | Cancel a running NONMEM job. |
| run_diagnosticsA | Run comprehensive post-run diagnostics: boundary checks, condition number, shrinkage, precision (RSE), convergence warnings. No NONMEM needed. |
| execute_psn_vpcA | Run VPC using PsN (async). Returns job ID for polling. Requires PsN + NONMEM. |
| execute_psn_bootstrapA | Run bootstrap using PsN (async). Returns job ID for polling. Requires PsN + NONMEM. |
| check_psn_statusC | Check status and progress of a PsN VPC or bootstrap job. |
| parse_psn_resultsA | Parse results from an existing PsN output directory (VPC or bootstrap). No PsN/NONMEM installation needed. |
| check_nonmem_setupA | Check NONMEM, PsN, R, and mrgsolve installation status and paths. |
| translate_to_mrgsolveA | Translate a NONMEM control stream (.ctl/.mod) to mrgsolve model code. Handles ADVAN1-13, THETAs, OMEGAs, $PK, $DES, $ERROR. |
| simulate_mrgsolveA | Run a simulation using mrgsolve (R). No NONMEM needed. Provide model code or model file path. |
| generate_vpc_dataA | Generate VPC data using mrgsolve + vpc R package. No NONMEM needed. Requires observed data and model. |
| check_r_setupA | Check R installation and required packages (mrgsolve, vpc, dplyr, ggplot2). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| review_model | Review a NONMEM model for errors, best practices, and improvement suggestions |
| interpret_results | Interpret NONMEM run results in pharmacological context |
| troubleshoot_run | Diagnose why a NONMEM run failed or produced warnings |
| suggest_next_model | Suggest what to try next in model development based on current results |
| write_methods_section | Draft a Methods section for a publication based on the final model |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 22 tools
Most tools have clearly distinct purposes, such as 'cancel_run' for job cancellation versus 'submit_run' for job submission. However, some overlap exists, like 'check_run_status' and 'list_runs' both providing run status information, which could cause mild confusion in selection.
Tool names follow a highly consistent verb_noun pattern throughout, such as 'cancel_run', 'check_nonmem_setup', and 'parse_control_stream'. There are no deviations in naming conventions, making the set predictable and readable.
With 22 tools, the count is borderline high for a NONMEM-focused server, potentially feeling heavy. While many tools are specialized for tasks like diagnostics and parsing, the number might overwhelm agents, though it aligns with the comprehensive scope of NONMEM modeling workflows.
The tool surface provides complete coverage for NONMEM modeling, including setup checks, job submission, status monitoring, result parsing, diagnostics, and simulation. There are no obvious gaps, supporting full lifecycle management from data input to analysis and visualization.