An MCP bundle that provides operations on SMILES strings using SMARTS patterns via RDKit bindings. This project follows the MCPB (MCP Bundle) specification and is packaged as a .mcpb file for use with MCPB-compatible clients such as Claude Desktop.
SmileyMCP
├── manifest.json # MCPB manifest
├── README.md # This file
├── server/
│ ├── main.py # MCP server entrypoint (stdio MCP)
│ ├── smileslib/ # SMILES module
│ ├── tools.py # SMILES tool definitions
│ └── venv/ # Bundled virtual environment
└── requirements.txt # Development dependency list
Note: server/venv is included so the bundle can run on machines without the same Python environment. This makes the .mcpb larger but self-contained.
This bundle adds tools for working with chemical structures expressed as SMILES. The tools can compute descriptors of molecules or combinations of molecules, check if substructures are present, find the maximum common substructure of many molecules. It can also react, remove, and replace structures according to SMARTS fragments or reaction SMARTS patterns.
- Commands available in the manifest:
SMILES_InfoSMILES_SubstructureSMILES_MaxCommonSubstructureSMILES_ReactSMILES_AddSMILES_RemoveSMILES_Replace
- A Python MCP server implemented at
server/main.py
- Download latest release
- Open Claude Desktop (Windows/macOS).
- Open Settings (File->Settings).
- Choose Extensions and open Advanced Settings.
- Click "Install Extension" and select
SmileyMCP.mcpb. - Follow the install prompts. Claude Desktop will register the MCP server and expose the SMILES tools.
- Verify the tool is enabled in the "Search and Tool" settings below the prompt text box in a new chat.
To verify the MCP server is working, here are some examples to get started:
| Example | Claude Sonnet 4 |
|---|---|
Using SmileyMCP tools, start with acetic acid (CC(=O)O) and apply the esterification reaction SMARTS: [C:1](=[O:2])O.[O:3]>>[C:1](=[O:2])[O:3] with ethanol as the nucleophile. Get molecular information for both the starting material and product. Explain how the carboxylic acid was converted to an ester and what bond formation occurred. |
Example output |
Using SmileyMCP tools, add benzene (`c1ccccc1`) and methanol (`CO`). Then get molecular information for both the individual components and the combined mixture. Compare the molecular weights and atom counts. |
Example output |
Using SmileyMCP tools, check if aspirin (`CC(=O)OC1=CC=CC=C1C(=O)O`) contains a carboxylic acid group (SMARTS: `[C](=O)[OH]`). If it does, remove this substructure and show what remains. Explain what functional group was removed. |
Example output |
Using SmileyMCP tools, find the maximum common substructure between caffeine (`CN1C=NC2=C1C(=O)N(C(=O)N2C)C`) and theobromine (`CN1C=NC2=C1C(=O)NC(=O)N2C`). Then get molecular information for the common substructure and explain what structural features these two compounds share. |
Example output |
Prerequisites:
- Node.js and
npm(for themcpbCLI) @anthropic-ai/mcpbinstalled globally or available in PATH- A Python installation to create the bundled virtual environment
Create the bundled virtual environment. Otherwise, you'll need to modify the manifest.json to use the python installation on your system.
$> python -m venv server/venv
$> ./server/venv/bin/python -m pip install -r requirements.txtInstall the MCPB bundler and pack the MCP server.
$> npm install @anthropic-ai/mcpb
$> cd /path/to/repo/SmileyMCP
$> mcpb pack .The command will validate manifest.json and write a .mcpb archive into the project root (e.g., SmileyMCP.mcpb).
MIT