About MS MCP
MS MCP is an MCP server published by DrYe1109 in the Healthcare category: mCP stdio server for Microsoft SQL Server with multi-database query support and safe-mode write protection. Conduid read 33 tools from its source: ms_castep, ms_codex_config, ms_create_molecule, ms_enqueue_materialscript, ms_forcite, ms_gui_add_vacuum_current and 27 more. No package is published for it, so it installs from a source checkout.
The repository has 32 stars and 2 forks, and its last commit was on 18 Jul 2026. Conduid has no tagged release on record for it. Its topics include mssql and sql-server.
Install
git clone https://github.com/DrYe1109/MS-MCPTools (33)
ms_castepRun a CASTEP task or preset calculation on an input document located under the MS-MCP work root. Presets include Energy, GeometryOptimization, Frequency/phonons, DOS, band structure, charge density, and density difference.| Parameter | Type | Description |
|---|---|---|
| cores | number | |
| inputDocument * | string | |
| project | boolean | |
| settings | object | |
| task | string | CASTEP task name or high-level preset. Presets are mapped to the correct CASTEP task and property settings. |
ms_codex_configReturn an MCP server config snippet that can be pasted into Codex settings.ms_create_moleculeCreate a standalone molecule/crystal document from explicit atoms and bonds using MaterialsScript. For the already-open GUI project, prefer ms_gui_create_current to avoid duplicate GUI documents.| Parameter | Type | Description |
|---|---|---|
| atoms | array | |
| bonds | array | |
| documentName * | string | |
| project | boolean |
ms_enqueue_materialscriptQueue a MaterialsScript Perl command for the optional in-Materials-Studio mcp_loop_gui.pl runner. Disabled unless MS_MCP_ALLOW_ARBITRARY_SCRIPT=1.| Parameter | Type | Description |
|---|---|---|
| name | string | |
| script * | string |
ms_forciteRun a Forcite task on an input document located under the MS-MCP work root.| Parameter | Type | Description |
|---|---|---|
| cores | number | |
| inputDocument * | string | |
| project | boolean | |
| settings | object | |
| task | string |
ms_gui_add_vacuum_currentAdd vacuum to the current GUI periodic document in place only when the user explicitly asks for vacuum. For an already-built 3D cell, extend_lattice increases the chosen lattice length while preserving Cartesian atom positions; for 2D surfaces, vacuum_slab uses CrystalBuilder VacuumSlab.| Parameter | Type | Description |
|---|---|---|
| axis | string | |
| ballAndStick | boolean | |
| documentName | string | |
| exportFile | string | |
| mode | string | |
| reorientAfterVacuumSlab | boolean | |
| slabPosition | number | |
| thickness * | number | Vacuum thickness to add in Angstrom. |
| transferSymmetry | boolean |
ms_gui_apply_currentQueue a MaterialsScript body that modifies the current GUI document in place. Use this for 'on this molecule...' edits.| Parameter | Type | Description |
|---|---|---|
| ballAndStick | boolean | |
| body * | string | MaterialsScript body. A variable named $doc is bound to the current target document. |
| documentName | string | |
| exportFile | string | |
| label | string | |
| save | boolean |
ms_gui_castep_currentQueue a CASTEP calculation on the current GUI document. Supports Energy, GeometryOptimization, phonon/frequency, DOS, band structure, charge density, and density difference presets.| Parameter | Type | Description |
|---|---|---|
| calculationName | string | |
| calculationType | string | High-level CASTEP calculation preset. |
| cores | number | |
| documentName | string | |
| exportFile | string | |
| extraSettings | object | |
| kPointQuality | string | |
| quality | string | |
| resultDocument | string |
ms_gui_cleave_surface_vacuum_currentCleave a surface from the current GUI crystal and build a vacuum slab through Materials Studio SurfaceBuilder + CrystalBuilder. Use only when the user explicitly asks to cleave/build a surface or create a vacuum slab by the manual surface workflow.| Parameter | Type | Description |
|---|---|---|
| ballAndStick | boolean | |
| capBonds | boolean | |
| capType | string | |
| cleaveRule | string | |
| documentName | string | |
| exportFile | string | |
| h | number | |
| k | number | |
| l | number | |
| reorientAfterVacuumSlab | boolean | |
| slabThickness * | number | Thickness of the cleaved slab in Angstrom. |
| transferSymmetry | boolean | |
| vacuumAxis | string | |
| vacuumThickness * | number | Vacuum thickness in Angstrom. |
ms_gui_create_crystal_currentCreate or replace the current GUI document as a periodic crystal/unit cell from lattice parameters and atom coordinates. Before using this for a new crystal, first try ms_gui_find_cif_import_current against open CIF sources; use manual construction only when no reliable open CIF is found or the user provides credentials/API access for a restricted source. Do not add vacuum here unless the user explicitly requested vacuum in the initial cell parameters.ms_gui_create_currentCreate or replace the current GUI document from a MaterialsScript body. Before using this for a new structure, first try ms_gui_find_cif_import_current against open CIF sources; use manual construction only when no reliable open CIF is found or the user provides credentials/API access for a restricted source. By default it reuses the existing current/same-name document and rebuilds it in place to avoid duplicate .xsd files.ms_gui_dmol3_optimize_currentQueue a DMol3 GeometryOptimization on the current GUI document and organize calculation outputs under a dedicated calculation name/folder.| Parameter | Type | Description |
|---|---|---|
| calculationName | string | |
| charge | number | |
| cores | number | |
| documentName | string | |
| exportFile | string | |
| extraSettings | object | |
| quality | string | |
| resultDocument | string | |
| theoryLevel | string |
ms_gui_download_cif_import_currentDownload a CIF from an open supported source or direct CIF URL, store it once in the active task session, optionally import it into the open GUI project, and make it current. Use this before modeling when a reliable database CIF is available. Do not use this to bypass login/license walls; credentialed databases require user-provided existing credentials/API configuration.| Parameter | Type | Description |
|---|---|---|
| ballAndStick | boolean | |
| codId | string | COD numeric id, required when source=cod. |
| documentName | string | Optional Materials Studio document name. Defaults to the CIF file name with .xsd. |
| fileName | string | Optional local CIF base name without path. |
| importToGui | boolean | If true, queue an import into the current GUI project after download. |
| source | string | CIF source. Use cod for Crystallography Open Database numeric IDs, or url for a direct CIF link. |
| url | string | Direct CIF URL, required when source=url. |
ms_gui_edit_currentQueue a basic molecule-building edit on the current GUI document, such as adding/deleting bonds, changing an atom element, adding/deleting atoms, recalculating bonds, Clean, or AdjustHydrogen.| Parameter | Type | Description |
|---|---|---|
| adjustHydrogenAfter | boolean | |
| allowPeriodicBondGuess | boolean | Allow broad CalculateBonds on periodic documents. Keep false unless the user explicitly accepts periodic bond guessing. |
| atom | string | Atom selector by atom Name or 1-based atom index. |
| atom1 | string | First atom selector by atom Name or 1-based atom index. |
| atom2 | string | Second atom selector by atom Name or 1-based atom index. |
| ballAndStick | boolean | |
| bondType | string | |
| cleanAfter | boolean | |
| cleanIterations | number | |
| documentName | string | |
| element | string | |
| exportFile | string | |
| name | string | |
| operation | string | |
| x | number | |
| y | number | |
| z | number |
ms_gui_find_cif_import_currentSearch open crystallographic databases for a reliable CIF, download it once, import it into the current GUI project, and make it current. Use this before manually building a new crystal or molecular crystal. It only uses open sources; if the requested structure appears to require credentialed databases such as ICSD/CSD/Materials Project API, return candidates/reason so the user can provide access instead of bypassing login walls.| Parameter | Type | Description |
|---|---|---|
| ballAndStick | boolean | |
| documentName | string | Optional Materials Studio document name. Defaults to the CIF file name with .xsd. |
| fileName | string | Optional local CIF base name without path. |
| formula | string | Optional chemical formula used to raise confidence and reject unrelated search hits. |
| importToGui | boolean | |
| maxResults | number | |
| minConfidence | number | |
| query * | string | Material, mineral, compound, molecule, or structure name to search for. |
ms_gui_forcite_optimize_currentQueue a Forcite GeometryOptimization on the current GUI document using a manual-like calculation folder layout.| Parameter | Type | Description |
|---|---|---|
| calculationName | string | |
| chargeAssignment | string | |
| cores | number | |
| documentName | string | |
| exportFile | string | |
| extraSettings | object | |
| forcefield | string | |
| maxIterations | number | |
| optimizeCell | boolean | |
| quality | string | |
| resultDocument | string |
ms_gui_import_currentQueue an import into the open Materials Studio GUI project and make the imported document the current document. Import external source files only; do not import XSD files that MS-MCP just exported from the current GUI document.| Parameter | Type | Description |
|---|---|---|
| ballAndStick | boolean | |
| documentName | string | |
| exportFile | string | |
| file * | string |
ms_gui_make_supercell_currentBuild a supercell from the current GUI periodic document in place, using Materials Studio BuildSuperCell.| Parameter | Type | Description |
|---|---|---|
| a | number | Multiplier along lattice A. |
| b | number | Multiplier along lattice B. |
| ballAndStick | boolean | |
| c | number | Multiplier along lattice C. Use 1 for 2D slabs/surfaces. |
| calculateBonds | boolean | For periodic supercells this defaults to false to avoid incorrect cross-boundary bonding; use explicit bonding or a later targeted bond calculation when needed. |
| documentName | string | |
| exportFile | string | |
| surface2D | boolean | Use the two-parameter surface form BuildSuperCell(a,b). |
ms_gui_model_currentQueue a basic Materials Studio modeling-toolbar operation on the current GUI document, such as Clean or AdjustHydrogen, without creating a new document.| Parameter | Type | Description |
|---|---|---|
| ballAndStick | boolean | |
| cleanIterations | number | |
| documentName | string | |
| exportFile | string | |
| operation | string |
ms_gui_new_structure_currentUnified entry point for creating a new GUI structure. Decision order: if an open and reliable CIF can be found, download it and import it as the initial XSD/current GUI document; if a likely source exists but requires an account/API such as ICSD/CSD/Materials Project/OQMD, return candidates and ask the user for access instead of bypassing authentication; if no usable CIF source is available, fall back to controlled MCP GUI manual creation when manual atoms/cell data are provided. Build the primitive/base document first; do not name the initial document after a planned supercell size. Prefer this tool over direct create/import tools for first-time structure creation.ms_gui_prepare_remote_castep_batchPrepare independent native CASTEP geometry-optimization jobs or compatibility Script Job drivers. The default native_castep mode stages one XSD plus one CASTEP settings document per structure/spin task for separate submission from the CASTEP Calculation dialog, giving each calculation its own CASTEP Job Control entry and native convergence graphs.| Parameter | Type | Description |
|---|---|---|
| batchName | string | |
| commonSettings | object | |
| stopGuiLoopAfterPrepare | boolean | |
| submissionMode | string | |
| tasks | array |
ms_gui_project_dirEnsure and return the current MS-MCP task/session output directory under the workspace.ms_gui_set_current_documentSet the current Materials Studio GUI document for subsequent stateful operations. This does not create a file.| Parameter | Type | Description |
|---|---|---|
| documentName * | string | |
| exportFile | string |
ms_gui_set_lattice_currentSet lattice parameters on the current GUI crystal document in place.| Parameter | Type | Description |
|---|---|---|
| a | number | |
| alpha | number | |
| b | number | |
| ballAndStick | boolean | |
| beta | number | |
| c | number | |
| documentName | string | |
| exportFile | string | |
| gamma | number |
ms_gui_start_project_sessionStart a new MS-MCP task/session folder under the workspace, such as YYYY-MM-DD-1, for subsequent GUI modeling and calculation outputs. Use only when the user explicitly asks for a new task/session; normal modeling should reuse the Dashboard/current session.| Parameter | Type | Description |
|---|---|---|
| allowExistingSessionSwitch | boolean | Required when a session already exists. Prevents accidental folder creation/switching during normal modeling. |
| folderName | string | Optional explicit folder name. If omitted, MS-MCP chooses the next YYYY-MM-DD-N folder. |
ms_gui_stateGet the stateful GUI session target: current document, current exported file, last job, and history.ms_list_workspaceList files under the MS-MCP work root.| Parameter | Type | Description |
|---|---|---|
| maxFiles | number | |
| subdir | string |
ms_queue_statusInspect the optional MS-MCP GUI queue folders.ms_read_textRead a text output file under the MS-MCP work root.| Parameter | Type | Description |
|---|---|---|
| file * | string | |
| maxBytes | number |
ms_remote_castep_batch_statusRead the local preparation markers, submission receipt, and downloaded result summary available for a remote CASTEP batch.| Parameter | Type | Description |
|---|---|---|
| batchName * | string |
ms_remote_castep_record_submissionRecord one Materials Studio Job Control receipt. For native_castep preparation, call this once per calculationName after submitting its XSD from the CASTEP Calculation dialog.| Parameter | Type | Description |
|---|---|---|
| batchName * | string | |
| calculationName | string | |
| driverDocument | string | |
| gateway * | string | |
| jobId * | string | |
| serverType | string | |
| status | string | |
| structureDocument | string | |
| submissionMode | string | |
| submittedAt | string |
ms_run_materialscriptRun a MaterialsScript Perl script through RunMatScript. Disabled by default unless MS_MCP_ALLOW_ARBITRARY_SCRIPT=1.| Parameter | Type | Description |
|---|---|---|
| args | array | |
| cores | number | |
| name | string | |
| project | boolean | |
| script * | string |
ms_statusCheck Materials Studio paths, RunMatScript availability, and MS-MCP workspace.Security checks
6 checks have not been run yet.