Get the FREE Ultimate OpenClaw Setup Guide →

xtb

The XTB MCP Server is a Model Context Protocol (MCP) server that provides comprehensive tools for generating Extended Tight-Binding (XTB) quantum chemistry calculation input files. This server integrates seamlessly with AI assistants like Claude, Cursor, and Windsurf to enable intelligent quantum chemistry workflow automation.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio phelanshao-xtb-mcp-server python path/to/xtb-mcp-server/main.py

How to use

The XTB MCP Server provides a comprehensive toolkit for generating and validating Extended Tight-Binding (XTB) quantum chemistry input files. It supports multiple calculation types such as singlepoint, optimization, frequency, scan, and molecular dynamics, along with a range of XTB methods (GFN0, GFN1, GFN2, and GFN-FF). The server also offers structure format conversion (XYZ, COORD, Gaussian formats), advanced sampling workflows (metadynamics, pathfinding, normal mode following), wavefunction analysis, ONIOM multi-layer calculations, input validation, and extensive documentation templates. You can access a set of tools like generate_xtb_input_package for end-to-end input package creation, convert_structure_file_format for format transformations, validate_xtb_input_files for syntax and parameter checks, and generate_xcontrol_file to craft precise XTB control files. These capabilities integrate with AI assistants and orchestration layers in your workflow, enabling automated, reliable quantum chemistry input generation.

To use the server, configure it in your MCP integration (e.g., Claude Desktop, Cursor, or Windsurf) to point to the Python entry script. Then issue requests using tools like generate_xtb_input_package to build complete input packages, or generate_enhanced_sampling_input for metadynamics and related workflows. You can also request structure conversions, parameter explanations, and wavefunction analyses to accompany your calculations. The server returns organized files (structure coordinates, xcontrol/config files, templates) ready for XTB execution.

How to install

Prerequisites:

  • Python 3.8+ and pip
  • Internet access to install dependencies
  • A working MCP integration (e.g., Claude/Cursor/Windsurf) or a local script to invoke the server

Installation steps:

  1. Clone the repository (or obtain the server package): git clone <repository-url> cd xtb-mcp-server

  2. Create and activate a Python environment (recommended): python -m venv venv source venv/bin/activate # Unix/macOS venv\Scripts\activate # Windows

  3. Install dependencies: pip install -r requirements.txt

  4. (Optional) Run tests to verify installation: python run_tests.py

  5. Run the MCP server (example): python path/to/xtb-mcp-server/main.py

  6. Configure your MCP client to point to the server (see mcp_config examples in README).

Additional notes

Tips and common considerations:

  • Ensure the path to main.py in your MCP config matches your deployment layout (adjust path/to/xtb-mcp-server/main.py accordingly).
  • If using virtual environments, make sure the MCP client activates the same environment where dependencies are installed.
  • The server exposes tools like generate_xtb_input_package, convert_structure_file_format, validate_xtb_input_files, generate_xcontrol_file, and more. Use descriptive tool calls to get targeted outputs (e.g., specific calculation types, solvents, and sampling methods).
  • For structure conversions, ensure the input formats are supported by the server templates and that coordinate/order conventions are preserved during conversion.
  • If you encounter issues with environment variables, you can supply minimal placeholders in the env field of your MCP config; adjust as needed for your environment (e.g., API keys, solver paths).
  • Review the templates and parameter documentation under resources to tailor XTB input settings to your workflow.

Related MCP Servers

Sponsor this space

Reach thousands of developers