SO

seandavi/ols-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

26 stars 6 forks 质量 48 趋势 11

EBI 本体查找服务(OLS)的模型上下文协议(MCP)服务器

概览

大型语言模型在处理本体论方面表现不佳,常常产生术语或标识符的幻觉。该服务器为访问和查询本体提供了可靠的方式,确保信息准确且及时。 该仓库包含一个模型上下文协议(MCP)服务器,提供访问本体查找服务(OLS)API 的权限。该服务器使 AI 助手能够从各种生物和医学本体中搜索和检索本体术语、概念和层级。 该服务器设计为与 Claude Desktop 等 AI 助手无缝协作,允许用户使用自然语言查询本体。它支持多种本体,包括基因本体(GO)、人类表型本体(HP)等多种。

概述(AI 翻译)

大型语言模型在处理本体论方面表现不佳,常常产生术语或标识符的幻觉。该服务器为访问和查询本体提供了可靠的方式,确保信息准确且及时。

该仓库包含一个模型上下文协议(MCP)服务器,提供访问本体查找服务(OLS)API 的权限。该服务器使 AI 助手能够从各种生物和医学本体中搜索和检索本体术语、概念和层级。

该服务器设计为与 Claude Desktop 等 AI 助手无缝协作,允许用户使用自然语言查询本体。它支持多种本体,包括基因本体(GO)、人类表型本体(HP)等多种。

无(下图上方)和已启用MCP服务器(下图下方):

特色

OLS MCP 服务器提供以下工具:

  • ** 🔍 搜索词**:通过灵活筛选跨本体搜索词
  • ** 📚 搜索本体**:发现可用的本体及其元数据
  • ** i️ 获取本体论信息**:检索特定本体论的详细信息

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

OLS MCP Server

Large Language Models are notoriously bad at working with ontologies, often hallucinating terms or their identifiers. This server provides a reliable way to access and query ontologies, ensuring accurate and up-to-date information.

This repository contains a Model Context Protocol (MCP) server providing access to the Ontology Lookup Service (OLS) API. This server enables AI assistants to search for and retrieve ontological terms, concepts, and hierarchies from various biological and medical ontologies.

This server is designed to work seamlessly with AI assistants like Claude Desktop, allowing users to query ontologies using natural language. It supports a wide range of ontologies, including Gene Ontology (GO), Human Phenotype Ontology (HP), and many others.

Without (top part of image below) and with mcp server engaged (bottom of figure below):

Features

The OLS MCP Server provides the following tools:

  • 🔍 Search Terms: Search for terms across ontologies with flexible filtering
  • 📚 Search Ontologies: Discover available ontologies and their metadata
  • ℹ️ Get Ontology Information: Retrieve detailed information about specific ontologies
  • 🎯 Get Term Information: Get comprehensive details about specific terms
  • 🌳 Get Term Children: Find direct child terms in ontological hierarchies
  • 👨‍👩‍👧‍👦 Get Term Ancestors: Retrieve parent terms and ancestors
  • 🤖 Find Similar Terms: Discover semantically similar terms using LLM embeddings

Supported Ontologies

The server works with any ontology available through the EBI Ontology Lookup Service, including:

  • GO (Gene Ontology)
  • EFO (Experimental Factor Ontology)
  • HP (Human Phenotype Ontology)
  • MONDO (Monarch Disease Ontology)
  • ChEBI (Chemical Entities of Biological Interest)
  • UBERON (Uber-anatomy ontology)
  • And many more…

Installation

Prerequisites

  • Python 3.12 or higher
  • uv package manager

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
uv sync

# Install as a tool (optional)
uv tool install .

Configuration

Claude Desktop Configuration

To use this server with Claude Desktop, add the following configuration to your Claude Desktop config file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

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