Pharos MCP Server: NCATS Targets, Drugs, Diseases
Explore the MCP server for Pharos (NCATS) to access target, drug, and disease data for drug discovery research.
npx -y @QuentinCody/pharos-mcp-serverOverview
The Pharos MCP Server implements a Model Context Protocol (MCP) front-end for the Pharos dataset (NCATS). It provides an HTTP API that exposes curated target, drug (compound), and disease metadata to developer tools, machine learning models, and discovery pipelines. By packaging Pharos data behind a simple, predictable API, the server makes it easy to fetch, search, and stream contextual information that can be used to enrich predictions, power UIs, or supply LLMs with up-to-date domain context.
This server is designed for developers who want a lightweight, local or containerized service that serves Pharos content in machine-friendly JSON. It is useful for reproducible research, sandboxed model evaluation, and integration into drug-discovery workflows where reliable programmatic access to target-drug-disease relationships is required.
Features
- Implements a Model Context Protocol (MCP)-style HTTP interface for serving Pharos content
- Endpoint groups for Targets, Drugs (compounds), and Diseases
- Full-text and fielded search over the dataset
- Single-record retrieval and bulk/filtered queries
- JSON responses optimized for downstream model ingestion
- Simple configuration via environment variables or command-line flags
- Docker-friendly: run locally or in CI pipelines
- CORS enabled for browser-based clients (configurable)
Installation / Configuration
Clone the repository and run the server locally, or use Docker. Replace Install from source (Node.js example) Run with Docker Configuration (environment variables) If your deployment uses a database (Postgres, SQLite), set DATABASE_URL accordingly and ensure the dataset is loaded or the server has migration tools to import Pharos data files. The server exposes resource endpoints for programmatic access. Below is a representative set of endpoints — exact routes may vary slightly depending on configuration or version. Check the repository README or OpenAPI spec for the authoritative list. Common query parameters: Example: get server manifest Example: fetch a target by id Example: perform a search Responses are JSON objects containing resource metadata and links suitable for programmatic consumption. Enriching LLM prompts with factual context Integrating with drug-discovery dashboards Batch annotation and feature generation Reproducible model evaluation Search-driven exploration and hypothesis generation Repository and source For exact API schema, data field names, and deployment options refer to the repository’s API documentation or OpenAPI/Swagger file.
# install dependencies
# start the server (default port 8080)
# or
# build the image
# run the container, mounting a local data directory
PORT - HTTP port to listen on (default: 8080)
DATA_DIR - Directory containing Pharos JSON/DB files (default: ./data)
DATABASE_URL - Optional DB connection string (if using external DB)
ENABLE_SEARCH - Enable full-text search indexing (true/false)
CORS_ORIGINS - Comma-separated list of allowed origins (default: *)
LOG_LEVEL - Logging verbosity (info, debug, warn, error)
Available Resources
Endpoint Method Description /mcp/manifest GET Returns MCP manifest / metadata about the server and available resources /targets GET List or query targets (filter/paginate) /targets/:id GET Retrieve a single target by identifier /drugs GET List or query drugs/compounds /drugs/:id GET Retrieve a single drug by identifier /diseases GET List or query diseases/phenotypes /diseases/:id GET Retrieve a single disease by identifier /search GET/POST Full-text and fielded search across resources
Use Cases
Tips for Developers