SMILES Visualizer

Provides SMILES-based molecular visualization, validation, and properties with multiple visualization types.
  • python

0

GitHub Stars

python

Language

6 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "siarhei-fedziukovich-smiles_visualizer_mcp": {
      "command": "python",
      "args": [
        "path/to/smiles_visualizer_mcp/server.py",
        "--host",
        "127.0.0.1",
        "--port",
        "8080"
      ],
      "env": {
        "MCP_HOST": "127.0.0.1",
        "MCP_PORT": "8080",
        "OUTPUT_DIR": "/path/to/output"
      }
    }
  }
}

You can run a dedicated MCP server that visualizes molecules from SMILES strings. It offers multiple visualization approaches, validates SMILES, provides molecular properties, and returns images or JSON for easy embedding and integration with MCP clients.

How to use

You interact with this server through an MCP client. Start the server, then request visualizations, validation, or molecular information for one or more SMILES strings. You can generate RDKit 2D visualizations, network graphs, interactive Plotly charts, and custom matplotlib visuals, all from the same endpoint set. Retrieve results as base64-encoded images or as raw Plotly/JSON data to feed into your UI or analysis pipeline. Use the batch processing capability to handle several SMILES strings in one request, which speeds up workflows like screening or comparative visualization.

How to install

Prerequisites include Python 3.8 or higher and the following libraries for full functionality: RDKit for molecular processing, Matplotlib for custom visuals, NetworkX for graphs, and Plotly for interactive visualizations. You also need a modern HTTP server/runtime that supports MCP transport.

Step 1 — Install prerequisites

pip install -r requirements.txt

Or using uv (recommended):
uv pip install -r requirements.txt

Step 2 — Run the MCP server

python server.py --host 127.0.0.1 --port 8080 --verbose

Step 3 — Run in development or with container tooling

If you prefer development entry points or container environments, follow the project’s development flow and environment setup as you normally would for Python MCP servers. Ensure the startup command above is what you use to launch the server in your environment.

Additional configuration and notes

You can customize how the server runs by providing environment variables for host, port, and output directory. These are commonly exposed as MCP_HOST, MCP_PORT, and OUTPUT_DIR in your deployment. You may also want to run the server with verbose logging to aid debugging during setup.

Security and troubleshooting

  • Ensure all dependencies are installed and compatible with your Python environment.
  • Validate that SMILES strings are correct before sending requests to avoid processing errors.
  • Check server logs if you encounter connection or visualization issues and verify that the MCP client is configured to connect to the correct host and port.

Notes

The server includes a comprehensive set of visualization tools, validation, and molecular property calculations. You can process single SMILES strings or batches, output images as base64 for easy embedding, and retrieve Plotly JSON data for interactive visuals.

Configuration example

{
  "mcpServers": {
    "smiles_visualizer": {
      "command": "python",
      "args": ["path/to/smiles_visualizer_mcp/server.py", "--host", "127.0.0.1", "--port", "8080"],
      "env": {
        "MCP_HOST": "127.0.0.1",
        "MCP_PORT": "8080"
      }
    }
  }
}

Available tools

validate_smiles

Validate SMILES strings using RDKit to ensure they are syntactically correct and chemically valid.

get_molecular_info

Compute and return detailed molecular properties such as molecular weight, formula, TPSA, LogP, rotatable bonds, and counts of atoms, bonds, and rings.

visualize_rdkit

Generate RDKit 2D visualization of a molecule and return as a base64-encoded PNG.

visualize_network

Create a network graph visualization representing molecular structure relationships and returns a base64-encoded image.

visualize_plotly

Produce an interactive Plotly visualization and return either a base64-encoded JSON or raw JSON data.

visualize_custom_matplotlib

Render a custom matplotlib visualization for the molecule and return it as an image.

compare_visualizations

Generate all supported visualization types for a given SMILES string for side-by-side comparison.

batch_visualize

Process multiple SMILES strings in a single request and return corresponding visualizations.

store_plotly_json

Store Plotly JSON visualizations for debugging or batch processing.

get_stored_plotly_json

Retrieve stored Plotly visualizations with optional base64 encoding.

list_stored_plotly_keys

List keys of all stored Plotly JSON visualizations.

clear_stored_plotly_data

Clear all stored Plotly JSON visualizations in the local store.

convert_to_image

Convert any content to ImageContent with specified MIME type and encoding.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational