Skip to main content
Glama
README.md
# ๐Ÿงฌ SciAgent (mcp-server-bioscience)

[English](README.md) | [็ฎ€ไฝ“ไธญๆ–‡](README_zh.md)

[![MCP Standard](https://img.shields.io/badge/MCP-Standard-blue)](https://github.com/modelcontextprotocol/mcp)
[![Python 3.10+](https://img.shields.io/badge/Python-3.10+-brightgreen)](https://python.org)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Glama](https://glama.ai/mcp/servers/wangshuaifbj-collab/mcp-server-bioscience/badges/score.svg)](https://glama.ai/mcp/servers/wangshuaifbj-collab/mcp-server-bioscience)

**SciAgent** (BioScience MCP Server) is a high-performance, security-focused Model Context Protocol (MCP) server that empowers AI Agents with cutting-edge biological, medical, and scientific capabilities. 

By connecting your AI Assistant (Claude Desktop, Cursor, Claude Code, Aider, etc.) to **SciAgent**, you eliminate AI hallucinations regarding scientific facts and instantly grant it the ability to interact with real-world, authoritative scientific databases.

---

## ๐ŸŒŸ Core Capabilities

* ๐Ÿ“š **Academic Literature Mining**: Direct access to **PubMed** and **Europe PMC** for the latest peer-reviewed papers.
* ๐Ÿฅ **Clinical Trials Data**: Query global clinical trial data from **ClinicalTrials.gov** by disease, drug, phase, or status.
* ๐Ÿงฌ **Genomic Data Analysis**: Query genetic variants, gene coordinates, and metadata from **Ensembl** and **dbSNP**.
* ๐Ÿงช **Drug Discovery**: Fetch molecule properties and drug targets from **ChEMBL**.
* ๐Ÿ”ฌ **Structural Biology**: Retrieve and analyze 3D protein structures directly from **AlphaFold** and **UniProt**.

---

## ๐Ÿ—๏ธ Architecture

```mermaid
graph LR
    A[AI Agent<br/>Claude/Cursor] <-->|Model Context Protocol| B((SciAgent<br/>MCP Server))
    B <--> C[(PubMed)]
    B <--> D[(AlphaFold)]
    B <--> E[(ChEMBL)]
    B <--> F[(Ensembl)]
    style B fill:#2b5c8f,stroke:#fff,stroke-width:2px,color:#fff
```

## ๐Ÿ›ก๏ธ Built for AI Safety (Codex Security Ready)

When AI processes third-party biological data (such as parsing massive PDB files or reading unverified scientific texts), it is highly susceptible to **Prompt Injection** and **Context Overflow**. 

**SciAgent** is engineered with a security-first approach:
- **Sanitizer Middleware**: Strictly validates API responses.
- **Context Management**: Truncates and summarizes massive biological payloads before handing data back to the LLM.

---

## ๐Ÿš€ Quick Start

### 1. Installation

This package requires `uv` or `pip`. We highly recommend using `uv` for maximum speed.

```bash
# Clone the repository
git clone https://github.com/wangshuaifbj-collab/mcp-server-bioscience.git
cd mcp-server-bioscience

# Install
uv pip install -e .
```

*(Ensure that the `mcp-bioscience` executable is added to your system's PATH after installation).*

### 2. Connect to Your AI

#### For Claude Desktop
Add the following configuration to your `claude_desktop_config.json`:
```json
{
  "mcpServers": {
    "bioscience": {
      "command": "mcp-bioscience"
    }
  }
}
```

#### For Cursor
1. Go to `Settings` -> `Features` -> `MCP`
2. Click `+ Add New MCP Server`
3. Choose `command` type
4. Set Name: `bioscience`
5. Set Command: `mcp-bioscience`

#### For Claude Code
Run the following command in your terminal to easily add the server:
```bash
claude mcp add bioscience -- mcp-bioscience
```

---

## ๐Ÿ’ฌ Example Use Case

**You**: *"Can you find the latest papers on the mechanism of Imatinib and show me its primary protein target structure?"*

**Claude (powered by SciAgent)**: 
1. *Calls `search_literature` (PubMed) to find the latest Imatinib papers.*
2. *Calls `get_gene_info` to identify BCR-ABL1.*
3. *Calls `get_protein_structure` (AlphaFold) to return the structural confidence metrics of the target.*
4. *Provides you with a comprehensive, fully-cited response without hallucinations!*

---

## ๐Ÿค Contributing

We welcome contributions! Whether it's adding a new database (like KEGG or GEO) or improving the existing parsers, please feel free to open a Pull Request. This project aims to be the standard bioinformatics toolkit for the global Agent ecosystem.

TDQS

A4.2/5.0

Scored across 4 tools

Disambiguation5/5

Each tool targets a distinct bioscience database: PubMed for literature, AlphaFold for protein structure, Ensembl for gene info, and ChEMBL for molecules. There is no overlap in purpose or resource.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern: search_literature, get_protein_structure, get_gene_info, get_chembl_molecule. The verbs 'search' and 'get' are used predictably based on the action performed.

Tool Count5/5

With just 4 tools, the server is carefully scoped to cover the most common bioscience queries. This is within the ideal range and each tool earns its place.

Completeness4/5

The set covers literature search, gene lookup, protein structure, and molecule search, providing a solid foundation for bioscience research. Missing features like variant or pathway lookup are minor gaps rather than critical dead ends.

Maintenance

ActivitySlowing
ResponsivenessNo issues