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
- Install the Supplyflow MCP client in your Claude Desktop configuration (
~/Library/Application Support/Claude/claude_desktop_config.jsonon macOS):
{
"mcpServers": {
"supplyflow": {
"command": "npx",
"args": ["-y", "@supplyflow/mcp"],
"env": {
"SUPPLYFLOW_API_URL": "http://localhost:8100",
"SUPPLYFLOW_API_KEY": "your-api-key-here"
}
}
}
}Restart Claude Desktop
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
Identify Shortages:
User: "What products are running low in our hospital?" AI calls: get-inventory-shortagesFind Alternatives:
User: "Find alternatives for N95 respirators" AI calls: find-alternative-products with category="Respiratory Protection"Evaluate Suppliers:
User: "Which suppliers offer these alternatives?" AI calls: get-supplier-info with specialization="PPE"Compare Options:
User: "Show me cost and availability comparison" AI processes results from previous calls and presents analysis
Development
Running Locally
Install dependencies:
npm install
Set environment variables:
export SUPPLYFLOW_API_URL="http://localhost:8100" export SUPPLYFLOW_API_KEY="your-api-key"
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.jsThe 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