Get the FREE Ultimate OpenClaw Setup Guide →

ols

A model context protocol (MCP) server for the EBI Ontology Lookup Service (OLS)

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio seandavi-ols-mcp-server uv tool run ols-mcp-server

How to use

The OLS MCP Server provides a stable interface to the Ontology Lookup Service (OLS) API, enabling AI assistants to search ontologies, retrieve term and ontology metadata, and explore hierarchical relationships. It exposes tools such as searching terms across ontologies, discovering available ontologies, retrieving ontology information, obtaining detailed term data, navigating term children and ancestors, and finding semantically similar terms using embedded representations. This server is designed to be integrated with Claude Desktop or other MCP clients, so you can query biological and medical ontologies like GO, HP, MONDO, ChEBI, UBERON, and many others through natural language prompts while relying on OLS for up-to-date term data.

Once configured (for example via Claude Desktop), you can issue prompts like: “Search for terms related to diabetes in HP,” “Tell me about GO,” or “Show me the children of GO:0008150.” The Find Similar Terms capability uses LLM embeddings to surface terms semantically related to a query, which is helpful for ontology exploration and disambiguation. The server acts as a robust wrapper around the EBI OLS APIs, handling communication and formatting results for MCP clients.

How to install

Prerequisites

  • Python 3.12 or higher
  • uv (the uv package manager) installed

Install uv (if not already installed)

macOS/Linux

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows

powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

Install the OLS MCP Server

# Clone the repository
git clone https://github.com/seandavi/ols-mcp-server.git
cd ols-mcp-server

# Install dependencies via uv
uv sync

# (Optional) Install as a tool for easy invocation
uv tool install .

Configuration for Claude Desktop (example)

# Claude Desktop config snippet (macOS example)
{
  "mcpServers": {
    "ols-mcp-server": {
      "command": "uv",
      "args": [
        "tool",
        "run",
        "ols-mcp-server"
      ],
      "env": {}
    }
  }
}

Alternative configuration if installed as a uv tool

{
  "mcpServers": {
    "ols-mcp-server": {
      "command": "ols-mcp-server",
      "args": [],
      "env": {}
    }
  }
}

Additional notes

Tips and common considerations:

  • Ensure Python 3.12+ is active in your environment to satisfy the server’s requirements.
  • If you install as a uv tool, you can simplify the configuration by directly invoking the tool name (ols-mcp-server).
  • The server relies on the EBI OLS API endpoints; network connectivity and firewall rules should allow outbound HTTP(S) access to www.ebi.ac.uk/ols4.
  • For troubleshooting, verify that uv sync completed successfully and that the tool is discoverable in your environment. Check that the configured command and arguments point to the correct entry point provided by the repository.
  • API endpoints referenced include the OLS search, ontologies, terms, and hierarchies endpoints; these are used behind the scenes to return MCP-friendly responses.
  • If you update features or models, re-run tests (uv run pytest) and re-sync dependencies (uv sync).

Related MCP Servers

Sponsor this space

Reach thousands of developers