Skip to main content

MCP server for PharmaPendium data extraction — converts extraction results to XLSX, expands drug/concomitant rows, and uploads to Azure Blob Storage

Project description

mcp-server-pp

MCP server for PharmaPendium data extraction — converts extraction results to XLSX, expands drug/concomitant rows, and uploads to Azure Blob Storage.

Tools

save_extraction

Converts a JSON array of extraction results into an XLSX file, uploads it to Azure Blob Storage, and returns a download URL (valid 7 days).

If the user provided corrections or new rules during the extraction session, pass them in notes — they are saved as a separate Notes sheet inside the XLSX for traceability.

Parameters:

  • json_data (required): JSON array string — extraction results, one object per row
  • file_name (optional): Output filename (with or without .xlsx). Defaults to extraction_results.xlsx
  • notes (optional): User corrections, comments, or new rules applied in this session

expand_concomitants

Takes a JSON array of rows (from the built-in Excel tool) with Drug Name and Concomitants columns and rotates each drug into the title slot. The Concomitants cell is parsed as CT-style free text: drugs separated by ;, each entry shaped as Name (aliases), route, dose, dose_comment, duration. For each input row, emits N+1 rows — the promoted drug's parsed metadata populates Drug Name, Route, Dose/Concentration, Dose Comment, and Treatment Duration; the displaced drugs are re-serialized back into Concomitants. All other columns are copied unchanged. Semicolons inside (...) and semicolons followed by non-drug continuations (digits, or/and, bare units) are preserved within a single drug's metadata; bare-name segments at the start of a chunk are merged as combination-drug components (e.g. Elexacaftor; Tezacaftor; Ivacaftor (ELX; TEZ; IVA), orally, ... stays one entry).

Parameters:

  • json_data (required): JSON array string of row objects — read via the built-in Excel tool
  • file_name (optional): Output filename (with or without .xlsx). Defaults to expanded_results.xlsx

Example — one source row becomes three:

Drug Name Route Dose/Concentration Concomitants
DrugA oral 10 mg DrugB, i.v., 5 mg, daily; DrugC, oral, 20 mg, twice daily

Drug Name Route Dose/Concentration Concomitants
DrugA oral 10 mg DrugB, i.v., 5 mg, daily; DrugC, oral, 20 mg, twice daily
DrugB i.v. 5 mg DrugA, oral, 10 mg; DrugC, oral, 20 mg, twice daily
DrugC oral 20 mg DrugA, oral, 10 mg; DrugB, i.v., 5 mg, daily

Required environment variable: AZURE_STORAGE_CONNECTION_STRING

Usage

With uvx (no installation needed)

uvx mcp-server-pp@1.2.0

MCP client config (e.g. Codemie, Claude Desktop)

{
  "mcpServers": {
    "pp-tools": {
      "command": "uvx",
      "args": ["mcp-server-pp@1.2.0"],
      "env": {
        "AZURE_STORAGE_CONNECTION_STRING": "${AZURE_STORAGE_CONNECTION_STRING}"
      }
    }
  }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_server_pp-1.2.0.tar.gz (71.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_server_pp-1.2.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file mcp_server_pp-1.2.0.tar.gz.

File metadata

  • Download URL: mcp_server_pp-1.2.0.tar.gz
  • Upload date:
  • Size: 71.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.23

File hashes

Hashes for mcp_server_pp-1.2.0.tar.gz
Algorithm Hash digest
SHA256 8484cdc766d60e7c9c813843f93e8a2ad094923c8307d7be18b36407a5f8514d
MD5 0f7c3035a6c3786e35b974cf4f2e6b6b
BLAKE2b-256 33f233156969007758994393fa02160a8fe077174ad0cea03d4609c6f5d43dfb

See more details on using hashes here.

File details

Details for the file mcp_server_pp-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_server_pp-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cfe8fe507fec9d43cb843255e2bcb805e9ecf93db296f72044c9e857cb048559
MD5 f13b4837a78ada7447501c6c9baf3a74
BLAKE2b-256 f06c27e2c6780dce8dc490bccb3c8eb1bc96445052ffe46c209357d9ca01f72d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page