Get the FREE Ultimate OpenClaw Setup Guide →

chemdraw

This repository provides a unified FastAPI and MCP wrapper for an API that converts between ChemDraw chemical names and SMILES.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio tom832-chemdraw-server uvx run main_server.py \
  --env ENV="development|production (optional)" \
  --env API_KEY="your_api_key_here" \
  --env DOCS_ACCESS_TOKEN="optional_token_for_docs_access"

How to use

ChemDraw Server provides a FastAPI-based MCP API to convert between chemical names and SMILES, as well as process molecules (e.g., RDKit objects) and compare molecules. The service is exposed under the MCP path and offers an API key protected interface. Once running, you can send HTTP requests to the provided endpoints to perform name_to_smiles, smiles_to_name, smiles_to_rdkit, and mol_compare operations. The server also exposes a health check endpoint to monitor availability. Authentication is via a Bearer token you supply in the Authorization header, configured through an API_KEY in your environment or a .env file.

How to install

Prerequisites:

  • Python 3.10
  • Git
  • uv (the CLI tool used to run the server; installed as described in the project docs)

Installation steps:

  1. Clone the repository: git clone https://github.com/tom832/chemdraw-server.git
  2. Change into the project directory: cd chemdraw-server
  3. Initialize the environment and install dependencies using uv (as per the project setup): uv sync
  4. Create a .env file (optional but recommended) and add your API key: API_KEY=your_api_key_here DOCS_ACCESS_TOKEN=
  5. Start the server: uv run main_server.py

The API will be available at:

Additional notes

Notes and tips:

  • Ensure Python 3.10 is used to satisfy dependencies.
  • The MCP endpoints require an Authorization header with a Bearer token. Set API_KEY in your environment or in a .env file.
  • If you rely on Prometheus metrics, ensure the prometheus-fastapi-instrumentator is available in your environment.
  • The server paths for API and MCP are /chemdraw/api/ and /chemdraw/mcp/ respectively; you can test health with GET /chemdraw/api/health.
  • If you modify config.py, review configurable options as described in the project configuration to adjust timeouts, logging, or authentication behavior.

Related MCP Servers

Sponsor this space

Reach thousands of developers