Skip to content

An MCP bundle toolkit for manipulating and interpreting SMILES strings

License

Notifications You must be signed in to change notification settings

lukasmki/SmileyMCPB

Repository files navigation

SmileyMCP: SMILES Toolkit in a Local MCP Server

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.

Project layout

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.

Toolkit

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_Info
    • SMILES_Substructure
    • SMILES_MaxCommonSubstructure
    • SMILES_React
    • SMILES_Add
    • SMILES_Remove
    • SMILES_Replace
  • A Python MCP server implemented at server/main.py

Claude Desktop Installation

  1. Download latest release
  2. Open Claude Desktop (Windows/macOS).
  3. Open Settings (File->Settings).
  4. Choose Extensions and open Advanced Settings.
  5. Click "Install Extension" and select SmileyMCP.mcpb.
  6. Follow the install prompts. Claude Desktop will register the MCP server and expose the SMILES tools.
  7. Verify the tool is enabled in the "Search and Tool" settings below the prompt text box in a new chat.

Verify Claude Desktop Installation

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

Bundling

Prerequisites:

  • Node.js and npm (for the mcpb CLI)
  • @anthropic-ai/mcpb installed 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.txt

Install 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).

License

MIT

About

An MCP bundle toolkit for manipulating and interpreting SMILES strings

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages