Skip to main content
Glama
SwissBioPics MCP Server

SwissBioPics MCP Server

by ZengZichao

SwissBioPics MCP Server

Version 0.1.0

⚠️ Disclaimer: This is an unofficial, third-party implementation and is not officially maintained by or affiliated with the SIB Swiss Institute of Bioinformatics or the SwissBioPics team. This project is independently developed. All SwissBioPics images and data are copyrighted by SIB.

An MCP (Model Context Protocol) server that provides AI assistants with access to SwissBioPics — a freely available library of interactive biological images for visualizing subcellular location data.


Table of Contents


Related MCP server: Cellpose MCP Server

Overview

SwissBioPics is a resource developed by the Swiss-Prot group at the SIB Swiss Institute of Bioinformatics. It provides an interactive library of cell images covering all kingdoms of life — from animal cells (muscle, neuron, epithelial, etc.) to fungal cells, plant cells, archaeal cells, and various bacterial morphologies (rod-shaped, coccus, spiral, etc.).

This MCP server exposes SwissBioPics data and functionality through a set of tools that AI assistants like Claude, ChatGPT, and others can discover and invoke. This enables conversational querying of subcellular location data, cell-type imagery, and biological descriptions.

中文文档: README_zh.md


About SwissBioPics

SwissBioPics is a freely available library of interactive biological images for visualizing subcellular location data. It includes cell types from all kingdoms of life.


Features

This MCP server provides the following capabilities:

  1. 🔍 Search — Search for subcellular locations and cell types using advanced query syntax (AND, OR, NOT, wildcards, fuzzy search, exact phrases).

  2. 💡 Auto-complete — Get search suggestions as users type.

  3. 📋 Cell Type Listing — List all available cell types from the SwissBioPics homepage.

  4. 🔬 Cell Type Details — Retrieve metadata for a specific cell type by ID or name.

  5. 🖼️ SVG Retrieval — Fetch the raw SVG illustration of a cell type.

  6. 📍 Location Extraction — Extract all subcellular locations (SL IDs, names, descriptions) from a cell type's SVG.

  7. 📖 Location Details — Look up the detailed description of a specific subcellular location by its SL identifier.

  8. ℹ️ Project Info — Get general information about the SwissBioPics project.


Prerequisites

  • Python 3.10+ (3.10, 3.11, 3.12, 3.13 all supported)

  • uv — Fast Python package manager (recommended) or pip

  • An MCP-compatible client (e.g., Claude for Desktop, Cursor, VS Code with Copilot Chat, or any other MCP client)


Installation

Option A: Using uv (recommended)

# Clone the repository
git clone https://github.com/ZengZichao/SwissBioPics-MCP.git
cd SwissBioPics-MCP

# Install dependencies with uv
uv sync

Option B: Using pip

git clone https://github.com/ZengZichao/SwissBioPics-MCP.git
cd SwissBioPics-MCP

# Create a virtual environment
python -m venv .venv

# Activate it
# On macOS/Linux:
source .venv/bin/activate
# On Windows:
.venv\Scripts\activate

# Install in development mode
pip install -e .

Configuration

Claude for Desktop

Edit your Claude configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the server entry:

{
  "mcpServers": {
    "swissbiopics": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/SwissBioPics-MCP",
        "run",
        "swissbiopics-mcp"
      ]
    }
  }
}

Windows: Use double backslashes (\\) or forward slashes (/) in the JSON path. Replace /ABSOLUTE/PATH/TO/ with your actual path, e.g., C:/Users/YourName/Projects/SwissBioPics-MCP.

If you installed via pip instead of uv, use:

{
  "mcpServers": {
    "swissbiopics": {
      "command": "python",
      "args": ["-m", "swissbiopics_mcp.server"],
      "cwd": "/ABSOLUTE/PATH/TO/SwissBioPics-MCP"
    }
  }
}

After saving, restart Claude for Desktop.

Cursor

Add to your Cursor MCP settings (Settings → MCP):

{
  "mcpServers": {
    "swissbiopics": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/SwissBioPics-MCP",
        "run",
        "swissbiopics-mcp"
      ]
    }
  }
}

VS Code (Copilot Chat)

Add to .vscode/mcp.json in your workspace or user settings:

{
  "servers": {
    "swissbiopics": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/SwissBioPics-MCP",
        "run",
        "swissbiopics-mcp"
      ]
    }
  }
}

