Version: 1.0.3
Runtime: ASP.NET Core 8.0
Production URL: https://www.medrecpro.com/mcp
This MCP (Model Context Protocol) server provides secure access to MedRecPro medical records functionality for AI assistants like Claude. It acts as an OAuth 2.1 gateway between MCP clients and the MedRecPro Web API.
The MCP server runs as an IIS virtual application at /mcp on the same Azure App Service as the main MedRecPro UI and API. IIS handles path-based routing to three separate ASP.NET Core processes:
| Virtual Path | Physical Path | Project | Purpose |
|---|---|---|---|
/ | site\wwwroot | MedRecProStatic | UI / Static content |
/api | site\wwwroot\api | MedRecPro | Web API |
/mcp | site\wwwroot\mcp | MedRecProMCP | MCP Server (this project) |
Add the following to your Claude Desktop configuration file:
{
"mcpServers": {
"medrecpro": {
"url": "https://www.medrecpro.com/mcp"
}
}
}
This server implements OAuth 2.1 with PKCE. When Claude connects, it automatically handles the authentication flow:
/mcp (unauthenticated)WWW-Authenticate header pointing to Protected Resource Metadata/.well-known/oauth-protected-resource (RFC 9728)/.well-known/oauth-authorization-server (RFC 8414)/oauth/register (Dynamic Client Registration, RFC 7591)/oauth/authorize?provider=google/oauth/callback/{provider}/oauth/token/mcp with Bearer tokenSupported OAuth scopes: openid, profile, email, mcp:tools, mcp:read, mcp:write
All endpoints are externally prefixed with /mcp by the IIS virtual application.
| Endpoint | Method | Description |
|---|---|---|
/mcp | POST | MCP Streamable HTTP transport (JSON-RPC) |
/mcp/health | GET | Health check (returns JSON status) |
/mcp/docs | GET | This documentation page |
/mcp/.well-known/oauth-protected-resource | GET | Protected Resource Metadata (RFC 9728) |
/mcp/.well-known/oauth-authorization-server | GET | Authorization Server Metadata (RFC 8414) |
/mcp/oauth/authorize | GET | OAuth authorization endpoint |
/mcp/oauth/token | POST | Token exchange endpoint |
/mcp/oauth/register | POST | Dynamic Client Registration (RFC 7591) |
/mcp/oauth/callback/google | GET | Google OAuth callback |
/mcp/oauth/callback/microsoft | GET | Microsoft OAuth callback |
GET /mcp returns HTTP 405 (Method Not Allowed). This is correct behavior — the MCP Streamable HTTP transport only accepts POST requests.
Once authenticated, Claude automatically discovers the following tools when connecting to the /mcp endpoint. Tools are organized into two categories:
Search and retrieve FDA drug label information from the MedRecPro database. All drug data is sourced from official FDA Structured Product Labeling (SPL) documents.
Searches for FDA drug labels and returns complete product details with markdown-formatted label sections. This is the primary tool for answering specific drug questions such as side effects, dosage, warnings, indications, and drug interactions.
Use when the user asks specific questions about a drug (e.g., "What are the side effects of Lipitor?" or "Compare aspirin and ibuprofen").
| Parameter | Type | Required | Description |
|---|---|---|---|
productNameSearch |
string | Optional | Brand/product name search (e.g., "Lipitor", "Advil", "Tylenol"). Supports partial matching. |
activeIngredientSearch |
string | Optional | Generic/active ingredient name search (e.g., "atorvastatin", "ibuprofen"). Supports partial matching. |
unii |
string | Optional | UNII (Unique Ingredient Identifier) code for exact chemical match (e.g., "R16CO5Y76E" for aspirin). |
sectionCode |
string | Optional | LOINC section code to filter results to a specific label section. See section codes table below. |
pageNumber |
int | Optional | Page number for pagination (1-based). Default: 1. |
pageSize |
int | Optional | Results per page (1–50). Default: 10. Recommended: 3 for initial searches since labels are large. |
Returns: Array of product objects containing ProductName, ActiveIngredient, UNII, DocumentGUID, markdown-formatted label Sections, and a ViewLabelUrl link to view the FDA label in a browser.
Exports a complete FDA drug label as clean, well-formatted markdown. Implements a two-step workflow: first search for products, then export the selected document.
Use when the user wants a complete label (e.g., "Show me the full label for Lipitor" or "Export the label for atorvastatin").
Step 1 — Product Search (call without documentGuid):
| Parameter | Type | Required | Description |
|---|---|---|---|
productNameSearch |
string | Optional | Brand/product name search (e.g., "Lipitor"). |
activeIngredientSearch |
string | Optional | Generic ingredient name search (e.g., "atorvastatin"). |
unii |
string | Optional | UNII code for exact ingredient match. |
Returns a list of matching products with ProductName, ActiveIngredient, UNII, and DocumentGUID. The user selects the correct product from the results.
Step 2 — Export Markdown (call with documentGuid):
| Parameter | Type | Required | Description |
|---|---|---|---|
documentGuid |
string | Required | DocumentGUID from Step 1 selection (e.g., "052493C7-89A3-452E-8140-04DD95F0D9E2"). |
Returns the complete label as formatted markdown with source links (ViewLabelUrl).
Use these codes with the sectionCode parameter in search_drug_labels to filter results to a specific label section:
| Code | Section | Typical User Question |
|---|---|---|
34067-9 | Indications and Usage | "What is this drug used for?" |
34084-4 | Adverse Reactions | "What are the side effects?" |
34070-3 | Contraindications | "When should I NOT use this?" |
43685-7 | Warnings and Precautions | "What are the warnings?" |
34068-7 | Dosage and Administration | "What is the dosage?" |
34073-7 | Drug Interactions | "Does this interact with other drugs?" |
34088-5 | Overdosage | "What happens in an overdose?" |
34066-1 | Boxed Warning | "Does this have a black box warning?" |
34090-1 | Clinical Pharmacology | "How does this drug work?" |
34076-0 | Use in Specific Populations | "Is this safe during pregnancy?" |
sectionCode returns empty results, retry without the sectionCode parameter to retrieve all available sections, then search the content for the relevant information.
Manage user profile and activity information. All operations require authentication.
Gets the current authenticated user's profile information including name, email, and roles.
No parameters required.
Gets the current user's recent activity log showing actions performed in the system.
| Parameter | Type | Required | Description |
|---|---|---|---|
pageNumber |
int | Optional | Page number (1-based). Default: 1. |
pageSize |
int | Optional | Results per page (1–100). Default: 20. |
Gets the current user's activity within a specific date range.
| Parameter | Type | Required | Description |
|---|---|---|---|
startDate |
string | Required | Start date in ISO 8601 format (e.g., 2024-01-01). |
endDate |
string | Required | End date in ISO 8601 format (e.g., 2024-12-31). |
pageNumber |
int | Optional | Page number (1-based). Default: 1. |
pageSize |
int | Optional | Results per page (1–100). Default: 20. |
| User Intent | Tool |
|---|---|
| "What are the side effects of X?" | search_drug_labels |
| "What is the dosage for X?" | search_drug_labels |
| "What are the warnings for X?" | search_drug_labels |
| "What is X used for?" | search_drug_labels |
| "Compare X and Y" | search_drug_labels |
| "Show me the full label for X" | export_drug_label_markdown |
| "Export the label" | export_drug_label_markdown |
| "Show me all information about X" | export_drug_label_markdown |
| "What is my profile?" | GetMyProfile |
| "Show my recent activity" | GetMyActivity |
For questions or issues, visit www.medrecpro.com