Skip to content
Official

Chemistry AI for Cursor

Add a pinned, restricted RDKit MCP server to a Cursor project and verify molecular-analysis tools using reproducible SMILES prompts.

Level: Intermediate Cost: Mixed Privacy: Cloud ~30 min
Start Setup

You'll be able to

  • Expose a restricted RDKit descriptor toolset to Cursor.
  • Verify actual molecular tool calls in the Agent conversation.

What you'll build

Scope

Use Cursor, Python 3.11 and TandemAI RDKit MCP 0.2.3 at commit 3a7000ae62e94e095ecd804a403fca12982570cb with RDKit 2025.3.1. The server defaults to SSE, so explicitly select stdio. The five-tool allowlist keeps the scope to descriptors. There is no claim that adding MCP validates generated code or gives the model unrestricted shell access.

Environment and privacy

This walkthrough is for a local desktop workspace. Remote workspaces need accessible paths and their own environment verification. RDKit calculation is local, while model handling depends on the Cursor account/model configuration; the reference workflow is not promised to be offline. Cursor access and model charges are separate from the open-source server. Keep project MCP settings free of private credentials.

Cursor chemistry MCP bridge

RDKit MCP Server (TandemAI)

Cheminformatics calculation engine

RDKit

Stack Components

RDKit MCP Server (TandemAI)

Cursor chemistry MCP bridge · 0.2.3; 3a7000ae62e94e095ecd804a403fca12982570cb

Explicit stdio and five-tool allowlist.

See upstream licenses and client/service account terms.

View Resource

RDKit

Cheminformatics calculation engine · ==2025.3.1

Installed automatically by the pinned server.

See upstream licenses and client/service account terms.

View Resource

Compatibility

ClientOSArchitectureVersion requirements
Cursor macOSAnySee component requirements
Cursor WindowsAnySee component requirements
Cursor LinuxAnySee component requirements
Python macOSAny>= 3.10
Python WindowsAny>= 3.10
Python LinuxAny>= 3.10

Setup & Test

1. Prepare Cursor, Git and Python

All platforms

Install Cursor and Python 3.11 with Git. Confirm MCP is allowed by workspace policy. Use a local workspace with a new directory for the pinned RDKit server; select a Cursor model and record the client version and model identifier.

Official source

Expected result

Cursor allows local MCP in the chosen workspace.

2. Install the pinned server on macOS

macOS

Run in a terminal. Keep the checkout and virtual environment together; installation follows upstream pip install . with an isolated interpreter. Record the displayed dependency versions.

git clone https://github.com/tandemai-inc/rdkit-mcp-server.git
cd rdkit-mcp-server
git checkout 3a7000ae62e94e095ecd804a403fca12982570cb
python3.11 -m venv .venv
.venv/bin/python -m pip install .
.venv/bin/python -m pip show rdkit rdkit-mcp-server mcp
Official source

Expected result

Package installation completes; RDKit reports 2025.3.1 and server package reports 0.2.3.

3. Install the pinned server on Windows

Windows

Run in PowerShell. Use the virtual-environment Python directly; activating PowerShell scripts is unnecessary. If the Python launcher is unavailable, use the absolute path to your Python 3.11 interpreter.

git clone https://github.com/tandemai-inc/rdkit-mcp-server.git
cd rdkit-mcp-server
git checkout 3a7000ae62e94e095ecd804a403fca12982570cb
py -3.11 -m venv .venv
.\.venv\Scripts\python.exe -m pip install .
.\.venv\Scripts\python.exe -m pip show rdkit rdkit-mcp-server mcp
Official source

Expected result

Package installation completes; RDKit reports 2025.3.1 and server package reports 0.2.3.

4. Install the pinned server on Linux

Linux

Use the same isolated Python 3.11 source installation commands on Linux.

git clone https://github.com/tandemai-inc/rdkit-mcp-server.git
cd rdkit-mcp-server
git checkout 3a7000ae62e94e095ecd804a403fca12982570cb
python3.11 -m venv .venv
.venv/bin/python -m pip install .
.venv/bin/python -m pip show rdkit rdkit-mcp-server mcp
Official source

Expected result

Package installation completes; RDKit reports 2025.3.1 and server package reports 0.2.3.

5. Limit the exposed RDKit tools

All platforms

Save this YAML as recipe-settings.yaml in the cloned repository. Do not copy the upstream example unchanged: it contains overlapping allow/block examples. These names are checked in the tool wrappers. The allowlist also reduces the tool list exposed to the client.

ALLOW_LIST:
  - MolWt
  - ExactMolWt
  - CalcMolFormula
  - CalcTPSA
  - CalcCrippenDescriptors
BLOCK_LIST: []
Official source

Expected result

The saved YAML contains the five listed tools and an empty block list.

6. Configure project MCP on macOS

macOS

Create or edit .cursor/mcp.json in the local project; merge the rdkit entry with existing mcpServers. Replace the interpreter, run_server.py and recipe-settings.yaml paths with actual absolute paths. The project file is workspace-specific; ~/.cursor/mcp.json is an alternative global location. No API key is required for this RDKit server.

{
  "mcpServers": {
    "rdkit": {
      "command": "/ABSOLUTE/PATH/rdkit-mcp-server/.venv/bin/python",
      "args": [
        "/ABSOLUTE/PATH/rdkit-mcp-server/run_server.py",
        "--transport",
        "stdio",
        "--settings",
        "/ABSOLUTE/PATH/rdkit-mcp-server/recipe-settings.yaml"
      ],
      "type": "stdio"
    }
  }
}
Official source

Expected result

Valid project configuration uses absolute paths and --transport stdio.

7. Configure project MCP on Windows

Windows

Create or edit .cursor/mcp.json in the local project; merge the rdkit entry with existing mcpServers. Replace the interpreter, run_server.py and recipe-settings.yaml paths with actual absolute paths. The project file is workspace-specific; ~/.cursor/mcp.json is an alternative global location. No API key is required for this RDKit server.

{
  "mcpServers": {
    "rdkit": {
      "command": "C:\\ABSOLUTE\\PATH\\rdkit-mcp-server\\.venv\\Scripts\\python.exe",
      "args": [
        "C:\\ABSOLUTE\\PATH\\rdkit-mcp-server\\run_server.py",
        "--transport",
        "stdio",
        "--settings",
        "C:\\ABSOLUTE\\PATH\\rdkit-mcp-server\\recipe-settings.yaml"
      ],
      "type": "stdio"
    }
  }
}
Official source

Expected result

Valid project configuration uses absolute paths and --transport stdio.

8. Configure project MCP on Linux

Linux

Create or edit .cursor/mcp.json in the local project; merge the rdkit entry with existing mcpServers. Replace the interpreter, run_server.py and recipe-settings.yaml paths with actual absolute paths. The project file is workspace-specific; ~/.cursor/mcp.json is an alternative global location. No API key is required for this RDKit server.

{
  "mcpServers": {
    "rdkit": {
      "command": "/ABSOLUTE/PATH/rdkit-mcp-server/.venv/bin/python",
      "args": [
        "/ABSOLUTE/PATH/rdkit-mcp-server/run_server.py",
        "--transport",
        "stdio",
        "--settings",
        "/ABSOLUTE/PATH/rdkit-mcp-server/recipe-settings.yaml"
      ],
      "type": "stdio"
    }
  }
}
Official source

Expected result

Valid project configuration uses absolute paths and --transport stdio.

9. Reload Cursor and inspect the tool list

All platforms

Reload the workspace or restart Cursor, enable rdkit in its MCP settings and open an Agent conversation. Verify MolWt, ExactMolWt, CalcMolFormula, CalcTPSA and CalcCrippenDescriptors are listed. Inspect and approve the requested SMILES before a call.

Official source

Expected result

The connector is enabled and all five selected tools are available.

10. Run the aspirin acceptance prompt

All platforms

Paste into a Cursor Agent chat with rdkit enabled. Inspect actual tool calls; an answer from model memory is not a successful MCP test.

Use the rdkit connector to analyze aspirin with SMILES CC(=O)Oc1ccccc1C(=O)O. Call CalcMolFormula, MolWt, ExactMolWt, CalcTPSA and CalcCrippenDescriptors with this exact smiles argument. Report each actual tool result, its unit and tool name. Distinguish average molecular weight from monoisotopic mass; logP is a calculated descriptor, not a measured property. If a tool is unavailable or fails, state that explicitly and do not fill missing numbers from memory.
Official source

Expected result

Observed tool calls use the supplied SMILES. Formula C9H8O4; average mass about 180.159 g/mol (tolerance 0.02), monoisotopic mass about 180.04226 Da (tolerance 0.001), TPSA about 63.60 Ų (tolerance 0.1). CalcCrippenDescriptors returns approximately (1.3101, 44.7103) for logP and molar refractivity (tolerance 0.05). These are expected baselines, not results measured in this session.

11. Check invalid-input handling

All platforms

Paste into a Cursor Agent chat with rdkit enabled. Inspect actual tool calls; an answer from model memory is not a successful MCP test.

Use the RDKit tools to analyze SMILES not-a-smiles. Validate the input first. If it is invalid, report the validation or tool error and stop; do not invent molecular properties.
Official source

Expected result

Invalid SMILES is explicitly rejected; no formula or numeric descriptor is invented.

Troubleshooting

  • No server: confirm .cursor/mcp.json belongs to the active workspace and the connector is enabled.
  • ENOENT/import failure: use absolute paths and the same .venv interpreter used for installation.
  • Protocol/connection error: ensure --transport stdio is present rather than starting the default SSE server.
  • No tools: check recipe-settings.yaml and the five allowed names, then reload.
  • Agent answers without tools: explicitly ask for real calls and inspect the call trace.
  • Remote workspace paths fail: install on the runtime host and record its environment separately.
Still not working

Alternatives

Use the Claude Desktop recipe with the same RDKit server, or run RDKit directly in Python when a coding assistant is unnecessary.