Generic MCP Client

The server runs on the stdio transport and can be launched by any MCP-compatible client:

# If installed via uv
uv run swissbiopics-mcp

# If installed via pip
python -m swissbiopics_mcp.server

# Direct execution
python src/swissbiopics_mcp/server.py

Available Tools

Tool

Description

search_locations

Search for subcellular locations and cell types using advanced query syntax.

get_search_suggestions

Get auto-complete suggestions for a partial search query.

get_cell_types

List all available cell types on SwissBioPics.

get_cell_type_detail

Get details (title, SVG file, URLs) for a specific cell type by ID or name.

get_cell_svg

Retrieve the raw SVG image content of a cell type.

get_subcellular_locations

Extract all subcellular locations (SL IDs, names, descriptions) from a cell type's SVG.

get_location_detail

Get the detailed description of a specific subcellular location by its SL ID.

get_swissbiopics_info

Get general information about the SwissBioPics project.


Usage Examples

Here are example prompts you can use with your AI assistant after configuring the server:

Search for locations

"Search SwissBioPics for mitochondrion"

"Search for cell types that contain both 'endosome' and 'lysosome'"

List cell types

"What cell types are available on SwissBioPics?"

Get cell type details

"Get details for cell type 8719"

"Show me the Animal cell on SwissBioPics"

Retrieve SVG

"Get the SVG image for the Animal cell"

Explore subcellular locations

"List all subcellular locations in the Animal cell"

"What are the subcellular locations in a Plant cell?"

Look up a specific location

"What is SL0173 in SwissBioPics?"

"Get the description of SL-0243 (Secreted) in the Animal cell"

Get project info

"Tell me about the SwissBioPics project"


Query Syntax

The search_locations tool supports the following query syntax:

Syntax

Meaning

Example

term1 term2

AND — both terms must be present

spindle body

term1 AND term2

Explicit AND

spindle AND body

term1 OR term2

Either term

SL-0073 OR chromatophore

"exact phrase"

Exact phrase match

"golgi stack"

term1 -term2

NOT — exclude term2

endosome -peroxisome

term1 NOT term2

Explicit NOT

endosome NOT peroxisome

prefix*

Wildcard prefix

bact*

term~

Fuzzy search (≈2 typos)

rhoptri~ (finds "rhoptry")

(…)

Grouping / precedence

lumen AND (SL0158 OR wall)


Project Structure

SwissBioPics-MCP/
├── pyproject.toml                 # Project metadata & dependencies
├── README.md                      # English documentation (this file)
├── README_zh.md                   # Chinese documentation
├── LICENSE                        # MIT license
├── .gitignore                     # Git ignore rules
├── src/
│   └── swissbiopics_mcp/
│       ├── __init__.py            # Package metadata
│       └── server.py              # MCP server implementation
└── tests/
    ├── conftest.py                # Pytest configuration
    ├── test_parsers.py            # Unit tests for parsing functions
    └── test_tools.py              # Unit tests for MCP tool functions

Development

Setup

# Clone and install in development mode
git clone https://github.com/ZengZichao/SwissBioPics-MCP.git
cd SwissBioPics-MCP
uv sync

Run the server directly

uv run swissbiopics-mcp

Debug with MCP Inspector

# Using uv
uv run mcp dev src/swissbiopics_mcp/server.py

# Or using npx
npx @modelcontextprotocol/inspector uv run swissbiopics-mcp

Run tests

uv run pytest

License & Citation

License

This MCP server code is licensed under the MIT License — see LICENSE.

The SwissBioPics images and data are licensed under Creative Commons Attribution 4.0 International (CC BY 4.0). When using SwissBioPics images or data, please credit SwissBioPics as the source.

Citation

If you use SwissBioPics in your research, please cite:

SwissBioPics - an interactive library of cell images for the visualization of subcellular location data. Database. PMID: 35411389, DOI: 10.1093/database/baac026.


Acknowledgements

Available Tools

8 tools
get_cell_svgB

Retrieve the raw SVG image content of a cell type.

The SVG contains the full interactive cell illustration with embedded subcellular location data (SL IDs, names, and descriptions as hidden text elements).

Args: cell_identifier: Either a numeric cell ID (e.g. 8719) or a cell-type name (e.g. Animal_cell). You can also pass the SVG file name directly (e.g. Animal_cells.svg).

