CFT MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
npm install
npm run build
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "CFT_BASE_URL=${CFT_BASE_URL}" -e "CFT_ADMIN_SECRET=${CFT_ADMIN_SECRET}" cft-mcp-server -- node "<FULL_PATH_TO_MCP_SERVER>/dist/index.js"

Replace <FULL_PATH_TO_MCP_SERVER>/dist/index.js with the actual folder you prepared in step 1.

Required:CFT_BASE_URLCFT_ADMIN_SECRET+ 1 optional
README.md

Remote MCP server for the Chrome Fair Trade platform

CFT MCP Server

Remote MCP server for the Chrome Fair Trade platform, intended for deployment on Render.

What was fixed

  • Renamed package-1.json to package.json
  • Added a real TypeScript build pipeline
  • Fixed the start script to run compiled output from dist/index.js
  • Fixed tsconfig.json so TypeScript actually includes src/**/*.ts
  • Added required dev dependencies: typescript, tsx, @types/node, @types/express
  • Removed the hard-coded fallback admin secret from runtime code
  • Updated render.yaml so CFT_ADMIN_SECRET is not committed in plaintext
  • Added a /health route and safer MCP endpoint error handling

Tools

Tool What it does
cft_health Platform + DB health check
cft_market_prices Live CIF China + FOT rates, all grades
cft_list_deals All deals, filter by status
cft_deal_stats KPIs: tonnage, fees, grade breakdown
cft_whatsapp_sessions Active WhatsApp conversation states
cft_reset_whatsapp_session Unstick a supplier's WhatsApp flow
cft_update_deal_status Approve / reject a deal
cft_verify_certificate QR-verified deal certificate lookup
cft_calculate_fot Reverse-Netback FOT calculation
cft_list_suppliers All registered supplier accounts

Local development

npm install
npm run build
CFT_BASE_URL=https://cft-terminal-hub.vercel.app CFT_ADMIN_SECRET=your-secret npm start

Server routes:

  • GET /
  • GET /health
  • POST /mcp

Render deployment

Render accepts custom build and start commands for Node services, which fits this project layout. citeturn150812view3

1. Push to GitHub

git init
git add .
git commit -m "fix: productionize CFT MCP server"
git branch -M main
git remote add origin https://github.com/Afrinov8/cft-mcp-server.git
git push -u origin main

2. Create the service on Render

  • New → Web Service
  • Connect the repository
  • Render will use:
    • Build Command: npm install && npm run build
    • Start Command: npm start

3. Set environment variables

Set these in Render:

  • CFT_BASE_URL=https://cft-terminal-hub.vercel.app
  • CFT_ADMIN_SECRET=...your actual admin secret...
  • NODE_ENV=production

Do not commit the real admin secret into the repo. Render blueprints support sync: false for secrets so values are not hardcoded in render.yaml. citeturn652236search0turn652236search3

4. Verify after deploy

  • Root health: https://your-service.onrender.com/health
  • MCP endpoint: https://your-service.onrender.com/mcp

Notes

This project still assumes the upstream CFT app exposes these endpoints:

  • /api/health
  • /api/market
  • /api/deals
  • /api/admin
  • /api/verify

If any of those routes differ on the Vercel app, the MCP server will deploy correctly but those specific tools will fail at runtime.

Tools (10)

cft_healthPlatform and database health check
cft_market_pricesLive CIF China and FOT rates for all grades
cft_list_dealsList all deals, filterable by status
cft_deal_statsGet KPIs including tonnage, fees, and grade breakdown
cft_whatsapp_sessionsView active WhatsApp conversation states
cft_reset_whatsapp_sessionUnstick a supplier's WhatsApp flow
cft_update_deal_statusApprove or reject a deal
cft_verify_certificateQR-verified deal certificate lookup
cft_calculate_fotPerform a Reverse-Netback FOT calculation
cft_list_suppliersList all registered supplier accounts

Environment Variables

CFT_BASE_URLrequiredThe base URL for the CFT terminal hub
CFT_ADMIN_SECRETrequiredThe secret key for administrative access
NODE_ENVEnvironment mode (e.g., production)

Configuration

claude_desktop_config.json
{"mcpServers": {"cft": {"command": "node", "args": ["/path/to/cft-mcp-server/dist/index.js"], "env": {"CFT_BASE_URL": "https://cft-terminal-hub.vercel.app", "CFT_ADMIN_SECRET": "your-secret"}}}}

Try it

What are the current market prices for all grades?
List all pending deals that need approval.
Calculate the FOT rate for a new deal.
Check the status of the WhatsApp session for supplier ID 123.
Show me the KPIs for the current trading period.

Frequently Asked Questions

What are the key features of CFT MCP Server?

Live market price monitoring for CIF China and FOT rates. Automated deal management and status updates. WhatsApp communication session monitoring and troubleshooting. KPI tracking for tonnage, fees, and grade distribution. Certificate verification via QR lookup.

What can I use CFT MCP Server for?

Monitoring real-time market fluctuations for trading decisions. Streamlining the approval process for new supplier deals. Troubleshooting stuck WhatsApp automated flows for suppliers. Generating performance reports on deal tonnage and fees.

How do I install CFT MCP Server?

Install CFT MCP Server by running: npm install && npm run build

What MCP clients work with CFT MCP Server?

CFT MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep CFT MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare