Skip to main content
Glama

ConsignCloud MCP Server

by modellers
PROJECT_SUMMARY.md•8.99 kB
# ConsignCloud MCP Server - Project Summary ## šŸŽÆ Project Overview A complete Model Context Protocol (MCP) server implementation for the ConsignCloud API, enabling AI assistants like Claude to manage inventory, sales, accounts, and operations for consignment/retail businesses. ## āœ… What's Been Built ### Core Components 1. **TypeScript Client Library** ([src/client.ts](src/client.ts)) - Full ConsignCloud API client with 30+ methods - Type-safe with comprehensive TypeScript definitions - Error handling and request interceptors - Support for all inventory management operations 2. **MCP Server Implementation** ([src/server.ts](src/server.ts)) - 22 MCP tools covering all major operations - Proper JSON-RPC request/response handling - Centralized tool definitions and handlers 3. **Dual Transport Support** - **STDIO Mode** ([src/index.ts](src/index.ts)) - For Claude Desktop integration - **HTTP/SSE Mode** ([src/http-server.ts](src/http-server.ts)) - For MCP Inspector and web testing ### API Coverage āœ… **Inventory Management** (Focus Area) - List items with advanced filtering (price, category, status, location, date) - Create, read, update, delete items - Bulk operations and status updates - Inventory statistics and analytics āœ… **Sales Operations** - List and filter sales by date, location, customer, status - Get sale details - Void and refund sales - Sales trends and reporting āœ… **Account Management** (Vendors/Consignors) - Full CRUD operations - Account statistics (balance, items, purchases) - Bulk account operations āœ… **Additional Features** - Item categories management - Store locations - Batch operations (groups of items) - Cross-entity search and suggestions - Balance entries tracking āŒ **Explicitly Excluded** (as requested) - Company registration and management ### Documentation 1. **[README.md](README.md)** - Main documentation - Installation and setup - Usage for both modes - Claude Desktop integration - Available tools reference 2. **[QUICK_START.md](QUICK_START.md)** - Get started in 5 minutes - Fast setup guide - Common commands - Quick troubleshooting 3. **[TESTING.md](TESTING.md)** - MCP Inspector testing guide - Step-by-step Inspector setup - Test scenarios with examples - Debugging tips - Common issues and solutions 4. **[CLAUDE_DESKTOP_SETUP.md](CLAUDE_DESKTOP_SETUP.md)** - Claude integration - Detailed configuration guide - Platform-specific instructions - Example prompts - Advanced configuration 5. **[CONSIGNCLOUD_API_SUMMARY.md](CONSIGNCLOUD_API_SUMMARY.md)** - API reference - Complete API endpoint documentation - Authentication details - Data models - Rate limits and pagination ## šŸ“ Project Structure ``` mcp-consigncloud/ ā”œā”€ā”€ src/ │ ā”œā”€ā”€ client.ts # ConsignCloud API client │ ā”œā”€ā”€ server.ts # MCP server setup & tools │ ā”œā”€ā”€ index.ts # STDIO transport (Claude Desktop) │ ā”œā”€ā”€ http-server.ts # HTTP/SSE transport (Inspector) │ └── types.ts # TypeScript type definitions ā”œā”€ā”€ dist/ # Compiled JavaScript (gitignored) ā”œā”€ā”€ .env.example # Environment template ā”œā”€ā”€ .gitignore # Git ignore rules ā”œā”€ā”€ package.json # Dependencies & scripts ā”œā”€ā”€ tsconfig.json # TypeScript config ā”œā”€ā”€ README.md # Main documentation ā”œā”€ā”€ QUICK_START.md # Quick setup guide ā”œā”€ā”€ TESTING.md # Testing guide ā”œā”€ā”€ CLAUDE_DESKTOP_SETUP.md # Claude integration ā”œā”€ā”€ CONSIGNCLOUD_API_SUMMARY.md # API reference └── PROJECT_SUMMARY.md # This file ``` ## šŸš€ Available Tools (22 Total) ### Inventory (6 tools) - `list_items` - List with filters - `get_item` - Get by ID - `create_item` - Create new - `update_item` - Update existing - `delete_item` - Soft delete - `get_item_stats` - Statistics ### Sales (4 tools) - `list_sales` - List with filters - `get_sale` - Get by ID - `void_sale` - Void a sale - `get_sales_trends` - Analytics ### Accounts (5 tools) - `list_accounts` - List vendors/consignors - `get_account` - Get by ID - `create_account` - Create new - `update_account` - Update existing - `get_account_stats` - Account statistics ### Categories (2 tools) - `list_categories` - List item categories - `create_category` - Create new category ### Locations (1 tool) - `list_locations` - List store locations ### Batches (3 tools) - `list_batches` - List item batches - `create_batch` - Create new batch - `update_batch_status` - Update status ### Search (1 tool) - `search_suggest` - Cross-entity search ## šŸ”§ NPM Scripts ```bash # Development npm run dev # Run STDIO server in dev mode npm run dev:http # Run HTTP/SSE server in dev mode # Production npm run build # Compile TypeScript to JavaScript npm start # Run STDIO server (production) npm run start:http # Run HTTP/SSE server (production) # Utilities npm run watch # Watch mode for TypeScript compilation ``` ## šŸ” Environment Variables ```env # Required CONSIGNCLOUD_API_KEY=your_api_key_here # Optional CONSIGNCLOUD_API_BASE_URL=https://api.consigncloud.com/api/v1 # Default PORT=3000 # HTTP mode only HOST=localhost # HTTP mode only ``` ## šŸ“Š Technology Stack - **Runtime:** Node.js 18+ - **Language:** TypeScript 5.9 - **MCP SDK:** @modelcontextprotocol/sdk ^1.22.0 - **HTTP Server:** Express 5.1 - **HTTP Client:** Axios 1.13 - **Environment:** dotenv 17.2 ## šŸŽ“ How to Use ### With MCP Inspector (Testing) ```bash # Terminal 1: Start server npm run dev:http # Terminal 2: Launch inspector npx @modelcontextprotocol/inspector http://localhost:3000/sse ``` ### With Claude Desktop (Production) Edit `~/Library/Application Support/Claude/claude_desktop_config.json`: ```json { "mcpServers": { "consigncloud": { "command": "node", "args": ["/absolute/path/to/mcp-consigncloud/dist/index.js"], "env": { "CONSIGNCLOUD_API_KEY": "your_api_key_here" } } } } ``` ## šŸ’” Example Use Cases ### Inventory Management - "Show me all items under $50" - "List items in the Clothing category" - "What's my current inventory value?" - "Create a new item: Vintage Lamp, $75" ### Sales Analysis - "Show me sales from last week" - "What are the sales trends for November?" - "Get details for sale #12345" ### Vendor Management - "List all vendor accounts" - "Show me John Smith's account balance" - "Create a new vendor account" - "What are the top 5 vendors by sales?" ### Operations - "Find items that haven't sold in 30 days" - "Show me all draft batches" - "Search for 'vintage' items" ## šŸ”’ Security Features - āœ… API keys stored in environment variables (never in code) - āœ… `.env` file excluded from git - āœ… CORS enabled for HTTP server - āœ… Bearer token authentication - āœ… Error messages sanitized ## šŸ“ˆ API Characteristics - **Base URL:** `https://api.consigncloud.com/api/v1` - **Authentication:** Bearer token (API key) - **Rate Limit:** 100 requests bucket, 10/sec refill - **Pagination:** Cursor-based - **Currency:** Smallest denomination (cents for USD) - **Date Format:** ISO 8601 ## ✨ Key Features 1. **Type Safety** - Full TypeScript coverage with proper types 2. **Error Handling** - Comprehensive error catching and user-friendly messages 3. **Dual Transport** - Both STDIO and HTTP/SSE support 4. **Developer Experience** - Hot reload in dev mode, built for production 5. **Testing Support** - MCP Inspector integration out of the box 6. **Documentation** - 5 comprehensive documentation files 7. **Modular Design** - Separated concerns (client, server, transports) ## šŸŽÆ Project Goals Achieved āœ… Learn about ConsignCloud API structure āœ… Create Node.js MCP server āœ… Handle products, prices, sales (inventory management focus) āœ… Exclude company registration āœ… Use environment variables for secrets āœ… Support HTTP/SSE for testing āœ… Provide comprehensive documentation āœ… Enable MCP Inspector testing ## šŸ”„ Next Steps (Optional Enhancements) - [ ] Add webhook support for real-time updates - [ ] Implement caching for frequently accessed data - [ ] Add custom reporting tools - [ ] Support bulk import/export operations - [ ] Add data validation schemas - [ ] Implement retry logic for failed requests - [ ] Add monitoring and logging capabilities - [ ] Create integration tests ## šŸ“ž Support Resources - **ConsignCloud API:** team@consigncloud.com - **MCP Documentation:** https://modelcontextprotocol.io - **MCP Inspector:** https://modelcontextprotocol.io/docs/tools/inspector - **Claude Desktop:** https://support.anthropic.com ## šŸ“ License ISC License --- **Status:** āœ… Complete and ready for use **Last Updated:** 2025-01-22 **Version:** 1.0.0

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/modellers/mcp-consigncloud'

If you have feedback or need assistance with the MCP directory API, please join our Discord server