Socket
Book a DemoInstallSign in
Socket

@uh-joan/offx-mcp-server

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uh-joan/offx-mcp-server

OFF-X (Target Safety) MCP server for drug safety, adverse event, and target risk analytics.

0.1.11
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

OFFX MCP Server

MCP Server for searching drugs, adverse events, alerts, and scores in the OFFX (Target Safety) database.

Installation

# Using npm (if published)
npm install @uh-joan/offx-mcp-server

Quick Start

  • Set up your environment variables:
OFFX_API_TOKEN=your_offx_api_token
USE_HTTP=true  # Optional: run as HTTP server
PORT=3000      # Optional: specify port for HTTP server
  • Run the server:
# As MCP server
npx offx-mcp-server

# As HTTP server
USE_HTTP=true PORT=3000 npx offx-mcp-server

Features

  • Direct access to OFFX (Target Safety) drug and safety database
  • Search by drug, adverse event, target, action, or name
  • Retrieve alerts and scores for drugs
  • Structured JSON responses
  • Pagination support for large result sets

Supported Formats

The following types are OFFX-API compatible:

FieldFormatComments
datesyyyy-mm-ddSpecification ISO 8601
stringsStringNo quotes needed in JSON
numbersIntegerOnly accepts integers

Optional Filter Parameters

The following filters are OFFX-API compatible. For fields that accept multiple values, use comma-separated numbers (e.g., adverse_event_id=10000059,10000081).

FieldFormatAllowed Values/Comments
Adverse EventComma separated numberExample: adverse_event_id=10000059,10000081,10001761
Alert TypeComma separated number1 - Class Alert, 2 - Drug Alert
Alert PhaseComma separated number1 - Clinical/Postmarketing, 2 - Preclinical, 3 - Clinical, 4 - Postmarketing, 5 - Target Discovery, 6 - Phase I, 7 - Phase II, 8 - Phase III, 9 - Phase IV, 10 - Phase I/II, 11 - Phase II/III, 12 - Phase III/IV
Reference source typeComma separated number9 - Congress, 10 - Website Reference, 11 - Company Communication, 27 - Health Organization, 24 - Database, 22 - DailyMed, 23 - Regulatory Agency Briefing, 25 - Patent, 12 - Medical Society Communication, 13 - Research Institution Communication, 14 - Regulatory Agency Communication, 15 - Regulatory Agency Guideline, 16 - Patient Advocacy Group communication, 17 - Other, 18 - Book, 19 - Journal, 20 - Congress Alert, 21 - Congress & Conferences, 26 - Clinical Trial Registry
Level of evidenceComma separated number1 - Confirmed/Reported, 2 - Suspected, 3 - Refuted/Not Associated
On/Off TargetComma separated number1 - On-Target, 2 - Off-Target, 3 - Not Specified
Alert SeverityStringyes, no
OrderingStringorder_by_date=desc/asc, order_by_adv=desc/asc

Refer to these tables when using filter parameters in the endpoints below.

Tools

  • offx_search_drugs

    • Search drugs by name in the OFFX database
    • Input: { drug: string }
    • Example: { "drug": "everolimus" }
  • offx_get_drug_alerts

    • Retrieve alerts for a drug by drug_id (with optional filters)
    • Input: Complex object with drug_id and optional filters
    • Example: { "drug_id": "140448", "alert_type": "serious" }
  • offx_get_drugs_by_action

    • Retrieve drugs by target and action ID
    • Input: { target_id: string, action_id: string }
  • offx_get_drugs_by_adve

    • Retrieve drugs by adverse event ID
    • Input: { adverse_event_id: string, page?: number }
  • offx_get_drug_score

    • Get drug score by drug id (and optionally adverse event id)
    • Input: { drug_id: string, adverse_event_id?: string }
  • offx_search_adverse_events

    • Search adverse events by name in the OFFX database (min 3 chars)
    • Input: { adverse_event: string }
    • Example: { "adverse_event": "Anaemia" }
  • offx_get_adverse_events

    • Get adverse events by drug id or target id
    • Input: { drug_id?: string, target_id?: string }
  • offx_search_targets

    • Search targets by target name in the OFFX database
    • Input: { target: string }
    • Example: { "target": "ALK" }
  • offx_get_drug

    • Get drug masterview by drug id with optional filters
    • Input: Complex object with drug_id and optional filters
  • offx_get_target

    • Get target masterview by target_id and action_id with optional filters
    • Input: Complex object with target_id, action_id and optional filters
  • offx_get_targets

    • Get primary/secondary targets for a drug or targets by adverse event
    • Input: { drug_id?: string, type?: "primary"|"secondary", adverse_event_id?: string }

