OFFX MCP Server

by uh-joan

132 downloads Not rated yet MIT license
GitHub

About

# OFFX MCP Server MCP Server for searching drugs, adverse events, alerts, and scores in the OFFX (Target Safety) database. ## Installation ```bash # Using npm (if published) npm install @uh-joan/offx-mcp-server ``` ## Quick Start 1. Set up your environment variables: ```env OFFX_API_TOKEN=your_offx_api_token…

Details

License
MIT license

Explore

- 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

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name OFFX MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository


The server requires an OFFX API token:

env
OFFX_API_TOKEN=your_offx_api_token

Before starting make sure Node.js is installed on your desktop for npx to work.
1. Go to: Settings > Developer > Edit Config

2. Add the following to your claude_desktop_config.json:

json
{
"mcpServers": {
"offx": {
"command": "npx",
"args": [
"-y",
"@uh-joan/offx-mcp-server"
],
"env": {
"OFFX_API_TOKEN": "your_offx_api_token"
}
}
}
}
```

3. Restart Claude Desktop and start exploring drug safety data!

cp .env.example .env

page

defaults to 1 if not specified

1. search_drugs
- Search drugs by name
- Input: { drug: string }
- Example: { "drug": "everolimus" }

2. get_drugs
- Get drugs by either both target_id and action_id (together), or only adverse_event_id (not just one of target_id/action_id)
- Input: { target_id?: string, action_id?: string, adverse_event_id?: string, page?: number }
- You must provide:
- both target_id and action_id (for target/class search), or
- only adverse_event_id (for adverse event search)
- page defaults to 1 if not specified
- Examples:
- { "target_id": "123", "action_id": "456" }
- { "adverse_event_id": "10001551" }

3. get_alerts
- Get alerts for a drug (by drug_id) or a target (by target_id, with optional action_id)
- Input: { drug_id?: string, target_id?: string, action_id?: string, page?: number, adverse_event_id?: string, ref_source_type?: string, alert_type?: string, alert_phase?: string, alert_level_evidence?: string, alert_onoff_target?: string, alert_severity?: string, alert_causality?: string, alert_species?: string, alert_date_from?: string, alert_date_to?: string, order_by_date?: string, order_by_adv?: string }
- Requirements:
- You must provide exactly one of: drug_id or target_id (not both, not neither)
- For drug alerts: drug_id is required
- For target alerts: target_id is required, action_id is optional
- page is required but defaults to 1 if not specified
- Examples:
- { "drug_id": "11204", "page": 1 }
- { "target_id": "158", "page": 1 }
- { "target_id": "158", "action_id": "15", "page": 2, "alert_type": "2" }

4. get_score
- Get drug score by drug_id (and optionally adverse_event_id), or get target/class score by target_id and action_id (and optionally adverse_event_id)
- Input: { drug_id?: string, adverse_event_id?: string, target_id?: string, action_id?: string }
- Requirements:
- You must provide either drug_id (alone), or both target_id and action_id (together)
- Do not provide neither, all, or just one of target_id/action_id
- Examples:
- { "drug_id": "99402" }
- { "drug_id": "99402", "adverse_event_id": "10001551" }
- { "target_id": "158", "action_id": "15" }
- { "target_id": "158", "action_id": "15", "page": 2, "alert_type": "2" }

5. get_drug
- Get drug masterview by drug id (with optional filters)
- Input: { drug_id: string, page: number, adverse_event_id?: string, ref_source_type?: string, alert_type?: string, alert_phase?: string, alert_level_evidence?: string, alert_severity?: string, alert_causality?: string, alert_species?: string, alert_date_from?: string, alert_date_to?: string }
- Examples:
- { "drug_id": "11204", "page": 1 }
- { "drug_id": "11204", "page": 2, "alert_type": "2" }

6. search_adverse_events
- Search adverse events by name (min 3 chars)
- Input: { adverse_event: string }
- Example: { "adverse_event": "Anaemia" }

7. get_adverse_events
- Get adverse events by drug id or target id (provide exactly one)
- Input: { drug_id?: string, target_id?: string }
- Examples:
- { "drug_id": "12345" }
- { "target_id": "67890" }

8. search_targets
- Search targets by target name
- Input: { target: string }
- Example: { "target": "ALK" }

9. get_target
- Get target masterview by target_id and action_id (both required; with optional filters)
- Input: { target_id: string, action_id: string, page?: number, adverse_event_id?: string, ref_source_type?: string, alert_type?: string, alert_phase?: string, alert_level_evidence?: string, alert_onoff_target?: string, alert_severity?: string, alert_causality?: string, alert_species?: string, alert_date_from?: string, alert_date_to?: string }
- Requirements:
- Both target_id and action_id are required
- page is optional and defaults to 1 if not specified
- Examples:
- { "target_id": "158", "action_id": "15" }
- { "target_id": "158", "action_id": "15", "page": 2, "alert_type": "2" }

10. get_targets
- Get primary or secondary targets for a drug by drug_id, or targets by adverse_event_id
- Input: { drug_id?: string, type?: 'primary' | 'secondary', adverse_event_id?: string }
- Requirements:
- You must provide exactly one of: drug_id or adverse_event_id (not both, not neither)
- If drug_id is provided and type is not specified, it defaults to 'primary'
- Returns:
- { primary_targets: [...] } or { secondary_targets: [...] } (for drug search)
- { targets: [...] } (for adverse event search)
- Examples:
- { "drug_id": "11204" } (returns primary targets)
- { "drug_id": "11204", "type": "secondary" }
- { "adverse_event_id": "10001551" }

> Note: See the Supported Formats and Optional Filter Parameters sections above for allowed values and formats for filter fields such as adverse_event_id, alert_type, alert_phase, ref_source_type, alert_level_evidence, alert_onoff_target, alert_severity, and ordering fields.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "offx mcp server": {
            "offx-mcp-server": {
                "command": "npx",
                "args": [
                    "offx-mcp-server"
                ]
            }
        }
    }
}

McpServers

{
    "offx-mcp-server": {
        "command": "npx",
        "args": [
            "offx-mcp-server"
        ]
    }
}

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

Installation

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.