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.
Clients with native OAuth support (recommended)
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-serverThis 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:
| Category | Tool | Description |
|---|---|---|
| Search | drug-autocomplete | Search for a drug by name |
terrain-autocomplete | Search for a patient condition (pathology, medical condition) | |
allergies-autocomplete | Search for an allergy (active ingredient, excipient, drug class) | |
| Structuring | posology-structuration | Convert free-text dosage instructions into structured format (FHIR) |
| Database | medical-database-getDrugMonographyByClinicalDrug | Get the complete monograph for a drug |
| Prescription analysis | prescription-analysis-getContraindicationsAndInteractions | Detect contraindications and drug interactions |
prescription-analysis-getAllergyIntolerance | Detect cross-allergic reactions | |
prescription-analysis-queryAlternatives | Suggest therapeutic alternatives | |
| Dosage analysis | dosages-analysis-getDosageAlert | Detect dosage issues |
| Calculators | patient-calculators-GetCalc | Calculate 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, orCIP13) - 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), orALL_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:
| Type | Description |
|---|---|
MAX_QUANTITY_PER_24_HOURS | Maximum quantity over 24 hours exceeded |
MAX_QUANTITY_PER_DOSE | Maximum quantity per dose exceeded |
MIN_QUANTITY_PER_24_HOURS | Minimum quantity over 24 hours not reached |
MAX_TREATMENT_DURATION | Maximum treatment duration exceeded |
MIN_TREATMENT_DURATION | Minimum treatment duration not reached |
MAX_PRESCRIPTION_DURATION | Maximum prescription duration exceeded |
MIN_DURATION_BETWEEN_DOSES | Minimum interval between doses not respected |
DIVISIBILITY | Tablet 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:
| Calculation | Description | Required data |
|---|---|---|
GLOMERULAR_FILTRATION_RATE | Glomerular filtration rate (GFR) | Date of birth, sex, creatinine, (height and weight for normalized formulas) |
BODY_MASS_INDEX | Body mass index (BMI) | Weight, height |
BODY_SURFACE_AREA | Body surface area | Weight, knee-heel distance |
HEIGHT | Height estimation | Date of birth, sex, knee-heel distance |
CORRECTED_ALBUMINEMIA | Corrected albuminemia | Albuminemia, CRP |
PREGNANCY_DUE_DATE | Expected delivery date | Date of last menstrual period |
PREGNANCY_WEEKS | Weeks of pregnancy | Date of last menstrual period |
AMENORRHEA_WEEKS | Weeks of amenorrhea | Date 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
| Terminology | Description | Example | Usage |
|---|---|---|---|
posos | Posos clinical drug (INN) | MV00001165 | All analysis tools |
cis | CIS code (French branded drug) | 67143532 | Prescription analysis tools |
CIP13 | 13-digit CIP code (packaging) | 3400949497294 | Prescription analysis tools |
CIP7 | 7-digit CIP code | — | Prescription analysis tools |
UCD7 / UCD13 | Common 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
| System | Usage | How to obtain |
|---|---|---|
| SNOMED-CT | Conditions, pathologies, allergies, indications | terrain-autocomplete or allergies-autocomplete |
| ICD-10 | Conditions (alternative) | terrain-autocomplete |
| LOINC | Biological observations (lab results) | Standard codes (see below) |
Common LOINC codes
| Code | Observation | Unit |
|---|---|---|
33914-3 | Glomerular filtration rate | mL/min/1.73m2 |
2160-0 | Creatinine | umol/L |
29463-7 | Body weight | kg |
8302-2 | Height | cm |
6298-4 | Potassium | mmol/L |
2951-2 | Sodium | mmol/L |
1920-8 | AST (GOT) | U/L |
1742-6 | ALT (GPT) | U/L |
718-7 | Hemoglobin | g/dL |
777-3 | Platelets | 10*9/L |
6301-6 | INR | {INR} |
8665-2 | Date 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:
Drug search
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.
Alternative search
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.