Returns: The raw SVG XML content as a string (may be large).

Inputs: cell_identifier (required). Returns: result

get_cell_type_detailA

Get details for a specific cell type by its numeric ID or name.

Args: cell_identifier: Either a numeric cell ID (e.g. 8719) or a cell-type name path (e.g. Animal_cell, Rod-shaped_bacteria:_one_membrane_(Gram+)). Numeric IDs can be found from search results or the cell-type list.

Returns: Cell type title, SVG file name, SVG URL, and a link to the page.

Inputs: cell_identifier (required). Returns: result

get_cell_typesB

List all available cell types on SwissBioPics.

SwissBioPics includes cell types from all kingdoms of life: animal cells (muscle, neuron, epithelial, etc.), fungal cells, plant cells, archaeal cells, and various bacterial morphologies (rod, coccus, spiral, etc.).

Returns: A formatted list of all cell types with their identifiers and URLs.

Inputs: no named parameters. Returns: result

get_location_detailA

Get the detailed description of a specific subcellular location.

Subcellular locations in SwissBioPics are identified by SL identifiers (e.g. SL0173 for Mitochondrion). This tool looks up the full description of a location as defined within a cell type's SVG.

Args: sl_id: The subcellular-location identifier (e.g. SL0173). Both SL0173 and SL-0173 formats are accepted. cell_identifier: The cell type to look up within. Defaults to 8719 (Animal cell) which has the most comprehensive set of locations. Can be a numeric ID, name, or SVG file name.

Returns: The location's SL ID, name, and full description.

Inputs: sl_id (required), cell_identifier. Returns: result

get_search_suggestionsA

Get auto-complete search suggestions for a partial query.

This is useful for interactive search experiences — as the user types, you can call this tool to show matching terms from the SwissBioPics vocabulary.

Args: query: A partial search term (e.g. mito).

Returns: A list of suggested completion terms.

Inputs: query (required). Returns: result

get_subcellular_locationsB

Extract all subcellular locations defined in a cell type's SVG.

Each location includes an SL identifier (e.g. SL0173), a human-readable name (e.g. Mitochondrion), and a detailed description.

Args: cell_identifier: Numeric cell ID (e.g. 8719), name path (e.g. Animal_cell), or SVG file name (e.g. Animal_cells.svg).

Returns: A formatted list of all subcellular locations with SL IDs, names, and truncated descriptions.

Inputs: cell_identifier (required). Returns: result

get_swissbiopics_infoA

Get general information about the SwissBioPics project.

Returns a summary including the project description, license, citation, and links to key resources.

Returns: A formatted information string about SwissBioPics.

Inputs: no named parameters. Returns: result

search_locationsB

Search SwissBioPics for subcellular locations and cell types.

The query supports advanced syntax:

  • spindle body or spindle AND body — both terms must be present (AND)

  • SL-0073 OR chromatophore — either term (OR)

  • "golgi stack" — exact phrase

  • endosome -peroxisome — exclude a term (NOT)

  • bact* — wildcard prefix

  • rhoptri~ — fuzzy search (allows ~2 typos)

  • Parentheses: lumen AND (SL0158 OR wall)

Args: query: Search query string using the syntax described above.

Returns: A formatted summary of matching cell types and their locations.

Inputs: query (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 8 tools

    Disambiguation5/5

    Tools operate at clearly distinct levels: search (free text and autocomplete), browse (list all cell types), detail (cell type, raw SVG, subcellular location list, location detail), and project info. Overlaps are minimal and descriptions clarify granularity (e.g., raw SVG vs. extracted location list).

    Naming Consistency5/5

    All eight tools use snake_case with a verb_noun structure (mostly get_*, one search_*), which is predictable and consistent. No mixed conventions or confusing abbreviations.

    Tool Count5/5

    8 tools is well-scoped for a read-only reference database covering search, browse, detail, and raw asset retrieval. Each tool fills a distinct need with no obvious redundancy or missing count pressure.

    Completeness4/5

    The surface covers search, suggestions, cell-type listing, cell-type detail, raw SVG, subcellular location listing, location detail, and project info. Minor gap: no global/aggregate listing of all subcellular locations across cell types without specifying a cell, but search can approximate this.

    Maintenance

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers