Skip to content

Posos MCP Server

What is MCP?

The Model Context Protocol (MCP) is an open protocol that allows AI assistants (such as Claude, ChatGPT, or any compatible agent) to use external tools in a standardized way. In practice, an MCP server exposes a set of tools that the AI assistant can automatically call whenever it needs to answer a question.

The Posos MCP server exposes all Posos medical APIs as MCP tools. This means your AI assistant can, in a single conversation:

  • Search for a drug, allergy, or patient condition
  • Analyze a prescription to detect interactions, contraindications, or dosage issues
  • Look up the complete monograph for a drug
  • Calculate clinical parameters (GFR, BMI, body surface area, etc.)
  • Suggest therapeutic alternatives

All without the user needing to know the underlying APIs: the AI assistant selects and chains tools autonomously.

Getting connected

⚠️

MCP server authentication is separate from the REST/GraphQL Posos APIs (which use Google IAP). The MCP server uses a dedicated OAuth 2.0 flow via Zitadel.

Obtain your OAuth credentials

Contact Posos to obtain your MCP server access credentials:

  • A client_id — unique identifier for your application
  • A client_secret — associated secret key

These credentials are generated by Posos for each partner. They are strictly confidential and must never be exposed in client-side code.

Configure your MCP client

The configuration method depends on your MCP client’s OAuth support.

OAuth-compatible MCP clients (such as Claude Desktop) can handle authentication automatically. The MCP server exposes an OAuth discovery endpoint:

https://mcp.production.posos.co/.well-known/oauth-authorization-server

This endpoint automatically provides the authorization and token exchange URLs. Simply configure the MCP server with its URL:

{
  "mcpServers": {
    "posos": {
      "url": "https://mcp.production.posos.co/api/v1/mcp"
    }
  }
}

The client will automatically open an authorization window on first connection. You will need to authenticate and authorize access.

The OAuth flow used is Authorization Code with PKCE (S256). Most modern MCP clients handle this flow transparently.

Clients without OAuth support

If your MCP client does not support OAuth natively, you must obtain an access token manually and pass it as a header:

1. Obtain an access token

Exchange your credentials for a token via the Zitadel token endpoint:

curl -X POST https://zitadel.production.posos.co/oauth/v2/token \
  -d "grant_type=client_credentials" \
  -d "client_id=<YOUR_CLIENT_ID>" \
  -d "client_secret=<YOUR_CLIENT_SECRET>" \
  -d "scope=openid urn:zitadel:iam:org:project:id:333168797043131145:aud"
⚠️

The scope urn:zitadel:iam:org:project:id:333168797043131145:aud is required. Without this scope, the token will not be accepted by the MCP server.

2. Configure the client with the token

{
  "mcpServers": {
    "posos": {
      "url": "https://mcp.production.posos.co/api/v1/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_TOKEN>"
      }
    }
  }
}

Start using the tools

Once connected, your AI assistant automatically discovers the available tools. You can ask questions in natural language and it will call the Posos tools autonomously.

The MCP server uses Streamable HTTP transport. Sessions are managed automatically via the mcp-session-id header. Most MCP clients handle this mechanism transparently.

Available tools

The MCP server exposes 10 tools across 5 categories:

CategoryToolDescription
Searchdrug-autocompleteSearch for a drug by name
terrain-autocompleteSearch for a patient condition (pathology, medical condition)
allergies-autocompleteSearch for an allergy (active ingredient, excipient, drug class)
Structuringposology-structurationConvert free-text dosage instructions into structured format (FHIR)
Databasemedical-database-getDrugMonographyByClinicalDrugGet the complete monograph for a drug
Prescription analysisprescription-analysis-getContraindicationsAndInteractionsDetect contraindications and drug interactions
prescription-analysis-getAllergyIntoleranceDetect cross-allergic reactions
prescription-analysis-queryAlternativesSuggest therapeutic alternatives
Dosage analysisdosages-analysis-getDosageAlertDetect dosage issues
Calculatorspatient-calculators-GetCalcCalculate clinical parameters (GFR, BMI, etc.)

Search and identification

Drug autocomplete (drug-autocomplete)

Searches for a drug by name (even partial or approximate) and returns its identifiers.

The tool accepts a list of search terms and returns the best candidates for each, including:

  • The Posos code (e.g., MV00001165) and associated terminology
  • The full drug name (INN + dosage + form)
  • The type: clinical drug (CLINICAL_DRUG), branded drug (BRANDED_DRUG), packaged drug (PACKAGED_DRUG), or ingredient (INGREDIENT)
  • Ingredients and ATC classification

Good to know: This tool is often the starting point of a workflow. Other analysis tools expect Posos drug codes — autocomplete lets you obtain them from a simple name.

Condition autocomplete (terrain-autocomplete)

Searches for a patient condition (pathology, medical condition) and returns associated codes (SNOMED-CT, ICD-10). These codes are used to populate the patient profile when running contraindication analysis.

Allergy autocomplete (allergies-autocomplete)

Searches for an allergy by name and returns corresponding codes. Handles allergies to active ingredients, excipients, and drug classes.

Posology structuring (posology-structuration)

Converts free-text dosage instructions (e.g., “1 tablet morning and evening for 7 days”) into structured FHIR format. The result includes frequency, dose, and duration information in a format usable by the dosage analysis tool.

Each result includes a confidence score indicating the reliability of the structuring.


Medical database

Monograph (medical-database-getDrugMonographyByClinicalDrug)

Returns the complete monograph for a clinical drug: therapeutic indications, recommended dosages, adverse effects, alerts, and drug class interactions.

This tool expects a Posos clinical drug code (prefix MV, e.g., MV00000004). Use drug-autocomplete with the CLINICAL_DRUG type to obtain this code from a drug name.

⚠️

Only Posos clinical drug codes (prefix MV) are accepted. CIS or CIP13 codes are not compatible with this tool.


Prescription analysis

These tools analyze a drug prescription taking the patient profile into account.

Contraindications and interactions (prescription-analysis-getContraindicationsAndInteractions)

Detects contraindications (related to the patient’s conditions) and drug interactions (between the drugs in the prescription).

Inputs:

  • Drugs: list of drug codes (terminology posos, cis, or CIP13)
  • Patient (optional): sex, date of birth, conditions (SNOMED-CT codes), biological observations (LOINC codes)
  • Alert types (optional): filter by type (ABSOLUTE_CONTRAINDICATION, RELATIVE_CONTRAINDICATION, PRECAUTION, WARNING)

Good to know: The more complete the patient profile, the more relevant the analysis. Without a patient profile, only drug interactions will be detected.

Cross-allergies (prescription-analysis-getAllergyIntolerance)

Detects cross-allergic reactions between the drugs in a prescription and the patient’s known allergies.

Inputs:

  • Drugs: list of drug codes
  • Allergies: list of allergy codes (SNOMED-CT or Posos drug classes, obtained via allergies-autocomplete)

Therapeutic alternatives (prescription-analysis-queryAlternatives)

Suggests safer alternative treatments for a given drug, based on a specific therapeutic indication and the patient profile.

Inputs:

  • Drug to replace (code + terminology)
  • Therapeutic indication (SNOMED-CT code)
  • Filtering level: NO_RISK (no risk), NO_SEVERE_RISK (no severe risk), or ALL_ALTERNATIVES (all alternatives)
  • Patient (optional): conditions and concurrent treatments

Dosage analysis

Dosage alerts (dosages-analysis-getDosageAlert)

Detects dosage issues for a list of drugs: overdose, underdose, excessive treatment duration, divisibility problems, etc.

Available alert types:

TypeDescription
MAX_QUANTITY_PER_24_HOURSMaximum quantity over 24 hours exceeded
MAX_QUANTITY_PER_DOSEMaximum quantity per dose exceeded
MIN_QUANTITY_PER_24_HOURSMinimum quantity over 24 hours not reached
MAX_TREATMENT_DURATIONMaximum treatment duration exceeded
MIN_TREATMENT_DURATIONMinimum treatment duration not reached
MAX_PRESCRIPTION_DURATIONMaximum prescription duration exceeded
MIN_DURATION_BETWEEN_DOSESMinimum interval between doses not respected
DIVISIBILITYTablet divisibility issue

Good to know: Dosage must be provided in FHIR format (dosageInstruction). If you have free-text dosage instructions, first use the posology-structuration tool to convert them.


Medical calculators

Calculator (patient-calculators-GetCalc)

Performs common clinical calculations from patient data.

Available calculations:

CalculationDescriptionRequired data
GLOMERULAR_FILTRATION_RATEGlomerular filtration rate (GFR)Date of birth, sex, creatinine, (height and weight for normalized formulas)
BODY_MASS_INDEXBody mass index (BMI)Weight, height
BODY_SURFACE_AREABody surface areaWeight, knee-heel distance
HEIGHTHeight estimationDate of birth, sex, knee-heel distance
CORRECTED_ALBUMINEMIACorrected albuminemiaAlbuminemia, CRP
PREGNANCY_DUE_DATEExpected delivery dateDate of last menstrual period
PREGNANCY_WEEKSWeeks of pregnancyDate of last menstrual period
AMENORRHEA_WEEKSWeeks of amenorrheaDate of last menstrual period, (cycle duration, optional)

Multiple formulas are available for some calculations (e.g., Cockroft, MDRD, CKD-EPI for GFR).


Codes and terminologies

The analysis tools use different coding systems. Here are the main ones:

Drug codes

TerminologyDescriptionExampleUsage
pososPosos clinical drug (INN)MV00001165All analysis tools
cisCIS code (French branded drug)67143532Prescription analysis tools
CIP1313-digit CIP code (packaging)3400949497294Prescription analysis tools
CIP77-digit CIP code—Prescription analysis tools
UCD7 / UCD13Common Dispensing Unit—Prescription analysis tools

Good to know: The posos code (clinical drug, prefix MV) is the recommended format. It is compatible with all tools and represents the drug independently of the brand. Use drug-autocomplete to obtain this code.

Condition and observation codes

SystemUsageHow to obtain
SNOMED-CTConditions, pathologies, allergies, indicationsterrain-autocomplete or allergies-autocomplete
ICD-10Conditions (alternative)terrain-autocomplete
LOINCBiological observations (lab results)Standard codes (see below)

Common LOINC codes

CodeObservationUnit
33914-3Glomerular filtration ratemL/min/1.73m2
2160-0Creatinineumol/L
29463-7Body weightkg
8302-2Heightcm
6298-4Potassiummmol/L
2951-2Sodiummmol/L
1920-8AST (GOT)U/L
1742-6ALT (GPT)U/L
718-7Hemoglobing/dL
777-3Platelets10*9/L
6301-6INR{INR}
8665-2Date of last menstrual period(date)

Complete workflow example

Here is a typical conversation with an AI assistant connected to the Posos MCP server:

User: “My 72-year-old patient takes simvastatin and his doctor wants to add clarithromycin. Is there a risk?”

The AI assistant automatically chains the following tools:

The assistant calls drug-autocomplete with the terms “simvastatin” and “clarithromycin” to obtain the Posos codes (MV00001165 and MV00000271).

Interaction analysis

The assistant calls prescription-analysis-getContraindicationsAndInteractions with both drugs and the patient profile (age 72).

Result

The assistant detects a contraindication: clarithromycin is a potent CYP3A4 inhibitor, which increases the risk of rhabdomyolysis with simvastatin.

The assistant can then call prescription-analysis-queryAlternatives to suggest an alternative antibiotic compatible with simvastatin.

This entire workflow happens transparently within a simple conversation, without the user needing to interact with the APIs directly.