• DATA
  • IDENTIFIERS
  • FILTERING
  • HUMAN

How to find compounds by molecular formula with your AI

Connect PubChem to your agent to turn a chemical formula into a list of matching compounds. Once connected, your AI handles the database lookups for you.

Ask AI about this page

Short answer

How can I find all compounds with a specific molecular formula?

Give your AI a formula like C6H12O6 and tell it to find all matching compounds in PubChem. The AI will run a search and return a list of every substance in the database that fits that exact formula. You'll get a list of names and identifiers to work from.

The results you get

What the search produces

The AI handles the heavy lifting of querying the database and organizing the results.

DATA

Compound lists

The AI pulls every matching entry from PubChem. You get a list of names and molecular details for every hit.

IDENTIFIERS

Unique IDs

Each result includes specific PubChem identifiers. This makes it easy to cross-reference these compounds later.

FILTERING

Refined results

You can ask the AI to narrow down the list by specific properties once the initial search is done.

HUMAN

Manual verification

You decide which compounds are relevant to your research. The AI finds the matches, but you pick the winners.

The workflow

What your AI does when the formula arrives.

The AI acts as the bridge between your chat interface and the PubChem database.

  1. Parse formula

    Your AI reads your text to extract the exact molecular formula you want to search for.

    search_pubchem_formula
  2. Query PubChem

    The agent sends the formula to the database to find every matching chemical structure.

    search_pubchem_formula
  3. Compile results

    The AI gathers the names, CID numbers, and other metadata returned by the search.

    search_pubchem_formula
  4. Present data

    The AI formats the list into a readable table or list directly in your chat window.

    search_pubchem_formula

Try it

Copy these to start.

Use these prompts to trigger the search immediately.

Starting points

Swap out the chemical formulas in these examples for the ones you actually need.

PubChem Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_bfnYDABzlJ07TJu7Do9K5lCyve4Fg9F5YGb6KetY/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — PubChem capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "pubchem-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_bfnYDABzlJ07TJu7Do9K5lCyve4Fg9F5YGb6KetY/mcp"
    }
  }
}
Copy into chat04
  • Find all compounds in PubChem with the formula C6H12O6.

  • Search PubChem for any compounds that have the formula H2SO4.

  • List every compound matching the molecular formula NaCl.

  • I need a list of all substances with the formula CH4.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect PubChem once, then ask.

Just click to connect. Your credentials stay encrypted and private. Once it's live, your AI can start querying PubChem immediately.

Connect PubChem to your AI

FAQ

How this task behaves

  • 01

    Can the AI find compounds by name instead of formula?

    No. This specific tool is designed to search strictly by molecular formula.

  • 02

    Does the AI change any data in PubChem?

    No. The AI can only read data from PubChem. It cannot edit, delete, or add new compounds to the database.

  • 03

    Will the AI automatically download the results for me?

    No. The AI presents the results in your chat. You must manually copy them or ask the AI to format them for a specific file type.

  • 04

    Can I search for a range of formulas?

    No. You must provide a specific, exact molecular formula for the search to work.

  • 05

    Does this work with any AI client?

    Yes, it works with any MCP-compatible client like Claude, Cursor, or Windsurf.

  • More questions about PubChem? The Connector page answers them. See everything the PubChem Connector can do

Connect PubChem to Claude, Cursor, ChatGPT & more