
ORCA Quantum Chemistry
STDIOORCA quantum chemistry MCP server for generating, validating, and optimizing input files.
ORCA quantum chemistry MCP server for generating, validating, and optimizing input files.
A Model Context Protocol (MCP) server for ORCA quantum chemistry software that provides intelligent tools for generating, validating, and optimizing ORCA input files.
The ORCA MCP Server is a comprehensive tool designed to assist quantum chemistry researchers and computational chemists in working with ORCA calculations. It provides intelligent assistance for:
npm install
npm run build
npm test
npm run test:coverage
The server can be used with any MCP-compatible client. Configure your client to connect to this server using stdio transport.
Example configuration for Claude Desktop:
{ "mcpServers": { "orca-mcp-server": { "command": "node", "args": ["path/to/orca-mcp-server/build/index.js"], "env": {} } } }
generate_input_file
Generate a complete ORCA input file based on calculation parameters.
Parameters:
calculation_type
(string): Type of calculation ("single_point", "optimization", "frequency", etc.)charge
(number): Molecular chargemultiplicity
(number): Spin multiplicitycoordinates_xyz_or_internal
(string, optional): Molecular coordinateskeywords
(array, optional): Additional ORCA keywordsaccuracy_level
(string, optional): "low", "medium", or "high"blocks
(object, optional): Custom parameter blocksExample:
{ "calculation_type": "optimization", "charge": 0, "multiplicity": 1, "coordinates_xyz_or_internal": "C 0.0 0.0 0.0\nH 0.0 0.0 1.0\nH 0.0 1.0 0.0\nH 1.0 0.0 0.0", "keywords": ["B3LYP", "def2-SVP"], "accuracy_level": "medium" }
validate_input_syntax
Validate the syntax of an ORCA input file and detect common errors.
Parameters:
inputContent
(string): Complete ORCA input file contentReturns:
suggest_keywords
Get keyword suggestions based on calculation type and current keywords.
Parameters:
calculation_type
(string): Intended calculation typecurrent_keywords
(array, optional): Already present keywordsReturns:
You can also use the server components directly in your TypeScript/JavaScript code:
import { KeywordManager } from './src/core/keywordManager.js'; import { CoordinateProcessor } from './src/core/coordinateProcessor.js'; import { CalculationTemplateEngine } from './src/core/calculationTemplateEngine.js'; // Initialize components const keywordManager = new KeywordManager(); const coordinateProcessor = new CoordinateProcessor(); const templateEngine = new CalculationTemplateEngine(); // Parse coordinates const molecule = coordinateProcessor.parse_xyz_coordinates( 'C 0.0 0.0 0.0\nH 0.0 0.0 1.0', 0, 1 ); // Generate template const template = templateEngine.generate_dft_template(molecule, 'B3LYP', 'def2-SVP'); // Validate keywords const validation = await keywordManager.validate_keyword_combination(['B3LYP', 'def2-SVP', 'Opt']);
The server uses a comprehensive TypeScript type system defined in src/types/orca.types.ts
that covers:
// Generate input for geometry optimization const result = await generateInputFile({ calculation_type: "optimization", charge: 0, multiplicity: 1, coordinates_xyz_or_internal: ` C 0.0 0.0 0.0 H 0.0 0.0 1.0 H 0.0 1.0 0.0 H 1.0 0.0 0.0 H -1.0 0.0 0.0 `, accuracy_level: "medium" }); console.log(result.content); // Output: // ! B3LYP-D3BJ def2-SVP Opt // // %pal NProcs 2 end // // * xyz 0 1 // C 0.0 0.0 0.0 // H 0.0 0.0 1.0 // H 0.0 1.0 0.0 // H 1.0 0.0 0.0 // H -1.0 0.0 0.0 // *
// Get recommendations for heavy elements const basisRecommendation = await recommendationEngine.recommend_basis_set( ['Au', 'Cl'], 'high', 2 ); console.log(basisRecommendation); // Output: // { // orbital_basis: "SARC-DKH-TZVP", // auxiliary_basis_jk: "SARC/JK", // auxiliary_basis_cosx: "SARC/J", // relativistic_method: "DKH", // reasoning: "High accuracy with heavy elements: SARC-DKH-TZVP with DKH relativistic treatment is recommended." // }
// Analyze convergence failure const diagnosis = convergenceDiagnostic.analyze_scf_failure(` SCF NOT CONVERGED AFTER 125 ITERATIONS oscillating behavior in DIIS Energy change: 1.234e-03 `); console.log(diagnosis); // Output: // { // problem_type: "SCF_OSCILLATION", // summary: "SCF convergence is likely hindered by oscillating behavior...", // recommendations: [ // "Try damping: %scf DampFac 0.7 DampErr 0.05 end", // "Use a level shifter: %scf Shift Shift 0.5 Erroff 0.1 end" // ], // suggested_keywords_add: ["VerySlowConv"], // suggested_block_modifications: { // scf: "DampFac 0.7\nDampErr 0.05" // } // }
The project includes comprehensive test coverage:
# Run all tests npm test # Run tests with coverage npm run test:coverage # Run tests in watch mode npm run test:watch
tests/core/
: Core functionality teststests/intelligent/
: AI/ML component teststests/validation/
: Validation system teststests/integration/
: Complete workflow testsorca-mcp-server/
├── src/
│ ├── core/ # Core functionality
│ │ ├── keywordManager.ts
│ │ ├── coordinateProcessor.ts
│ │ ├── parameterBlockManager.ts
│ │ └── calculationTemplateEngine.ts
│ ├── intelligent/ # AI/ML components
│ │ ├── parameterRecommendationEngine.ts
│ │ └── convergenceDiagnostic.ts
│ ├── validation/ # Validation systems
│ │ └── orcaInputValidator.ts
│ ├── types/ # TypeScript definitions
│ │ └── orca.types.ts
│ └── index.ts # MCP server entry point
├── tests/ # Test suites
├── build/ # Compiled JavaScript
└── docs/ # Documentation
# Development build npm run build # Watch mode for development npm run watch
The project uses:
git checkout -b feature/amazing-feature
)npm test
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License - see the LICENSE file for details.
For questions, issues, or contributions:
Note: This is an independent project and is not officially affiliated with the ORCA quantum chemistry package developers.