encodium/order-mcp-server
If you are the rightful owner of order-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.
A Laravel-based Model Context Protocol (MCP) server designed for comprehensive order management within the RevolutionParts automotive ecommerce platform.
Order MCP Server
A Laravel-based Model Context Protocol (MCP) server that provides comprehensive order management capabilities for RevolutionParts automotive ecommerce platform. This server enables AI agents to retrieve detailed order information, including order details, line items, messages, and activity logs.
Features
🔍 Order Management Tools
- Get Order Details - Retrieve comprehensive order information including status, customer details, financials, and shipping
- Get Order Line Items - Access detailed product information, pricing, and physical specifications for each order item
- Get Order Messages - View all customer communications and internal notes related to an order
- Get Order Activity Logs - Track complete audit trail of order changes and system events
- Update Order - Modify order status, administrative details, and shipping information
🏗️ Architecture
- Laravel 12 framework with MCP integration
- Multi-database support for orders (slowpoke/feed) and messaging (critdb/cdata)
- Service layer architecture with dependency injection
- Value Objects for type-safe data handling
- Repository pattern for database abstraction
Prerequisites
- PHP 8.2 or higher
- Composer
- MySQL access to RevolutionParts databases
Installation
-
Clone the repository
git clone <repository-url> cd order-mcp-server -
Install PHP dependencies
composer install -
Environment setup
cp .env.example .env php artisan key:generate -
Configure database connections
- Update
.envwith your database credentials - Ensure access to
slowpoke(orders) andcritdb(messaging) servers
- Update
Configuration
Environment Variables
The application requires several environment variables for database connections:
# Main application database (orders)
DB_CONNECTION=mysql
DB_HOST=your-slowpoke-server
DB_DATABASE=feed
DB_USERNAME=your-username
DB_PASSWORD=your-password
# Messaging system database
DB_CRITDB_HOST=your-critdb-server
DB_CRITDB_DATABASE=mysql
DB_CRITDB_USERNAME=your-username
DB_CRITDB_PASSWORD=your-password
MCP Server Configuration
The server provides the following tools:
get-order- Retrieve order details by order numberget-order-line-items- Get all line items for an orderget-order-messages- Access order-related communicationsget-order-activity-logs- View complete order activity historyupdate-order- Modify order status and details
Usage
Starting the MCP Server
php artisan mcp:start order
Testing Individual Tools
# Get order details
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "get-order", "arguments": {"order_number": 1074123782}}}' | php artisan mcp:start order
# Get order line items
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "get-order-line-items", "arguments": {"order_number": 1074123782}}}' | php artisan mcp:start order
# Get order messages
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "get-order-messages", "arguments": {"order_number": 1074123782, "customer_id": 1104}}}' | php artisan mcp:start order
# Get activity logs
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "get-order-activity-logs", "arguments": {"order_number": 1074123782, "customer_id": 1104}}}' | php artisan mcp:start order
Integration with Cursor
To use this MCP server with Cursor, add the following to your ~/.cursor/mcp.json:
{
"mcpServers": {
"order-mcp-server": {
"command": "php",
"args": [
"/path/to/order-mcp-server/artisan",
"mcp:start",
"order"
],
"cwd": "/path/to/order-mcp-server"
}
}
}
Development
Running Tests
# Run all tests
php artisan test
# Run specific test suite
php artisan test --testsuite=Unit
php artisan test --testsuite=Feature
Code Quality
# Run PHP CS Fixer
composer run cs-fixer
# Run PHPStan static analysis
composer run phpstan
Database Management
This MCP server connects to existing RevolutionParts databases and does not require any migrations or schema changes.
Dependencies
Composer Packages
laravel/framework- Laravel frameworklaravel/mcp- Model Context Protocol integrationrevolutionparts/messaging-service- Messaging system integrationrevolutionparts/order-service- Order management servicesrevolutionparts/activity-service- Activity logging services
Local Development
The application uses local path repositories for RevolutionParts packages, allowing for seamless development and testing of service integrations.
Architecture
Service Layer
- OrderService - Handles order operations and business logic
- MessagingService - Manages customer communications and internal notes
- ActivityLogService - Tracks order changes and system events
Value Objects
- OrderVO - Immutable order data structure
- OrderItemVO - Line item information with validation
- MessageThread - Communication thread management
- ActivityLog - Audit trail entries
Database Connections
- slowpoke/feed - Primary order data storage
- critdb/cdata - Customer-specific messaging data
- Dynamic database resolution - Customer-specific cdata databases
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and quality checks
- Submit a pull request
License
This project is proprietary software owned by RevolutionParts.
Support
For technical support or questions about this MCP server, please contact the development team.