MedixHub Model Context Protocol (MCP) Server

MedixHub Model Context Protocol (MCP) Server

MedixHub - A Model Context Protocol (MCP) server with a collection of medical and healthcare APIs and tools.

profliuhao

Research & Data
Visit Server

README

MedixHub Model Context Protocol (MCP) Server

A Model Context Protocol (MCP) server with integrated medical and healthcare API access through MedixHub.

Features

  • Pure JavaScript implementation
  • Exposes functions with standardized MCP metadata
  • Executes functions with parameter validation
  • Seamlessly integrates with LLMs like Ollama
  • Secure API endpoints with authentication
  • Supports streaming responses

Implemented Functions

The server includes JavaScript implementations of these functions:

  1. executeOpenTargetQuery - Executes GraphQL queries against the OpenTarget API
  2. FDADrugLabelSearch - Retrieves drug information from the FDA database
  3. get_drug_generic_name - Maps between generic and brand drug names
  4. MonarchSearch - Searches the Monarch database for genes, diseases, or phenotypes
  5. MonarchDiseasesForMultiplePhenotypes - Finds diseases matching multiple phenotypes

OpenTarget Functions

  • Disease information lookup
  • Drug details and associations
  • Target (gene/protein) information
  • Disease-target associations
  • Drug-disease relationships

FDA Drug Label Functions

  • Drug information search
  • Generic and brand name mapping
  • Adverse reactions lookup
  • Drug interactions search

Monarch Database Functions

  • Biomedical entity search
  • Disease-phenotype associations
  • Gene-phenotype relationships
  • Multi-phenotype disease finder

Getting Started

Prerequisites

  • Node.js 14 or later
  • npm or yarn

Installation

  1. Clone the repository
git clone https://github.com/yourusername/medixhub-mcp-server.git
cd medixhub-mcp-server
  1. Install dependencies
npm install
  1. Configure environment variables
cp .env.example .env
# Edit .env with your settings
  1. Start the server
npm start

For development with auto-reload:

npm run dev

Usage

Execute API

Use the /execute endpoint to run any registered MedixHub function:

POST /execute
Content-Type: application/json

{
  "name": "queryFDADrugLabel",
  "parameters": {
    "searchFields": {
      "drug_name": ["openfda.brand_name", "openfda.generic_name"]
    },
    "returnFields": ["openfda.generic_name", "warnings"],
    "arguments": {
      "drug_name": "ibuprofen",
      "limit": 1
    }
  }
}

Direct MedixHub API

Use the /medixhub endpoints for direct API access:

  • /medixhub/opentargets
  • /medixhub/opentargets-genetics
  • /medixhub/drug-by-name
  • /medixhub/fda-drug-label
  • /medixhub/drug-generic-name
  • /medixhub/monarch
  • /medixhub/diseases-for-phenotypes

Function Metadata

Get information about available functions:

  • /functions - All available functions
  • /functions/medixhub - MedixHub-specific functions
  • /functions/category/:category - Functions by category

API Documentation

Full API documentation is available at /functions/medixhub

Development

Project Structure

medixhub-mcp-server/
├── server.js                   # Main server file
├── src/
│   ├── medixhub/               # MedixHub integration
│   ├── middleware/             # Middleware
│   ├── routes/                 # Route handlers
│   └── services/               # Services
├── examples/                   # Usage examples
└── tests/                      # Test suite

Adding New Functions

To add a new function to the registry:

const { registerFunction } = require('./src/services/functionRegistry');

registerFunction('myNewFunction', {
  name: 'myNewFunction',
  description: 'Description of what this function does',
  parameters: {
    // Parameter schema
  },
  function: async (params) => {
    // Implementation
    return result;
  }
});

Running Tests

npm test

Authentication

The server supports two authentication methods:

  1. API Keys: Simple key-based authentication
  2. JWT Tokens: More granular access control

In production mode, authentication is required for all endpoints except function discovery.

Environment Variables

Configure the server through the following environment variables:

  • PORT: Server port (default: 3000)
  • NODE_ENV: Environment ('development' or 'production')
  • OLLAMA_API_URL: URL for Ollama API
  • API_KEYS: Comma-separated list of valid API keys
  • FDA_API_KEY: API key for FDA drug database

See .env.example for all available options.

Performance Considerations

  • The server uses asynchronous processing for all API calls
  • Rate limiting is enabled to prevent abuse
  • Timeout handling prevents hanging requests
  • Memory usage is optimized by processing streams efficiently

License

This project is licensed under the MIT License - see the LICENSE file for details.

Recommended Servers

Crypto Price & Market Analysis MCP Server

Crypto Price & Market Analysis MCP Server

A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.

Featured
TypeScript
MCP PubMed Search

MCP PubMed Search

Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.

Featured
Python
dbt Semantic Layer MCP Server

dbt Semantic Layer MCP Server

A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.

Featured
TypeScript
mixpanel

mixpanel

Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.

Featured
TypeScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python
Nefino MCP Server

Nefino MCP Server

Provides large language models with access to news and information about renewable energy projects in Germany, allowing filtering by location, topic (solar, wind, hydrogen), and date range.

Official
Python
Vectorize

Vectorize

Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.

Official
JavaScript
Mathematica Documentation MCP server

Mathematica Documentation MCP server

A server that provides access to Mathematica documentation through FastMCP, enabling users to retrieve function documentation and list package symbols from Wolfram Mathematica.

Local
Python
kb-mcp-server

kb-mcp-server

An MCP server aimed to be portable, local, easy and convenient to support semantic/graph based retrieval of txtai "all in one" embeddings database. Any txtai embeddings db in tar.gz form can be loaded

Local
Python
Research MCP Server

Research MCP Server

The server functions as an MCP server to interact with Notion for retrieving and creating survey data, integrating with the Claude Desktop Client for conducting and reviewing surveys.

Local
Python