JSPM

@supplyflow/mcp

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 50
  • Score
    100M100P100Q67400F
  • License MIT

MCP client adapter for connecting AI agents to Supplyflow Hospital Supply Chain Management API

Package Exports

  • @supplyflow/mcp
  • @supplyflow/mcp/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@supplyflow/mcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Supplyflow MCP Client

Official MCP (Model Context Protocol) client adapter for connecting AI agents to the Supplyflow Hospital Supply Chain Management API. Access hospital inventory data, product catalogs, and supply chain analytics through the Model Context Protocol.

Features

  • MCP-compliant server for Claude Desktop and other AI agents
  • Domain-specific tools for hospital supply chain management
  • Smart caching for frequently accessed data
  • Automatic retry logic with exponential backoff
  • Simple configuration with minimal setup required

Quick Start

Add to your MCP servers configuration:

{
  "mcpServers": {
    "supplyflow": {
      "command": "npx",
      "args": ["-y", "@supplyflow/mcp"],
      "env": {
        "SUPPLYFLOW_API_URL": "http://localhost:8100",
        "SUPPLYFLOW_API_KEY": "sf_..."
      }
    }
  }
}

Environment Variables

Variable Description Example
SUPPLYFLOW_API_URL The Supplyflow API endpoint http://localhost:8100
SUPPLYFLOW_API_KEY Your API key sf_...

Available Tools

The Supplyflow MCP client provides the following domain-specific tools:

1. get-inventory-shortages

Find products in the hospital running low on inventory.

Example:

{
  "name": "get-inventory-shortages",
  "arguments": {
    "limit": 10
  }
}

Returns: Products with current inventory below reorder levels.

2. find-alternative-products

Search the product catalog for alternatives in a given category.

Example:

{
  "name": "find-alternative-products",
  "arguments": {
    "category": "PPE",
    "limit": 15
  }
}

Returns: Alternative products with pricing, availability, and lead times.

3. get-supplier-info

Get detailed supplier information for evaluating alternatives.

Example:

{
  "name": "get-supplier-info",
  "arguments": {
    "specialization": "PPE",
    "min_rating": 8.0
  }
}

Returns: Supplier details including ratings, certifications, and lead times.

4. query-hospital-data

Execute custom Cypher queries against hospital data.

Example:

{
  "name": "query-hospital-data",
  "arguments": {
    "query": "MATCH (po:PurchaseOrder) WHERE po.status = 'sent' RETURN po.po_number, po.order_date LIMIT 10"
  }
}

Returns: Custom query results from hospital inventory and supply chain data.

5. query-product-catalog

Execute custom Cypher queries against the product catalog.

Example:

{
  "name": "query-product-catalog",
  "arguments": {
    "query": "MATCH (p:Product) WHERE p.category = 'Surgical' RETURN p.name, p.unit_cost ORDER BY p.unit_cost LIMIT 10"
  }
}

Returns: Custom query results from product catalog data.

Usage with Claude Desktop

  1. Install the Supplyflow MCP client in your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
  "mcpServers": {
    "supplyflow": {
      "command": "npx",
      "args": ["-y", "@supplyflow/mcp"],
      "env": {
        "SUPPLYFLOW_API_URL": "http://localhost:8100",
        "SUPPLYFLOW_API_KEY": "your-api-key-here"
      }
    }
  }
}
  1. Restart Claude Desktop

  2. Start using supply chain tools in your conversations:

    • "What products are running low in our hospital?"
    • "Find alternatives for N95 respirators"
    • "Show me suppliers with high ratings for PPE"

Example Workflow

  1. Identify Shortages:

    User: "What products are running low in our hospital?"
    AI calls: get-inventory-shortages
  2. Find Alternatives:

    User: "Find alternatives for N95 respirators"
    AI calls: find-alternative-products with category="Respiratory Protection"
  3. Evaluate Suppliers:

    User: "Which suppliers offer these alternatives?"
    AI calls: get-supplier-info with specialization="PPE"
  4. Compare Options:

    User: "Show me cost and availability comparison"
    AI processes results from previous calls and presents analysis

Development

Running Locally

  1. Install dependencies:

    npm install
  2. Set environment variables:

    export SUPPLYFLOW_API_URL="http://localhost:8100"
    export SUPPLYFLOW_API_KEY="your-api-key"
  3. Run the client:

    npm start

Testing

You can test the MCP client by running it directly:

SUPPLYFLOW_API_URL="http://localhost:8100" \
SUPPLYFLOW_API_KEY="your-api-key" \
node index.js

The client will connect to the Supplyflow API and list available tools in stderr output.

Architecture

┌─────────────────────────────────────────┐
│         AI Assistant (Claude)            │
└────────────────┬────────────────────────┘
                 │ MCP Protocol
                 ▼
┌─────────────────────────────────────────┐
│      Supplyflow MCP Client (Node.js)     │
│  - Connection management                 │
│  - Caching layer                         │
│  - Retry logic                           │
└────────────────┬────────────────────────┘
                 │ HTTP/JSON
                 ▼
┌─────────────────────────────────────────┐
│      Supplyflow API (FastAPI)            │
│  - Domain-specific tools                 │
│  - Hospital data access                  │
│  - Product catalog access                │
└────────────────┬────────────────────────┘
                 │ robosystems_client
                 ▼
┌─────────────────────────────────────────┐
│   RoboSystems (Graph Database Backend)   │
└─────────────────────────────────────────┘

API Reference

Security

  • Read-only: All tools execute read-only queries
  • API key required: SUPPLYFLOW_API_KEY must be configured
  • Validation: Cypher query validation to prevent malicious queries

Support