raspa-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| RASPA_MCP_WORKSPACE_BASE | No | Base directory for all workspace files created during simulation. All write operations are sandboxed under this path. | ~/raspa_workspaces |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_simulation_typesA | List all RASPA2 simulation types with descriptions and typical use cases. Call this first to decide which simulation type fits the user's goal. |
| get_simulation_templateA | Return the canonical simulation.input template for the given simulation type. The template contains ${PLACEHOLDER} markers — replace them with actual values before writing the file. Also returns parameter documentation explaining each placeholder. |
| list_available_forcefieldsA | List all built-in force fields with their molecule targets, references, and applicability notes. Use this to decide which force field to use. |
| get_forcefield_filesA | Return the complete content of pseudo_atoms.def and force_field_mixing_rules.def for the given force field. These files must be placed in the simulation working directory alongside simulation.input. Args: forcefield_name: e.g. "TraPPE-CO2", "TraPPE-N2", "TraPPE-CH4" |
| recommend_forcefieldA | Given a molecule name (common name, formula, or IUPAC), recommend the most appropriate built-in force field and provide literature guidance. For molecules NOT in the built-in library, returns structured guidance on how to find parameters from literature using Semantic Scholar. Args: molecule: e.g. "CO2", "methane", "PH3", "SO2", "water" |
| list_available_moleculesA | List all built-in molecule definitions with metadata. Molecules not listed here require manual .def file construction. |
| get_molecule_definitionA | Return the content of the RASPA2 molecule definition file (.def) for a built-in molecule. The file must be placed at: /molecules/TraPPE/.def Args: molecule_name: e.g. "CO2", "N2", "CH4", "H2O", "helium" |
| create_workspaceA | Create a properly structured RASPA2 simulation workspace directory. RASPA2 expects a specific directory layout. This tool creates it and copies the CIF file into the right location. Structure created: / simulation.input ← Claude writes this force_field_mixing_rules.def ← Claude writes this pseudo_atoms.def ← Claude writes this frameworks/ / .cif molecules/ TraPPE/ ← Claude writes .def files here Args: work_dir: Absolute path for the new simulation directory. framework_name: Name matching the CIF file (without .cif extension). cif_source_path: Absolute path to the existing CIF file. Security:
|
| validate_simulation_inputA | Validate the content of a RASPA2 simulation.input file BEFORE running. Returns errors (blocking — must fix) and warnings (advisory). Always call this after generating simulation.input and before running simulate. Args: content: Full text content of the simulation.input file. |
| parse_raspa_outputA | Parse RASPA2 output files and return structured results as JSON. Extracts: loading (mol/kg, mg/g, cm³STP/g), Henry coefficients, void fraction, energies (including Qst and mu_ex), and builds an isotherm table if multiple pressure points are detected. Args: output_dir: Path to the Output directory produced by RASPA2, typically '/Output/System_0/'. |
| parse_rdf_outputA | Parse RASPA2 radial distribution function (RDF) output files (3-3). RASPA2 writes RDF data to RDF__.dat files when 'ComputeRDF yes' is set in simulation.input (requires NVT-MC or NVT-MD simulation). Returns r(Å) and g(r) arrays per pair, plus first-peak position — useful for identifying preferred adsorption sites and coordination shells. component_a / component_b: optional name filters (e.g. "CO2", "framework"). Leave empty to return all RDF datasets in the output directory. Args: output_dir: Path to RASPA2 Output directory. component_a: Optional filter: only return pairs containing this name. component_b: Optional filter: only return pairs containing this name. |
| calculate_selectivityA | Calculate adsorption selectivity S_AB from mixture GCMC results (4-4). Uses the adsorption selectivity definition: S_AB = (x_A / x_B) / (y_A / y_B) where x = adsorbed-phase mole fraction, y = gas-phase (feed) mole fraction. Inputs come from parse_raspa_output()["components"] for a GCMCMixture simulation. loading_a / loading_b: average loading of each component in mol/kg (or any consistent units — they cancel in the ratio). feed_fraction_a / feed_fraction_b: mole fractions in the feed gas (must sum to 1.0 for a binary; for partial fractions in a larger mixture, pass the relevant pair). Returns S_AB > 1 means the material prefers A over B. S_AB < 1 means preference for B. S_AB = 1 means no selectivity. |
| parse_msd_outputA | Parse RASPA2 MSD files and compute self- or collective-diffusion coefficients (2-1/3-1/3-2). Requires a completed NVT-MD or NPT-MD simulation with 'ComputeMSD yes' set. RASPA2 writes MSDSelf_.dat (self-diffusion) and MSDCollective_.dat. The Einstein relation D = MSD(t) / 6t is fitted to the linear regime (latter 50% of trajectory). Result is given in A²/ps and m²/s. Typical self-diffusivities in MOFs:
Args: output_dir: Path to RASPA2 Output directory. molecule: Optional filter by molecule name (e.g. "CO2"). diffusion_type: "self" (MSDSelf) or "collective" (MSDCollective). |
| parse_ti_outputA | Parse RASPA2 Thermodynamic Integration (TI) output and compute ΔA (1-8). Expects one completed RASPA2 simulation per lambda value (0.0 → 1.0), each in its own subdirectory. The subdirectory name should contain the lambda value (e.g. 'lambda_0.3/', '0.3/', etc.). RASPA2 must be run with Lambda and LambdaDefinition set in simulation.input. Each output file must contain a line matching: Average <dU/dlambda>: X.XXXXX +/- Y.YYYYY [K] KNOWN LIMITATION: The exact format of this line varies between RASPA2 versions and build options. If status='no_ti_data' is returned, check:
The function integrates ⟨∂U/∂λ⟩ over λ using the trapezoidal rule: ΔA = ∫₀¹ ⟨∂U/∂λ⟩ dλ [K] → ×R → [kJ/mol] Fewer lambda points = less accuracy:
Args: output_dir: Root directory containing per-lambda subdirectories. |
| parse_density_gridA | Parse RASPA2 3D density grid files and extract a 2D slice (3-4). RASPA2 writes .grid files when the simulation.input contains: WriteDensityProfile3DVTKGrid yes DensityAveragingTypeVTK number_of_molecules The 3D grid is stored as Nx×Ny×Nz float values (row-major). This function returns the full grid metadata and ONE 2D slice. Pass the returned 'slice_data' field to plot_density_slice() to save a PNG. KNOWN LIMITATION: This tool returns a 2D cross-section only, NOT a full 3D isosurface or volumetric render. For true 3D visualization (isosurfaces, volume rendering), export the raw 'slice_data' and use external tools such as VESTA, py3Dmol, or ParaView with the original .grid/.vtk file. To explore different planes, call this tool multiple times with different slice_axis ('x','y','z') and slice_index values. KNOWN LIMITATION: The .grid ASCII format written by RASPA2 has minor variations across versions (header line count differs). If parsing fails (status='no_grid_files' or 'warning' in dataset), verify that WriteDensityProfile3DVTKGrid is set and check the raw file header. Args: output_dir: Path to RASPA2 Output (or parent) directory. molecule: Optional filter on molecule name (e.g. "CO2"). slice_axis: Axis perpendicular to the slice: 'x'/'a', 'y'/'b', 'z'/'c'. slice_index: Grid-plane index along slice_axis; -1 = midpoint. |
| plot_density_sliceA | Render a 2D density slice from parse_density_grid() as a heatmap PNG (3-4). slice_data is the 'slice_data' field from parse_density_grid() — a 2D list of float density values. cell_lengths: optional [La, Lb] in Å for axis tick labels. axes_labels: optional [x_label, y_label], defaults to ["a (Å)", "b (Å)"]. colormap: matplotlib colormap name; 'hot', 'viridis', 'Blues' all work well. |
| get_parameter_docsA | Return documentation for RASPA2 simulation.input parameters. Args: parameter_name: Specific parameter name (e.g. "CutOff", "EwaldPrecision"), or None to get all parameters. |
| check_raspa2_environmentA | Check whether RASPA2 is correctly installed and configured on this server. Verifies:
Returns a full diagnostic report. If ready=False, run: raspa-mcp-setup (compiles RASPA2 from source). |
| plot_isothermA | Generate a single-MOF adsorption isotherm plot (PNG). isotherm_data is a list of dicts, each with at least:
Typical source: the "isotherm" list returned by parse_raspa_output() when multiple pressure-point simulations are run and their outputs placed in sub-directories named by pressure value. pressure_unit: unit of pressure values in isotherm_data (Pa, bar, kPa). loading_key: key name for the loading column (e.g. "loading_mol_kg", "loading_mg_g", "loading_cm3_STP_g"). output_path: absolute path where the PNG file will be saved. Returns: {"status": "ok", "path": ..., "n_points": ...} or {"status": "error", "message": ...} |
| plot_isotherm_comparisonA | Generate a multi-MOF comparison isotherm plot (PNG) — all MOFs on one figure. datasets is a list of dicts, each representing one MOF: { "label": "MIL-101(Cr)", # legend label "isotherm_data": [{...}, {...}, ...] # same format as plot_isotherm() } Designed for the final "top-N candidates" comparison step: pass in the isotherm_data from each MOF's parse_raspa_output() call together with a descriptive label, and receive a single publication-ready comparison figure. pressure_unit / loading_key: same semantics as plot_isotherm(). output_path: absolute path where the PNG will be saved. Returns: {"status": "ok", "path": ..., "n_series": ...} or {"status": "error", "message": ...} |
| generate_force_field_defA | Generate With no extra arguments, produces the safe minimal "3 zeros" form, which is
what most users actually need when their LJ parameters live in
DO NOT confuse this file with Args:
work_dir: Workspace directory (must be inside |
| generate_force_field_mixing_rules_defA | Generate Each For the "shifted vs truncated" choice, Args:
work_dir: Workspace directory (sandboxed).
atom_types: Required list of atom-type dicts.
general_mixing_rule: |
| generate_pseudo_atoms_defA | Generate Each |
| generate_molecule_defA | Generate a per-molecule
Set |
| inspect_cifA | Inspect a CIF file: formula, cell parameters, charge column status, minimum interatomic distance. Flags common pitfalls (no charges, non-neutral cell, atom overlap). Use before launching a simulation against an unfamiliar CIF. |
| recommend_supercellA | Recommend an integer supercell (nx, ny, nz) such that each axis is at
least 2 × |
| preflight_workspaceA | Validate a workspace directory before launching Checks:
Returns |
| get_workflow_recipeA | Return an ordered, tool-by-tool recipe for a common RASPA2 scenario. Args:
scenario: One of |
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/lichman0405/raspa-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server