Chemspace MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Chemspace MCP Serversearch for compounds similar to CC(=O)OC1=CC=CC=C1C(=O)O"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
chemspace-mcp
A Model Context Protocol (MCP) server that provides a wrapper for the Chemspace API, enabling AI agents to search for synthesizable building blocks and screening compounds through exact, substructure, and similarity searches.
Features
Exact Search: Find exact molecular matches by SMILES
Substructure Search: Find compounds containing a specific substructure
Similarity Search: Find structurally similar compounds by SMILES
Multiple Product Categories: Search across in-stock and make-on-demand compounds
Global Shipping: Specify shipping countries with ISO country codes
Related MCP server: PubChem MCP Server
Requirements
Python 3.13+
Chemspace API key
Installation
Prerequisites
Install uv:
# macOS
brew install uv
# Linux/WSL2
curl -LsSf https://astral.sh/uv/install.sh | shSetup
Clone the repository and navigate to the project directory
Set your Chemspace API key as an environment variable:
export CHEMSPACE_API_KEY="your-api-key-here"Install dependencies and run:
uv run chemspace-mcp
Configuration
For use with FastAgent
Configure example/fastagent.secrets.yaml. Environment variables set here will override the ones in your shell:
anthropic:
api_key: your-anthropic-api-key
mcp:
servers:
chemspace:
env:
CHEMSPACE_API_KEY: your-chemspace-api-keyThen run the example interface with FastAgent:
cd example
uv run --extra agent agent.pyUsage
The MCP server exposes the following tools:
search_exact
Searches for exact molecular matches by SMILES string.
Parameters:
smiles(string): The SMILES string to search forshipToCountry(string): Two-letter ISO country code (default: "US")count(integer): Maximum results per page (default: 10)page(integer): Page number for pagination (default: 1)categories(list): Product categories to search:CSSB: In-stock building blocksCSSS: In-stock screening compoundsCSMB: Make-on-demand building blocksCSMS: Make-on-demand screening compoundsCSCS: Custom requests
search_substructure
Searches for compounds containing a specific substructure.
Parameters: Same as search_exact
search_similarity
Searches for structurally similar compounds.
Parameters: Same as search_exact
Project Structure
chemspace-mcp/
├── src/
│ └── chemspace_mcp/
│ ├── __init__.py # Entry point and MCP server initialization
│ ├── tools.py # Tool definitions for chemical searches
│ └── tokenmanager.py # Token management for API authentication
├── example/
│ ├── agent.py # Example FastAgent integration
│ ├── fastagent.config.yaml # FastAgent configuration
│ └── fastagent.secrets.yaml # Secrets configuration (not in version control)
├── pyproject.toml # Project metadata and dependencies
└── README.md # This fileDevelopment
Dependencies
fastmcp>=2.13.1: Core MCP server frameworkfast-agent-mcp>=0.2.25: FastAgent integration
License
MIT License
Support
For issues or questions, please open an issue on the project repository.
Available Tools
3 toolssearch_exactC
Exact search by SMILES
| Name | Required | Description | Default |
|---|---|---|---|
| smiles | Yes | ||
| shipToCountry | No | The country you want your order to be shipped to as two-letter country ISO code, e.g DE, US, FR | US |
| count | No | Maximum number of results on a page | |
| page | No | Number of the page | |
| categories | No | A list of product categories to searchCSSB - In-stock building blocksCSSS - In-stock screening compoundsCSMB - Make-on-demand building blocksCSMS - Make-on-demand screening compoundsCSCS - Custom request |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It mentions 'exact search' which implies precision matching, but doesn't cover aspects like rate limits, authentication needs, response format, or what happens with no matches. This leaves significant gaps for a tool with 5 parameters.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise at just three words, front-loading the core purpose with zero wasted language. It's appropriately sized for a simple statement of function, though this brevity contributes to gaps in other dimensions.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (5 parameters, no output schema, no annotations), the description is inadequate. It doesn't explain return values, error conditions, or how parameters interact (e.g., pagination with count/page). For a search tool with multiple configuration options, more context is needed to guide effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds no parameter-specific information beyond the schema. With 80% schema description coverage (4 out of 5 parameters have descriptions), the baseline is 3. The description doesn't compensate for the 20% gap (the 'smiles' parameter lacks schema description), nor does it provide additional context like SMILES format examples or search behavior details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Exact search by SMILES' clearly states the verb ('search') and resource ('by SMILES'), indicating it performs a precise chemical structure lookup. However, it doesn't explicitly differentiate from sibling tools like 'search_similarity' or 'search_substructure' beyond the 'exact' qualifier, which is why it doesn't reach a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. There's no mention of sibling tools like 'search_similarity' or 'search_substructure', nor any context about specific use cases, prerequisites, or exclusions for exact searching.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_similarityC
Similarity search by SMILES
| Name | Required | Description | Default |
|---|---|---|---|
| smiles | Yes | ||
| shipToCountry | No | The country you want your order to be shipped to as two-letter country ISO code, e.g DE, US, FR | US |
| count | No | Maximum number of results on a page | |
| page | No | Number of the page | |
| categories | No | A list of product categories to searchCSSB - In-stock building blocksCSSS - In-stock screening compoundsCSMB - Make-on-demand building blocksCSMS - Make-on-demand screening compoundsCSCS - Custom request |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'search' but doesn't clarify if this is a read-only operation, what the output format might be, potential rate limits, authentication needs, or any side effects. For a search tool with 5 parameters and no annotation coverage, this is a significant gap in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence with no wasted words, making it easy to parse and front-loaded with the core purpose. It's appropriately sized for the tool's complexity, though it could benefit from more detail without sacrificing brevity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 5 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns, how results are structured, or provide context for parameters like 'shipToCountry' that seem unrelated to similarity search, leaving gaps in understanding the tool's full behavior and use case.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds no parameter semantics beyond the input schema, which has 80% coverage (4 out of 5 parameters have descriptions). Since schema coverage is high (>80%), the baseline score is 3, as the schema adequately documents most parameters, and the description doesn't compensate or add extra meaning for the undocumented 'smiles' parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Similarity search by SMILES' states the action (search) and resource (SMILES), but it's vague about what exactly is being searched (e.g., chemical compounds, databases) and doesn't differentiate from sibling tools like 'search_exact' or 'search_substructure', which likely perform different types of chemical searches. It provides a basic purpose but lacks specificity and distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description offers no guidance on when to use this tool versus alternatives like 'search_exact' or 'search_substructure', nor does it mention any prerequisites or contextual cues for its application. It's a standalone statement with no usage instructions, leaving the agent to infer based on the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_substructureC
Substructure search by SMILES
| Name | Required | Description | Default |
|---|---|---|---|
| smiles | Yes | ||
| shipToCountry | No | The country you want your order to be shipped to as two-letter country ISO code, e.g DE, US, FR | US |
| count | No | Maximum number of results on a page | |
| page | No | Number of the page | |
| categories | No | A list of product categories to searchCSSB - In-stock building blocksCSSS - In-stock screening compoundsCSMB - Make-on-demand building blocksCSMS - Make-on-demand screening compoundsCSCS - Custom request |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'search' but fails to describe key traits such as whether this is a read-only operation, potential rate limits, authentication needs, or what the search returns (e.g., results format, pagination). This leaves significant gaps in understanding the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with a single sentence 'Substructure search by SMILES', which is front-loaded and wastes no words. It efficiently communicates the core purpose without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of a search tool with 5 parameters, no annotations, and no output schema, the description is incomplete. It lacks details on behavioral traits, result handling, and differentiation from siblings, making it inadequate for the agent to fully understand and use the tool effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is high at 80%, providing good documentation for parameters like 'shipToCountry', 'count', 'page', and 'categories'. The description adds minimal value by specifying 'SMILES' as the search input, but it doesn't explain parameter interactions or usage beyond what the schema already covers, aligning with the baseline for high coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Substructure search by SMILES' clearly indicates the action (search) and resource (substructures), but it's vague about what exactly is being searched (e.g., chemical compounds, databases) and doesn't distinguish it from sibling tools like 'search_exact' or 'search_similarity'. It states the purpose but lacks specificity and differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'search_exact' or 'search_similarity'. There's no mention of context, prerequisites, or exclusions, leaving the agent without direction on tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
- First observed
search_exact - First observed
search_similarity - First observed
search_substructure
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose with no ambiguity: exact search, similarity search, and substructure search are well-defined and non-overlapping operations in cheminformatics. The descriptions specify different search types, making it easy for an agent to select the correct tool based on the required search method.
All tool names follow a consistent verb_noun pattern with 'search_' as the prefix, followed by a descriptive term (exact, similarity, substructure). This uniformity makes the tool set predictable and easy to understand, with no deviations in naming conventions.
With 3 tools, the server is well-scoped for its purpose of chemical search operations. Each tool earns its place by covering distinct search methods, and the count is appropriate for the domain without being too thin or heavy, allowing focused functionality.
The tool set provides comprehensive coverage for search operations in cheminformatics, including exact, similarity, and substructure searches. A minor gap exists in the lack of tools for additional chemical data operations like property retrieval or filtering, but the core search workflows are complete and functional.
Maintenance
Related MCP Connectors
Pay-per-use tool marketplace for AI agents. Search, price-check, and call APIs via MCP.
Discover, inspect and run 63,000+ agent tools from one balance. Pay per call, no subscriptions.
Web search, browser automation, scraping, crawling and CAPTCHA solving for AI agents.
Curated knowledge API for AI agents - skill packs, semantic search, validated patterns.
Related MCP Servers
- AlicenseAqualityAmaintenanceEnables AI agents and applications to search, retrieve, and analyze chemical compounds, substances, and bioassays from PubChem's vast chemical information database through comprehensive tools for chemical research and discovery.10133 npm9Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to search and retrieve chemical compound information, structures, and physical properties from the PubChem database. It supports querying via compound names, SMILES notation, or CIDs to provide detailed molecular data for chemical analysis.5-
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Edison Scientific platform's AI agents for scientific research, chemistry, and literature search, supporting tasks like synthesis planning, literature reviews, and data analysis.5MIT
- FlicenseBqualityDmaintenanceProvides computational chemistry tools for LLMs, enabling molecular operations like SMILES processing and geometry manipulation via a modular agent and tool system.9-