GnistAI GnistAI
Log in

PubChem

Chemical compound data — structures, properties, bioactivity, and safety information.

Overview   |   MCP Docs   |   API Docs   |   OpenAPI   |   Playground   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 5 tools tools 5 5 Science

Data source: PubChem (NCBI)

MCP MCP Protocol

Endpoint https://context.gnist.ai/mcp/pubchem/
claude_desktop_config.json
{
  "mcpServers": {
    "gnist-pubchem": {
      "url": "https://context.gnist.ai/mcp/pubchem/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}
Shell
curl -X POST "https://context.gnist.ai/mcp/pubchem/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_compound", "arguments": {"identifier": "example"}}}'

API REST API

API Root https://context.gnist.ai/rest/pubchem/

5 endpoints available:

Shell
curl "https://context.gnist.ai/rest/pubchem/get_compound?identifier=example" \
  -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx

resp = httpx.get(
    "https://context.gnist.ai/rest/pubchem/get_compound",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    params={
        "identifier": "example"
},
)
print(resp.json())

OpenAPI Spec  ·  Full API Docs

CLI Command Line

Command gc pubchem

CLI documentation will be available when the GnistAI SDK is published.

Install
pip install gnistai

Available Tools (5)

get_compound
Look up a chemical compound by name, CID, InChIKey, or SMILES.
ParameterTypeRequiredDescription
identifierstringrequiredThe compound identifier. Examples: - By name: "aspirin", "caffeine", "glucose" - By CID: "2244" (aspirin's PubChem CID) - By InChIKey: "BSYNRYMUTXBXSQ-UHFFFAOYSA-N" - By SMILES: "CC(=O)O...
namespacestringoptionalHow to interpret the identifier. One of: "name" (default), "cid", "inchikey", "smiles". (default: "name")
search_compounds
Search PubChem for chemical compounds by name or keyword.
ParameterTypeRequiredDescription
querystringrequiredChemical name or keyword (e.g., "aspirin", "beta-lactam", "serotonin").
max_resultsintegeroptionalNumber of results to return (1–50, default 10). (default: 10)
get_compound_properties
Fetch physicochemical properties for a PubChem compound by CID.
ParameterTypeRequiredDescription
cidintegerrequiredPubChem Compound ID (e.g., 2244 for aspirin). Found in search_compounds results.
propertiesanyoptionalOptional list of specific property names to fetch. If omitted, returns all standard properties. Available properties include: MolecularFormula, MolecularWeight, CanonicalSMILES, IsomericSMILES, InC...
find_similar_compounds
Find structurally similar compounds using 2D Tanimoto similarity.
ParameterTypeRequiredDescription
cidintegerrequiredPubChem Compound ID to use as the query structure.
thresholdintegeroptionalTanimoto similarity threshold (0–100, default 90). Higher values return only very close structural matches. 90 is a common threshold for drug analog searches. (default: 90)
max_resultsintegeroptionalNumber of similar compounds to return (1–50, default 10). (default: 10)
report_feedback
Report a bug, feature request, or general feedback for this data source.
ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")

Related