pubchem_data_extractor
Retrieves fundamental chemical characteristics for pharmaceutical agents via the PubChem Application Programming Interface (API), furnishing structured attributes like molar mass, elemental composition, alternate nomenclature, and official identifiers.
Author

sssjiang
Quick Info
Actions
Tags
PubChem Data Acquisition Utility
This utility component facilitates the acquisition of core molecular properties for specified compounds utilizing the PubChem RESTful API endpoint.
Prerequisites
- Runtime Environment: Python version 3.10 or higher
- Dependency Packages:
python-dotenvrequests(for HTTP communications)mcp(Core framework dependency)uvicorn(For potential serving infrastructure)
Setup Procedure
Local Dependency Installation:
- Execute installation directly from the source repository clone location:
bash git clone [project repository URL] cd [project directory] pip install .
Service Configuration (for MCP framework integration):
The servers_config.json file adheres to the configuration schema employed by Claude Desktop, enabling seamless integration across multiple defined network endpoints.
Example configuration snippet:
{ "mcpServers": { "pubchem_access": { "command": "uvx", "args": ["pubchem_data_extractor"] } } }
Illustrative Output Structure
When successfully executed against a compound record (e.g., Aspirin), the resulting data object will resemble this schema:
{ "Drug Name": "Aspirin", "CAS Number": "50-78-2", "Molecular Weight": 180.16, "Molecular Formula": "C9H8O4", "SMILES": "CC(=O)OC1=CC=CC=C1C(=O)O", "Synonyms": [ "2-(Acetyloxy)benzoic Acid", "Acetylsalicylic Acid", "Acetysal", "Acylpyrin", "Aloxiprimum", "Aspirin", "Colfarit", "Dispril", "Easprin" ], "InchI Key": "BSYNRYMUTXBXSQ-UHFFFAOYSA-N", "IUPAC Name": "2-acetyloxybenzoic acid", "ATC Code": "N02BA01", "Details Link": "https://pubchem.ncbi.nlm.nih.gov/compound/2244" }
