siduman268-debug/RMS-MCP-Server
If you are the rightful owner of RMS-MCP-Server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The RMS MCP Server is a Model Context Protocol server that integrates with Claude to provide direct access to an RMS database via Supabase, enabling efficient management of ocean freight operations.
RMS MCP Server
A comprehensive freight rate management server that provides:
- MCP Protocol for Claude Desktop integration
- HTTP REST API for n8n workflow automation and external integrations
- Supabase Backend for real-time data access
Features
MCP Tools (Claude Desktop)
- Pricing Enquiries: Get ocean freight rates, calculate margins, and price quotations
- Rate Management: Create, update, and search freight rates and surcharges
- Margin Rules: Manage global, trade zone, and port-pair specific margin rules
- Quotation Generation: Create complete quotations from pricing data
- Location & Vendor Management: CRUD operations for ports, ICDs, and vendors
- Helper Tools: Search locations, list charge codes, and more
HTTP API (n8n Integration)
- Search Rates: Find ocean freight rates with flexible filtering
- Get Local Charges: Retrieve origin/destination charges with FX conversion
- Prepare Quote: Generate complete quotes with automatic currency conversion
- Health Check: Monitor server status
Quick Start
Option 1: Docker Deployment (Recommended for VM)
# Clone repository
git clone https://github.com/siduman268-debug/RMS-MCP-Server.git
cd RMS-MCP-Server
# Create .env file
echo "SUPABASE_URL=https://xsvwhctzwpfcwmmvbgmf.supabase.co" > .env
echo "SUPABASE_SERVICE_KEY=your_service_key" >> .env
# Start with Docker
docker-compose up -d
# Test
curl http://localhost:3000/health
See DOCKER_DEPLOYMENT.md for complete guide
Option 2: Node.js Development (Local)
# Install dependencies
npm install
# Create .env file
SUPABASE_URL=https://xsvwhctzwpfcwmmvbgmf.supabase.co
SUPABASE_SERVICE_KEY=your_service_role_key_here
# Build
npm run build
# Run
npm run dev
See DEVELOPMENT_SETUP.md for development workflow
Usage with Claude Desktop
Add this configuration to your Claude Desktop config file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"rms-supabase": {
"command": "node",
"args": ["C:\\Users\\Admin\\RMS\\rms-mcp-server\\dist\\index.js"],
"env": {
"SUPABASE_URL": "https://xsvwhctzwpfcwmmvbgmf.supabase.co",
"SUPABASE_SERVICE_KEY": "your_service_role_key_here"
}
}
}
}
After updating the config, restart Claude Desktop.
HTTP API Usage (n8n / External Integration)
The server runs a Fastify HTTP API on port 3000 alongside the MCP protocol.
API Endpoints
Base URL: http://localhost:3000
GET /health- Health checkPOST /api/search-rates- Search ocean freight rates (V1)POST /api/v2/search-rates- Enhanced rate search (V2)POST /api/v2/prepare-quote- Rate-specific quote (V2)POST /api/v3/prepare-quote- Enhanced quote with inland (V3)POST /api/v3/get-inland-haulage- Get inland haulage charges (V3)POST /api/v4/search-rates- Search with origin/destination fields (V4) ✨ NEWPOST /api/v4/prepare-quote- Quote with automatic inland & schedules (V4) ✨ NEWPOST /api/get-local-charges- Get origin/destination charges
Example:
curl -X POST http://localhost:3000/api/prepare-quote \
-H "Content-Type: application/json" \
-d '{
"pol_code": "INNSA",
"pod_code": "NLRTM",
"container_type": "40HC",
"container_count": 2
}'
See API_DOCUMENTATION.md for complete API reference
n8n Workflow Automation
Import the pre-built workflow:
- Open n8n
- Import
n8n-workflow-example.json - Configure HTTP Request nodes to point to RMS server
- Activate workflow
See N8N_WORKFLOW_GUIDE.md for complete integration guide
Available Tools (MCP)
Pricing
price_enquiry- Get complete pricing breakdown for a routesearch_rates- Find available freight ratesget_surcharges- Get applicable surcharges
Rate Management
create_freight_rate- Add new ocean freight rateupdate_freight_rate- Modify existing ratecreate_surcharge- Add new surchargeupdate_surcharge- Modify surcharge
Margin Rules
list_margin_rules- View all margin rulescreate_margin_rule- Add new margin ruleupdate_margin_rule- Modify margin ruledelete_margin_rule- Remove margin rule
Quotations
create_quotation- Generate customer quotationget_quotation- Retrieve quotation by ID
Data Management
list_vendors- View vendorsupdate_vendor- Modify vendor infocreate_location- Add port/ICDupdate_location- Modify locationsearch_locations- Find ports/ICDslist_charge_codes- View charge codes
Example Usage
Once connected to Claude Desktop, you can ask:
- "Price a shipment from Shanghai (CNSHA) to Los Angeles (USLAX) for a 40HC container"
- "Show me all margin rules for ocean freight"
- "Create a quotation for Acme Corp from Mumbai to Hamburg"
- "List all active ocean carriers"
- "What are the surcharges for INNSA to DEHAM?"
Development
# Run in development mode with auto-reload
npm run dev
# Build TypeScript
npm run build
# Run production build
npm start
Database Schema
This server expects the following Supabase tables and views:
locations- Ports and ICDsvendor- Shipping lines and vendorsocean_freight_rate- Ocean freight ratessurcharge- Additional chargesmargin_rule_v2- Margin calculation rulescharge_master- Charge code definitionsv_preferred_ofr- View for preferred ratesv_surcharges- View for surcharge data
And the following RPC functions:
rms_pick_ofr_preferred_only- Get preferred rateapply_margin_allin_v2- Calculate margins
Documentation
- - Complete HTTP API reference
- - Docker deployment guide
- - n8n integration examples
- - Step-by-step workflow setup
- - Network configuration
- - Development workflow guide
Architecture
┌─────────────────┐ ┌──────────────────┐
│ Claude Desktop │◄────────┤ RMS MCP Server │
│ (MCP Client) │ stdio │ │
└─────────────────┘ │ ┌──────────┐ │
│ │ MCP │ │
┌─────────────────┐ │ │ Server │ │
│ n8n │◄────────┤ └──────────┘ │
│ (HTTP Client) │ :3000 │ │
└─────────────────┘ │ ┌──────────┐ │
│ │ Fastify │ │
│ │ HTTP │ │
│ └──────────┘ │
│ │ │
│ ▼ │
│ ┌──────────┐ │
│ │ Supabase │ │
│ │ Client │ │
│ └──────────┘ │
└─────────┬────────┘
│
▼
┌──────────────────┐
│ Supabase Cloud │
│ (Database) │
└──────────────────┘
Quick Deploy to VM
# One-line setup (on Linux VM)
curl -sSL https://raw.githubusercontent.com/siduman268-debug/RMS-MCP-Server/master/setup-vm.sh | bash
Or manually follow DOCKER_DEPLOYMENT.md
License
MIT