HTTP API Endpoints

When running in HTTP mode (USE_HTTP=true), the following REST endpoints are available. All endpoints accept a POST request with a JSON body as described below:

  • POST /offx_search_drugs

    • Search drugs by name in the OFFX database
    • Body: { "drug": "semaglutide" }
  • POST /offx_get_drug_alerts

    • Get alerts for a drug
    • Body: { "drug_id": "140448", "alert_type": "serious" }
  • POST /offx_get_drugs_by_action

    • Get drugs by target and action
    • Body: { "target_id": "12345", "action_id": "67890" }
  • POST /offx_get_drugs_by_adve

    • Get drugs by adverse event
    • Body: { "adverse_event_id": "12345" }
  • POST /offx_get_drug_score

    • Get drug safety score
    • Body: { "drug_id": "140448" }
  • POST /offx_search_adverse_events

    • Search adverse events by name
    • Body: { "adverse_event": "Anaemia" }
  • POST /offx_get_adverse_events

    • Get adverse events for drug/target
    • Body: { "drug_id": "140448" }
  • POST /offx_search_targets

    • Search targets by name
    • Body: { "target": "ALK" }
  • POST /offx_get_drug

    • Get drug masterview
    • Body: { "drug_id": "140448", "page": 1 }
  • POST /offx_get_target

    • Get target masterview
    • Body: { "target_id": "12345", "action_id": "67890", "page": 1 }
  • POST /offx_get_targets

    • Get targets for drug/adverse event
    • Body: { "drug_id": "140448", "type": "primary" }

Setup

Environment Variables

The server requires an OFFX API token:

OFFX_API_TOKEN=your_offx_api_token

Installing on Claude Desktop

Before starting make sure Node.js is installed on your desktop for npx to work.

  • Go to: Settings > Developer > Edit Config

  • Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "offx": {
      "command": "npx",
      "args": [
        "-y",
        "@uh-joan/offx-mcp-server"
      ],
      "env": {
        "OFFX_API_TOKEN": "your_offx_api_token"
      }
    }
  }
}
  • Restart Claude Desktop and start exploring drug safety data!

Build (for devs)

git clone https://github.com/uh-joan/offx-mcp-server.git
cd offx-mcp-server
npm install
npm run build

For local development:

# Copy example environment file
cp .env.example .env

# Edit .env with your credentials
vim .env  # or use your preferred editor

# Start the server
npm run start

Docker

docker build -t offx-mcp-server .
docker run -i --env-file .env offx-mcp-server

License

This MCP server is licensed under the MIT License.

Disclaimer

OFF-X™ is a commercial product and trademark of Clarivate Analytics. This MCP server requires valid OFF-X API credentials to function. To obtain credentials and learn more about OFF-X, please visit Clarivate's OFF-X page.

This project is not affiliated with, endorsed by, or sponsored by Clarivate Analytics. All product names, logos, and brands are property of their respective owners.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Note: For alert_type, use only numeric codes as a string:

CodeAlert Type
1Class Alert
2Drug Alert

You can specify more than one, e.g. "alert_type": "1,2".

Keywords

offx

FAQs

Package last updated on 08 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.