{"slug": "give-your-ai-agent-a-scientist-s-library-a-science-mcp-server", "title": "Give Your AI Agent a Scientist's Library. a Science MCP Server", "summary": "Valyu has launched a hosted science MCP server that gives AI agents access to full-text scientific literature, clinical trials, patents, and other structured data sources. The server exposes eleven tools, including valyu_search, valyu_academic_search, and valyu_bio_search, and can be integrated with Claude Desktop via a custom connector. A controlled before-and-after test demonstrates that scoping queries to specific scientific collections improves the relevance and depth of results.", "body_md": "Most \"research agent\" demos are searching abstracts and calling it literature review. The abstract tells you a Phase 3 melanoma immunotherapy trial hit its endpoint. It does not tell you the imaging protocol used to assess tumour response that lives in the methods section, or a supplementary table, or a figure caption.\n\nThis walks through wiring a hosted science MCP server into your AI agent, scoping it to actual scientific collections, and running a controlled before-and-after test where exactly one variable changes.\n\nValyu is a search API built for AI agents:one endpoint over biomedical literature, clinical trial registries, patents, financial filings and the open web, returning full text and structured metadata with resolvable identifiers rather than a list of links to go click.\n\n`mcp-remote`\n\n.`query`\n\nand `max_num_results`\n\nand nothing else.`included_sources`\n\nin the API, then check `result.source`\n\non every hit.`include_abstracts=True`\n\n`result.doi`\n\n— read it, don't prompt for it.`pip install valyu`\n\nfor the API examplesNo Node.js. The hosted server is remote HTTP.\n\nThe endpoint is:\n\n```\nhttps://mcp.valyu.ai/mcp?valyuApiKey=YOUR_API_KEY\n```\n\nAuth rides in the query string. You can cap spend per session by appending `&maxPrice=50`\n\n.\n\n**Claude Desktop / claude.ai** — go to [claude.ai/settings/connectors](https://claude.ai/settings/connectors) → Add custom connector → paste the URL.\n\nEleven tools, not one :\n\n| Tool | Arguments | Use |\n|---|---|---|\n`valyu_search` |\n`query` , `max_num_results` , `fast_mode`\n|\nWeb search returning full page content |\n`valyu_academic_search` |\n`query` , `max_num_results`\n|\nFull text across arXiv, PubMed, bioRxiv, medRxiv |\n`valyu_bio_search` |\n`query` , `max_num_results`\n|\nPubMed, clinical trials, FDA labels, bioRxiv, medRxiv, ChEMBL, PubChem, DrugBank, Open Targets, NPI Registry, WHO ICD |\n`valyu_patents` |\n`query` , `max_num_results`\n|\nPatent documents — claims, abstracts, inventors, filings |\n`valyu_contents` |\n`urls` |\nExtract content from up to 10 URLs |\n`valyu_datasources` |\n`category` |\nEnumerate the 36+ datasets at runtime |\n\nPlus `valyu_financial_search`\n\n, `valyu_sec_search`\n\n(adds `response_length`\n\n), `valyu_company_research`\n\n(`company`\n\n, `sections`\n\n), `valyu_economics_search`\n\nand `valyu_datasources_categories`\n\n.\n\n*(API and SDK only — see the constraint above.)*\n\nSources are addressed two ways through `included_sources`\n\n: **presets** (curated bundles) and **dataset IDs** (individual collections).\n\nPresets: `academic`\n\n, `finance`\n\n, `patent`\n\n, `health`\n\n, `genomics`\n\n, `chemistry`\n\n, `physics`\n\n, `legal`\n\n, `politics`\n\n, `transportation`\n\n, `pulse`\n\n, `cybersecurity`\n\n, `environment`\n\n, `automotive`\n\n, `compliance`\n\n, `medical`\n\n.\n\n**Watch the preset boundaries — this bites people.** `academic`\n\ncovers literature and preprints only:\n\n| Dataset ID | Preset | Coverage |\n|---|---|---|\n`valyu/valyu-pubmed` |\nacademic | 37M+ open-access biomedical papers, monthly |\n`valyu/valyu-arxiv` |\nacademic | Physics, CS, maths, quant finance, economics |\n`valyu/valyu-biorxiv` |\nacademic | 250K+ life-sciences preprints |\n`valyu/valyu-medrxiv` |\nacademic | 80K+ clinical/health preprints |\n`valyu/valyu-chemrxiv` |\nacademic | 30K+ chemistry preprints |\n`valyu/valyu-clinical-trials` |\nhealth |\n500K+ ClinicalTrials.gov studies, real-time |\n`valyu/valyu-drug-labels` |\nhealth |\n150K+ FDA labels via DailyMed |\n`valyu/valyu-patents` |\npatent |\n8M+ USPTO filings, full text and figures |\n`valyu/valyu-patents-epo` |\npatent |\n4M+ European filings from 1978 |\n`valyu/valyu-chembl` |\nchemistry |\n2.5M+ bioactive compounds |\n`valyu/valyu-pubchem` |\nchemistry |\n100M+ compounds |\n`valyu/valyu-open-targets` |\nchemistry |\n60K+ drug targets |\n\n`valyu_bio_search`\n\nadditionally reaches DrugBank, the NPI Registry and WHO ICD codes, which aren't broken out as dataset IDs in the datasources guide.\n\nClinical trials are **not** in `academic`\n\n. If you scope a trial question to the academic preset you will get papers *about* trials, not registry records. Use `health`\n\n, or name `valyu/valyu-clinical-trials`\n\ndirectly.\n\n``` python\nfrom valyu import Valyu\n\nvalyu = Valyu(api_key=\"YOUR_API_KEY\")  # or set VALYU_API_KEY\n\nresponse = valyu.search(\n    \"Phase 3 melanoma immunotherapy trials\",\n    search_type=\"proprietary\",          # all | web | proprietary | news\n    included_sources=[\"valyu/valyu-pubmed\"],\n    max_num_results=10,\n)\n\nfor result in response.results:\n    print(result.title)\n    print(result.source)          # check this\n    print(result.doi)\n    print(result.content)\n```\n\n**Then check the results.** Every `SearchResult`\n\ncarries a `source`\n\nfield. After each search, confirm each result came from a collection you declared. If something arrives from elsewhere, treat the output as unscoped and rerun tighter. Filtering narrows the search; it is not a guarantee of exclusion.\n\nNote `excluded_sources`\n\naccepts dataset IDs and domains but **not** presets.\n\nHere's the part worth running, with one honest caveat up front.\n\nBy default (`include_abstracts=False`\n\n), PubMed search is restricted to **papers that have available full text**. Setting `include_abstracts=True`\n\n**expands** the search to PubMed's complete abstract corpus and returns document-level abstracts.\n\nSo this is *not* a clean single-variable A/B. Two things change at once: the corpus gets bigger, and the returned granularity drops to abstract level. It's still the sharpest comparison the API gives you, but describe it accurately — you are comparing *full-text-only retrieval* against *broad abstract-level retrieval*, not \"the same search with and without full text.\"\n\nYou want a detail that lives in the methods, a figure caption, or a supplement:\n\nWhat imaging protocol did the trial use for tumour response assessment?\n\n```\nabstract_run = valyu.search(\n    \"Phase 3 melanoma immunotherapy tumour response assessment imaging protocol\",\n    search_type=\"proprietary\",\n    included_sources=[\"valyu/valyu-pubmed\"],\n    include_abstracts=True,      # widen to the full PubMed abstract corpus\n    max_num_results=10,\n)\n```\n\n**This has to run in Python, not through the MCP client.** No MCP tool accepts `include_abstracts`\n\n— see the section above. Save the output verbatim. This is your baseline.\n\n```\nfulltext_run = valyu.search(\n    \"Phase 3 melanoma immunotherapy tumour response assessment imaging protocol\",\n    search_type=\"proprietary\",\n    included_sources=[\"valyu/valyu-pubmed\"],\n    include_abstracts=False,     # default — papers with available full text only\n    max_num_results=10,\n)\n```\n\nIdentical query, identical source, identical result count. Save that too.\n\nPut them side by side. Does the abstract-only answer contain the imaging protocol? Does the full-text one?\n\nIf full text surfaces evidence abstract-only missed, you have a controlled result — **for this query, this index, and this date.**\n\nThings not to do with it:\n\nFour things, or nobody can reproduce it: the exact call parameters, the full verbatim output, the source list, and the correction.\n\n```\n{\n  \"query\": \"<identical query string used in both runs>\",\n  \"shared_params\": {\n    \"search_type\": \"proprietary\",\n    \"included_sources\": [\"valyu/valyu-pubmed\"],\n    \"max_num_results\": 10\n  },\n  \"run_abstract_only\": {\n    \"include_abstracts\": true,\n    \"output\": \"<full output, verbatim>\",\n    \"sources_returned\": [\"<result.source values>\"]\n  },\n  \"run_full_text\": {\n    \"include_abstracts\": false,\n    \"output\": \"<full output, verbatim>\",\n    \"sources_returned\": [\"<result.source values>\"]\n  },\n  \"run_date\": \"<YYYY-MM-DD>\",\n  \"correction\": {\n    \"missed_by_abstract\": \"<what was missing>\",\n    \"found_in_full_text\": \"<what full-text surfaced>\",\n    \"source_doi\": \"<result.doi>\",\n    \"location\": \"<methods / figure caption / supplement>\"\n  }\n}\n```\n\nRecord the date — PubMed syncs monthly and trials update in real time, so the same call will drift.\n\nEvery claim links to a resolvable identifier. This is the line between a science agent and a chatbot with a search tool.\n\n| Source type | Identifier | Resolves at |\n|---|---|---|\n| Journal articles | DOI | `https://doi.org/<doi>` |\n| Preprints (bioRxiv, medRxiv, ChemRxiv) | DOI | `https://doi.org/<doi>` |\n| Clinical trials | NCT number | `https://clinicaltrials.gov/study/<nct>` |\n| US patents | USPTO patent number | USPTO patent search portal |\n\nYou don't have to parse these out of prose — `SearchResult`\n\nexposes `doi`\n\n, `citation`\n\n, `authors`\n\n, `publication_date`\n\n, `citation_count`\n\nand `source`\n\nas structured fields. Read them directly rather than asking the model to extract them.\n\nDo not demand a DOI for everything. Trials and patents have their own registries, and a prompt that insists on DOIs produces fabricated ones.\n\n```\nFor every factual claim, cite a resolvable identifier: a DOI for journal\narticles, an NCT number for clinical trials, or a patent number for patents.\nIf the result has no identifier, give the URL and state that the claim is\nunverified. Never construct an identifier that was not returned.\n```\n\nThree scoped searches, correct preset for each:\n\n``` python\nfrom valyu import Valyu\n\nvalyu = Valyu(api_key=\"YOUR_API_KEY\")\n\n# Literature — academic preset\nlit = valyu.search(\n    \"PD-1 inhibitor combination therapy melanoma\",\n    search_type=\"proprietary\",\n    included_sources=[\"academic\"],\n)\n\n# Clinical trials — registry records live in health, NOT academic\ntrials = valyu.search(\n    \"PD-1 inhibitor melanoma Phase 3\",\n    search_type=\"proprietary\",\n    included_sources=[\"valyu/valyu-clinical-trials\"],\n)\n\n# Patents — USPTO full text and figures\npatents = valyu.search(\n    \"PD-1 antibody immunotherapy\",\n    search_type=\"proprietary\",\n    included_sources=[\"valyu/valyu-patents\"],\n)\n```\n\nDOIs for the literature, NCT numbers for the trials, patent numbers for the patents.\n\nValyu's DeepResearch (`POST /v1/deepresearch/tasks`\n\n) spans the same catalogue asynchronously. It *can* reach across domains in one task, but verify the returned sources match your intended scope before treating the output as complete.\n\n**Source provenance** — read `result.source`\n\non every result. If it isn't a collection you declared, the run is unscoped.\n\n**Identifier resolution** — verify the cited identifier actually resolves before presenting the claim. DOI at doi.org, NCT at clinicaltrials.gov, patent through USPTO. Doesn't resolve → unverified.\n\n**Full-text availability** — PubMed full text is open access only, and `include_abstracts=True`\n\nmeans you got abstracts *instead of* full text. Have the agent state which mode it ran in. An agent reasoning over an abstract as though it read the paper is the failure this whole post is about.\n\n**Preprint status** — bioRxiv, medRxiv and ChemRxiv are not peer-reviewed. Label them as preprints, with server name and DOI, so the reader can judge evidence level.\n\n**Citation entailment** — when the agent says a source supports a statement, confirm the passage is actually in the returned `content`\n\n. If it cites a figure, confirm the figure came back.\n\n**Missing assets** — figures, tables and supplements are not retrievable from every source. `valyu/valyu-patents`\n\nis the one dataset documented as carrying full text and figures; don't assume that generalises to the preprint servers. If an asset isn't there, the agent says so rather than substituting.\n\nRetrieval is not a redistribution licence. The [Valyu Acceptable Use Policy](https://www.valyu.ai/valyu-acceptable-use-policy) applies across all APIs, datasets, models and indexes. You must not:\n\n**The contents endpoint is your responsibility.** Per the AUP: *\"You — not Valyu — are the party responsible for ensuring that your use of the Contents endpoint in connection with any given URL is lawful and authorised.\"* Before submitting a URL, review the target's terms and acceptable use policy, and confirm automated extraction isn't prohibited by `robots.txt`\n\n, `X-Robots-Tag`\n\nheaders or `<meta name=\"robots\">`\n\ndirectives.\n\nIn practice: the agent reads and reasons over retrieved content in-session and does not store it for redistribution. And retrieved research is not a substitute for professional medical advice, or for a human reading the primary source.\n\n`included_sources`\n\nset, with the right preset for the source type`max_num_results`\n\n`include_abstracts`\n\ndiffers between the two runs, and the writeup says the corpus widened too`result.source`\n\nchecked on every result`doi`\n\n, NCT number or patent number`/v1/contents`\n\nwithout checking terms and robots directives**How do I run the same question through both abstract-only and full-content workflows?**\n\nIn Python, not through MCP — no MCP tool exposes `include_abstracts`\n\n. Issue the identical query twice against `valyu/valyu-pubmed`\n\n, once with `include_abstracts=True`\n\nand once with the default `False`\n\n, keeping `search_type`\n\n, `included_sources`\n\nand `max_num_results`\n\nfixed. Save both outputs verbatim.\n\n**Can I restrict my Claude Desktop agent to just PubMed?**\n\nNo. MCP search tools accept only `query`\n\nand `max_num_results`\n\n. Your scope control is which tool the agent picks. For real source pinning, call the API directly.\n\n**What makes a good test question?**\n\nOne where the decisive detail sits outside the abstract — imaging protocols, assay conditions, eligibility subtleties. \"What imaging protocol did the Phase 3 melanoma immunotherapy trial use for tumour response assessment?\" works because that lives in methods or a supplement.\n\n**Why did my clinical trial search return papers instead of registry records?**\n\nYou almost certainly scoped to the `academic`\n\npreset. Clinical trials live in `health`\n\n— use `included_sources=[\"valyu/valyu-clinical-trials\"]`\n\n.\n\n**How should the agent cite results without DOIs?**\n\nNCT number for trials, patent number for patents. If none exists, the URL plus an explicit note that the claim is unverified. Read `result.doi`\n\nrather than having the model extract it.", "url": "https://wpnews.pro/news/give-your-ai-agent-a-scientist-s-library-a-science-mcp-server", "canonical_source": "https://dev.to/valyuai/give-your-ai-agent-a-scientists-library-a-science-mcp-server-4pdb", "published_at": "2026-08-24 13:29:29+00:00", "updated_at": "2026-08-24 13:43:27.594285+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "developer-tools", "artificial-intelligence"], "entities": ["Valyu", "Claude Desktop", "Claude.ai", "PubMed", "arXiv", "bioRxiv", "medRxiv", "ClinicalTrials.gov"], "alternates": {"html": "https://wpnews.pro/news/give-your-ai-agent-a-scientist-s-library-a-science-mcp-server", "markdown": "https://wpnews.pro/news/give-your-ai-agent-a-scientist-s-library-a-science-mcp-server.md", "text": "https://wpnews.pro/news/give-your-ai-agent-a-scientist-s-library-a-science-mcp-server.txt", "jsonld": "https://wpnews.pro/news/give-your-ai-agent-a-scientist-s-library-a-science-mcp-server.jsonld"}}