Skip to main content
Glama
Augmented-Nature

ChEMBL MCP Server

get_compound_info

Retrieve detailed chemical and biological data for compounds using their ChEMBL ID to support drug discovery and research analysis.

Instructions

Get detailed information for a specific compound by ChEMBL ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chembl_idYesChEMBL compound ID (e.g., CHEMBL59)

Implementation Reference

  • The handler function for the 'get_compound_info' tool. Validates the chembl_id argument and fetches detailed compound information from the ChEMBL API endpoint /molecule/{chembl_id}.json, returning the JSON data as text content.
    private async handleGetCompoundInfo(args: any) {
      if (!isValidChemblIdArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid ChEMBL ID arguments');
      }
    
      try {
        const response = await this.apiClient.get(`/molecule/${args.chembl_id}.json`);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(response.data, null, 2),
            },
          ],
        };
      } catch (error) {
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to get compound info: ${error instanceof Error ? error.message : 'Unknown error'}`
        );
      }
    }
  • The input schema definition for the 'get_compound_info' tool, specifying that it requires a 'chembl_id' string parameter.
      name: 'get_compound_info',
      description: 'Get detailed information for a specific compound by ChEMBL ID',
      inputSchema: {
        type: 'object',
        properties: {
          chembl_id: { type: 'string', description: 'ChEMBL compound ID (e.g., CHEMBL59)' },
        },
        required: ['chembl_id'],
      },
    },
  • src/index.ts:747-748 (registration)
    Registration of the 'get_compound_info' tool handler in the switch statement within the CallToolRequestSchema handler.
    case 'get_compound_info':
      return await this.handleGetCompoundInfo(args);
  • Helper validation function used by the get_compound_info handler to validate the input arguments contain a non-empty chembl_id string.
    const isValidChemblIdArgs = (
      args: any
    ): args is { chembl_id: string } => {
      return (
        typeof args === 'object' &&
        args !== null &&
        typeof args.chembl_id === 'string' &&
        args.chembl_id.length > 0
      );
    };
  • src/index.ts:409-736 (registration)
    Registration of the 'get_compound_info' tool in the tools array returned by ListToolsRequestSchema handler, including name, description, and input schema.
      {
        name: 'get_compound_info',
        description: 'Get detailed information for a specific compound by ChEMBL ID',
        inputSchema: {
          type: 'object',
          properties: {
            chembl_id: { type: 'string', description: 'ChEMBL compound ID (e.g., CHEMBL59)' },
          },
          required: ['chembl_id'],
        },
      },
      {
        name: 'search_by_inchi',
        description: 'Search for compounds by InChI key or InChI string',
        inputSchema: {
          type: 'object',
          properties: {
            inchi: { type: 'string', description: 'InChI key or InChI string' },
            limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 },
          },
          required: ['inchi'],
        },
      },
      {
        name: 'get_compound_structure',
        description: 'Retrieve chemical structure information in various formats',
        inputSchema: {
          type: 'object',
          properties: {
            chembl_id: { type: 'string', description: 'ChEMBL compound ID' },
            format: { type: 'string', enum: ['smiles', 'inchi', 'molfile', 'sdf'], description: 'Structure format (default: smiles)' },
          },
          required: ['chembl_id'],
        },
      },
      {
        name: 'search_similar_compounds',
        description: 'Find chemically similar compounds using Tanimoto similarity',
        inputSchema: {
          type: 'object',
          properties: {
            smiles: { type: 'string', description: 'SMILES string of the query molecule' },
            similarity: { type: 'number', description: 'Similarity threshold (0-1, default: 0.7)', minimum: 0, maximum: 1 },
            limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 },
          },
          required: ['smiles'],
        },
      },
      // Target Analysis & Drug Discovery (5 tools)
      {
        name: 'search_targets',
        description: 'Search for biological targets by name or type',
        inputSchema: {
          type: 'object',
          properties: {
            query: { type: 'string', description: 'Target name or search query' },
            target_type: { type: 'string', description: 'Target type filter (e.g., SINGLE PROTEIN, PROTEIN COMPLEX)' },
            organism: { type: 'string', description: 'Organism filter' },
            limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 },
          },
          required: ['query'],
        },
      },
      {
        name: 'get_target_info',
        description: 'Get detailed information for a specific target by ChEMBL target ID',
        inputSchema: {
          type: 'object',
          properties: {
            chembl_id: { type: 'string', description: 'ChEMBL target ID (e.g., CHEMBL2095173)' },
          },
          required: ['chembl_id'],
        },
      },
      {
        name: 'get_target_compounds',
        description: 'Get compounds tested against a specific target',
        inputSchema: {
          type: 'object',
          properties: {
            target_chembl_id: { type: 'string', description: 'ChEMBL target ID' },
            activity_type: { type: 'string', description: 'Activity type filter (e.g., IC50, Ki, Kd)' },
            limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 },
          },
          required: ['target_chembl_id'],
        },
      },
      {
        name: 'search_by_uniprot',
        description: 'Find ChEMBL targets by UniProt accession',
        inputSchema: {
          type: 'object',
          properties: {
            uniprot_id: { type: 'string', description: 'UniProt accession number' },
            limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 },
          },
          required: ['uniprot_id'],
        },
      },
      {
        name: 'get_target_pathways',
        description: 'Get biological pathways associated with a target',
        inputSchema: {
          type: 'object',
          properties: {
            target_chembl_id: { type: 'string', description: 'ChEMBL target ID' },
          },
          required: ['target_chembl_id'],
        },
      },
      // Bioactivity & Assay Data (5 tools)
      {
        name: 'search_activities',
        description: 'Search bioactivity measurements and assay results',
        inputSchema: {
          type: 'object',
          properties: {
            target_chembl_id: { type: 'string', description: 'ChEMBL target ID filter' },
            assay_chembl_id: { type: 'string', description: 'ChEMBL assay ID filter' },
            molecule_chembl_id: { type: 'string', description: 'ChEMBL compound ID filter' },
            activity_type: { type: 'string', description: 'Activity type (e.g., IC50, Ki, EC50)' },
            limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 },
          },
          required: [],
        },
      },
      {
        name: 'get_assay_info',
        description: 'Get detailed information for a specific assay by ChEMBL assay ID',
        inputSchema: {
          type: 'object',
          properties: {
            chembl_id: { type: 'string', description: 'ChEMBL assay ID (e.g., CHEMBL1217643)' },
          },
          required: ['chembl_id'],
        },
      },
      {
        name: 'search_by_activity_type',
        description: 'Find bioactivity data by specific activity type and value range',
        inputSchema: {
          type: 'object',
          properties: {
            activity_type: { type: 'string', description: 'Activity type (e.g., IC50, Ki, EC50, Kd)' },
            min_value: { type: 'number', description: 'Minimum activity value' },
            max_value: { type: 'number', description: 'Maximum activity value' },
            units: { type: 'string', description: 'Units filter (e.g., nM, uM)' },
            limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 },
          },
          required: ['activity_type'],
        },
      },
      {
        name: 'get_dose_response',
        description: 'Get dose-response data and activity profiles for compounds',
        inputSchema: {
          type: 'object',
          properties: {
            molecule_chembl_id: { type: 'string', description: 'ChEMBL compound ID' },
            target_chembl_id: { type: 'string', description: 'ChEMBL target ID (optional filter)' },
          },
          required: ['molecule_chembl_id'],
        },
      },
      {
        name: 'compare_activities',
        description: 'Compare bioactivity data across multiple compounds or targets',
        inputSchema: {
          type: 'object',
          properties: {
            molecule_chembl_ids: { type: 'array', items: { type: 'string' }, description: 'Array of ChEMBL compound IDs (2-10)', minItems: 2, maxItems: 10 },
            target_chembl_id: { type: 'string', description: 'ChEMBL target ID for comparison' },
            activity_type: { type: 'string', description: 'Activity type for comparison' },
          },
          required: ['molecule_chembl_ids'],
        },
      },
      // Drug Development & Clinical Data (4 tools)
      {
        name: 'search_drugs',
        description: 'Search for approved drugs and clinical candidates',
        inputSchema: {
          type: 'object',
          properties: {
            query: { type: 'string', description: 'Drug name or search query' },
            development_phase: { type: 'string', description: 'Development phase filter (e.g., Approved, Phase III)' },
            therapeutic_area: { type: 'string', description: 'Therapeutic area filter' },
            limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 },
          },
          required: ['query'],
        },
      },
      {
        name: 'get_drug_info',
        description: 'Get drug development status and clinical trial information',
        inputSchema: {
          type: 'object',
          properties: {
            chembl_id: { type: 'string', description: 'ChEMBL compound ID' },
          },
          required: ['chembl_id'],
        },
      },
      {
        name: 'search_drug_indications',
        description: 'Search for therapeutic indications and disease areas',
        inputSchema: {
          type: 'object',
          properties: {
            indication: { type: 'string', description: 'Disease or indication search term' },
            drug_type: { type: 'string', description: 'Drug type filter (e.g., Small molecule, Antibody)' },
            limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 },
          },
          required: ['indication'],
        },
      },
      {
        name: 'get_mechanism_of_action',
        description: 'Get mechanism of action and target interaction data',
        inputSchema: {
          type: 'object',
          properties: {
            chembl_id: { type: 'string', description: 'ChEMBL compound ID' },
          },
          required: ['chembl_id'],
        },
      },
      // Chemical Property Analysis (4 tools)
      {
        name: 'analyze_admet_properties',
        description: 'Analyze ADMET properties (Absorption, Distribution, Metabolism, Excretion, Toxicity)',
        inputSchema: {
          type: 'object',
          properties: {
            chembl_id: { type: 'string', description: 'ChEMBL compound ID' },
          },
          required: ['chembl_id'],
        },
      },
      {
        name: 'calculate_descriptors',
        description: 'Calculate molecular descriptors and physicochemical properties',
        inputSchema: {
          type: 'object',
          properties: {
            chembl_id: { type: 'string', description: 'ChEMBL compound ID' },
            smiles: { type: 'string', description: 'SMILES string (alternative to ChEMBL ID)' },
          },
          required: [],
        },
      },
      {
        name: 'predict_solubility',
        description: 'Predict aqueous solubility and permeability properties',
        inputSchema: {
          type: 'object',
          properties: {
            chembl_id: { type: 'string', description: 'ChEMBL compound ID' },
            smiles: { type: 'string', description: 'SMILES string (alternative to ChEMBL ID)' },
          },
          required: [],
        },
      },
      {
        name: 'assess_drug_likeness',
        description: 'Assess drug-likeness using Lipinski Rule of Five and other metrics',
        inputSchema: {
          type: 'object',
          properties: {
            chembl_id: { type: 'string', description: 'ChEMBL compound ID' },
            smiles: { type: 'string', description: 'SMILES string (alternative to ChEMBL ID)' },
          },
          required: [],
        },
      },
      // Advanced Search & Cross-References (4 tools)
      {
        name: 'substructure_search',
        description: 'Find compounds containing specific substructures',
        inputSchema: {
          type: 'object',
          properties: {
            smiles: { type: 'string', description: 'SMILES string of the substructure query' },
            limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 },
          },
          required: ['smiles'],
        },
      },
      {
        name: 'batch_compound_lookup',
        description: 'Process multiple ChEMBL IDs efficiently',
        inputSchema: {
          type: 'object',
          properties: {
            chembl_ids: { type: 'array', items: { type: 'string' }, description: 'Array of ChEMBL compound IDs (1-50)', minItems: 1, maxItems: 50 },
          },
          required: ['chembl_ids'],
        },
      },
      {
        name: 'get_external_references',
        description: 'Get links to external databases (PubChem, DrugBank, PDB, etc.)',
        inputSchema: {
          type: 'object',
          properties: {
            chembl_id: { type: 'string', description: 'ChEMBL compound or target ID' },
          },
          required: ['chembl_id'],
        },
      },
      {
        name: 'advanced_search',
        description: 'Complex queries with multiple chemical and biological filters',
        inputSchema: {
          type: 'object',
          properties: {
            min_mw: { type: 'number', description: 'Minimum molecular weight (Da)', minimum: 0 },
            max_mw: { type: 'number', description: 'Maximum molecular weight (Da)', minimum: 0 },
            min_logp: { type: 'number', description: 'Minimum LogP value' },
            max_logp: { type: 'number', description: 'Maximum LogP value' },
            max_hbd: { type: 'number', description: 'Maximum hydrogen bond donors', minimum: 0 },
            max_hba: { type: 'number', description: 'Maximum hydrogen bond acceptors', minimum: 0 },
            limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 },
          },
          required: [],
        },
      },
    ],

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Augmented-Nature/ChEMBL-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server