MCP server providing tools for chemical structure analysis, molecular descriptor calculation, and compound database queries using the Chemistry Development Kit (CDK)
This server provides 8 chemistry tools with reasonable naming and parameter descriptions, but falls short of production-grade quality due to incomplete schema documentation, inconsistent error handling, and missing output schema specifications. All tools follow verb-noun naming (get_, calculate_, generate_, perform_, search_, query_) which aids discoverability. Parameter descriptions are present and explain the chemical identifier types well. However, the source code shows no explicit JSON Schema definitions for input parameters, the schemas are inferred from Python type hints in the decorator. Return types are documented in docstrings but not as formal schemas. Error handling is inconsistent: some tools return error dicts, others wrap errors in strings, making error parsing unreliable for agents. The tools lack documentation of dependencies (e.g., that query_chembl_by_inchi_key requires first calling get_compound_identifiers if starting from SMILES).
Calculates Lipinski's Rule of 5 for a given molecule.
Calculates a set of common molecular descriptors for a given molecule.
Generates a 2D SVG image of a molecule.
Provides the SMILES, InChI, and InChIKey for a given chemical structure.
Finds and returns the SMILES representations of a molecule's tautomers.
Performs a substructure search on a molecule using a SMARTS pattern.
Query ChEMBL using an InChIKey and return common fields.
Query compound by name in compound database and return common fields and identifiers.
No explicit JSON Schema definitions visible in source code. Schemas are inferred from Python type hints (str, Dict, List) but lack formal JSON Schema with property-level type and description metadata. This makes it impossible for clients to validate inputs or render rich UI hints.
Parameters 'identifier_type' and 'smarts_pattern' accept free-form strings but should be enums. identifier_type only accepts 'smiles' or 'inchi', these should be declared as enum values, not documentation strings. SMARTS patterns have a formal grammar but are not validated or constrained in the schema.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 11 | 2026-07-28+ | v2 |
| 2026-03-09 | D | 54 | - | v1 |
Inconsistent error handling across tools. Some return {'error': str(e)} dicts, others return error strings wrapped in SVG tags ('<svg>Error: {e}</svg>') or error messages in lists (['Error: {e}']). This inconsistency makes it hard for agents to detect and handle errors reliably.
Output schemas are not formally documented. Docstrings describe return types (Dict[str, str], List[str], str) but do not specify field names, types, or whether fields are required or optional. LLMs cannot extract specific fields without trial-and-error.
Missing dependency documentation. Tools like query_chembl_by_inchi_key and search_compound_by_name do not explain that their input may first require calling get_compound_identifiers to convert SMILES or names to InChIKeys. Multi-step workflows are not documented, forcing agents to discover them.
Tool descriptions lack WHEN-to-use guidance. Descriptions state WHAT each tool does but not when to use one over another. For example, calculate_molecular_descriptors and calculate_lipinski_rule_of_5 both measure drug-likeness properties, but the distinction is not explained.
No validation or error guidance for invalid chemical structures. If compound_string is malformed SMILES or InChI, the tool returns {'error': str(e)} with a raw Java exception stack trace. The error message does not guide the agent on how to correct the input.
No input validation constraints documented. Numeric fields (e.g., molecular weight bounds for filtering) are not constrained. String fields (SMILES, InChI, SMARTS) have no length limits or regex patterns specified.