Labamu MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Labamu MCP Serverlist materials that are out of stock"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Labamu MCP Server
A secure, production-ready Model Context Protocol (MCP) server that provides Claude Desktop with access to Labamu's business APIs for material inventory management, vendor management, batch tracking, customer data, and invoice operations.
Overview
The Labamu MCP Server enables AI assistants like Claude to securely interact with Labamu's Material Resource Planning (MRP) and business APIs through the Model Context Protocol. Built on Cloudflare Workers for global edge deployment with enterprise-grade security.
Key Features
π Security First: JWT authentication, input validation, sanitized logging
β‘ High Performance: Global edge deployment, <100ms response times
π§ Developer Friendly: Clean architecture, comprehensive documentation
π Production Ready: Monitoring, error handling, feature flags
π Scalable: Serverless architecture with automatic scaling
Related MCP server: Odoo MCP Improved
Quick Start
Prerequisites
Node.js 18+
Cloudflare account
Labamu API credentials
Claude Desktop
1. Installation
git clone https://github.com/your-org/labamu-mcp
cd labamu-mcp
npm install2. Deployment
# Build and deploy to Cloudflare Workers
npm run build
npm run deploy3. Configuration
Copy the template and configure your Claude Desktop:
cp claude-desktop-config-template.json claude-desktop-config.json
# Edit claude-desktop-config.json with your JWT tokenAdd to your Claude Desktop configuration:
{
"mcpServers": {
"labamu": {
"command": "npx",
"args": [
"-y",
"mcp-remote@latest",
"https://labamu-mcp.your-subdomain.workers.dev/sse",
"--header",
"Authorization:Bearer ${LABAMU_API_KEY}"
],
"env": {
"LABAMU_API_KEY": "your-jwt-token-here"
}
}
}
}Available Tools
Material Management
Tool | Description | Status |
| List materials with filtering and pagination | β Active |
| Retrieve specific material by UUID | β Active |
| Update material properties | β Active |
| Remove material from inventory | β Active |
| Create multiple materials from CSV/JSON | β Active |
Vendor Management
Tool | Description | Status |
| List vendors with filtering and pagination | β Active |
| Create multiple vendors in bulk | β Active |
| Delete multiple vendors by IDs | β Active |
| Update vendor information | β Active |
Batch Management
Tool | Description | Status |
| List material batches with filtering | β Active |
| Create multiple batches with vendor tracking | β Active |
| Update multiple batches (partial updates) | β Active |
| Delete batches by IDs | β Active |
Product Management
Tool | Description | Status |
| List products with category, BOM, and pricing | β Active |
| Create new product with pricing and category | β Active |
| Create multiple products in bulk | β Active |
| List products that have BOMs attached | β Active |
| Get product details by UUID | β Active |
| Update product information | β Active |
| Delete product by ID | β Active |
| List product categories | β Active |
| Create new category | β Active |
| Get category details by UUID | β Active |
| Update category information | β Active |
| Delete category by ID | β Active |
| List Bills of Materials with routing and costs | β Active |
| Create new BOM with materials and routing | β Active |
| Get COGS breakdown for a BOM | β Active |
| Get suggested pricing from BOM costs | β Active |
| Get BOM details by UUID | β Active |
| Update BOM information | β Active |
| Delete BOM by ID | β Active |
| Check if BOM is used in products | β Active |
| List material usages with filtering | β Active |
| Create material usage for BOM | β Active |
| Create multiple material usages | β Active |
| Get material usage by UUID | β Active |
| Update material usage | β Active |
| Delete material usage by ID | β Active |
Legacy Tools (Disabled)
Tool | Description | Status |
| Fetch merchant profile | π« Disabled |
| List customer data | π« Disabled |
| Generate invoices | π« Disabled |
| General search functionality | π« Disabled |
| HTTP fetch utility | π« Disabled |
Architecture
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Claude β β MCP Server β β Labamu APIs β
β Desktop βββββΊβ (CF Workers) βββββΊβ (MRP/Business)β
β β β β β β
β - Authenticationβ β - Validation β β - Business Logicβ
β - Tool Calls β β - Security β β - Data Storage β
β - Responses β β - Logging β β - Processing β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββSecurity Model
Client-side Authentication: JWT tokens stored securely in Claude Desktop
Header-based Transport: Secure token transmission via Authorization headers
Input Validation: Comprehensive schema validation for all inputs
Sanitized Logging: Sensitive data automatically redacted
CORS Protection: Restrictive cross-origin resource sharing
Development
Local Development
# Start development server
npm run dev
# Run tests
npm run test
# Watch mode
npm run test:watch
# Type checking
npm run buildProject Structure
src/
βββ config/ # Security and configuration
βββ core/ # Base classes and MCP server
βββ tools/ # Tool implementations
β βββ materials/ # Material management tools
βββ types/ # TypeScript definitions
βββ utils/ # Shared utilities
βββ index.ts # Worker entry pointAdding New Tools
Create tool class extending
BaseToolAdd to tool registry in server
Configure feature flag in
wrangler.tomlWrite comprehensive tests
Update documentation
See DEVELOPMENT.md for detailed guidelines.
Security
Authentication Flow
JWT token stored in Claude Desktop environment variables
Token transmitted via
Authorization: BearerheaderServer validates JWT format and structure
Token forwarded to upstream Labamu APIs
Response data sanitized before logging
Security Features
JWT format validation
Input schema validation
Request sanitization
Error message sanitization
Security headers on all responses
No sensitive data logging
See SECURITY.md for comprehensive security documentation.
Configuration
Feature Flags
Tools can be enabled/disabled via environment variables:
# wrangler.toml
FEATURE_GET_MATERIALS_ENABLED = "true"
FEATURE_UPDATE_MATERIAL_ENABLED = "true"
FEATURE_DELETE_MATERIAL_ENABLED = "true"Environment Variables
Variable | Description | Default |
| MRP API base URL |
|
| Business API base URL |
|
Monitoring
Health Check
curl https://labamu-mcp.your-subdomain.workers.dev/healthzReturns server status and enabled tools:
{
"status": "ok",
"version": "2.4.0",
"timestamp": "2025-09-30T12:00:00.000Z",
"tools": ["get_materials", "get_material_by_id", "update_material", "delete_material", "bulk_create_materials"],
"auth_mode": "client_provided"
}Logging
# Monitor live logs
wrangler tail --format pretty
# Filter specific events
wrangler tail | grep ERRORTesting
Test Coverage
Unit Tests: Tool logic and validation
Integration Tests: End-to-end MCP protocol
Security Tests: Authentication and input validation
# Run all tests
npm test
# Coverage report
npm run test:coverageAPI Reference
Material Management
Get Materials
{
"tool": "get_materials",
"arguments": {
"page": 1,
"size": 10,
"category_id": "uuid",
"sku": "MAT-001",
"name": "Steel Rod",
"classification": "A",
"type": "RAW",
"is_stockable": true,
"keyword": "search term"
}
}Get Material by ID
{
"tool": "get_material_by_id",
"arguments": {
"id": "20858588-ef10-4629-b01c-5b3fa6bfef6d"
}
}Update Material
{
"tool": "update_material",
"arguments": {
"id": "20858588-ef10-4629-b01c-5b3fa6bfef6d",
"name": "Updated Steel Rod",
"classification": "A",
"status": "ACTIVE"
}
}Product Management
Get Products
{
"tool": "get_products",
"arguments": {
"page": 1,
"size": 10,
"name": "Meja",
"sku": "PROD-001",
"category_id": "uuid",
"status": "ACTIVE",
"keyword": "furniture",
"sort": "updated_at:desc"
}
}Get Categories
{
"tool": "get_categories",
"arguments": {
"page": 1,
"size": 10,
"name": "Rak Besi",
"status": "ACTIVE",
"keyword": "metal",
"sort": "name:asc"
}
}Get BOMs
{
"tool": "get_boms",
"arguments": {
"page": 1,
"size": 10,
"name": "Pembuatan",
"product_id": "uuid",
"status": "ACTIVE",
"without_product": false,
"sort": "created_at:desc"
}
}See individual tool files for complete API documentation.
Troubleshooting
Common Issues
Authentication Errors
Failed to retrieve materials: Invalid token providedSolution: Verify JWT token format and expiration in Claude Desktop config.
Tool Not Available
Unknown tool: get_materialsSolution: Check feature flag is enabled in wrangler.toml.
CORS Errors
Solution: Ensure requests include proper headers and origin.
Debug Mode
Enable detailed logging by checking Cloudflare Workers logs:
wrangler tail --format prettyContributing
We welcome contributions! Please see our DEVELOPMENT.md guide for:
Development setup
Coding standards
Testing requirements
Security guidelines
Pull Request Process
Fork the repository
Create a feature branch
Implement changes with tests
Update documentation
Submit pull request
Documentation
Architecture Guide - System design and patterns
Development Guide - Development setup and guidelines
Security Guide - Security practices and procedures
Feature Flags - Feature flag documentation
Deployment
Production Checklist
All tests passing
TypeScript compilation successful
Feature flags configured
Health endpoint accessible
Claude Desktop configuration updated
Security review completed
Rollback Procedure
# Quick feature disable
# Set feature flag to "false" in wrangler.toml
npm run deploy
# Full rollback
git revert HEAD
npm run deployLicense
This project is licensed under the ISC License - see the LICENSE file for details.
Support
For issues and questions:
Check troubleshooting section
Review security guidelines
Open an issue with detailed information
Changelog
v2.9.0 (Current)
Major Release: Added 23 new product management tools (CRUD operations)
Products: Full CRUD + bulk operations + BOM-filtered queries
Categories: Complete category management (create, read, update, delete)
BOMs: Full BOM lifecycle + COGS breakdown + pricing suggestions + usage tracking
Material Usages: Complete material usage management for BOMs
All tools follow TDD with comprehensive unit tests (80+ tests passing)
Total active tools: 39 tools (up from 16)
v2.8.0
Added product management tools (get_products, get_categories, get_boms)
Support for complex product structures with BOMs and routing
Category filtering and management
Cost of Goods Sold (COGS) calculations in BOMs
Comprehensive unit tests for all product tools
v2.7.0
Added batch management with vendor tracking
Bulk operations for batches (create, update, delete)
Enhanced filtering capabilities
v2.4.0
Added material management tools (get, update, delete by ID)
Improved security with sanitized logging
Added comprehensive error handling
Enhanced authentication validation
v2.3.0
Added get_materials tool with filtering
Fixed authentication header handling
Improved documentation
v2.2.0
Added bulk material creation
Enhanced error handling
Built with TypeScript, Cloudflare Workers, and security best practices.
This server cannot be installed
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/baguskto/labamu-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server