ProduitsGilbert/gilbert-mcp-server
If you are the rightful owner of gilbert-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 Gilbert-Tech MCP Server provides access to internal PLM data through Model Context Protocol tools, facilitating integration with Claude and other LLM applications.
Gilbert-Tech MCP Server
A Model Context Protocol (MCP) server that provides access to Gilbert-Tech's internal PLM (Product Lifecycle Management) data. This server exposes PLM data through MCP tools that can be used by Claude and other LLM applications.
Features
- Part Information Retrieval: Get detailed information about specific parts using part numbers
- Search Functionality: Search for parts by name or description (planned)
- Server Status: Check server health and configuration status
- SSE Transport: Real-time communication using Server-Sent Events
- Docker Support: Easy deployment with Docker and Docker Compose
Available Tools
PLM Tools
get_part_info(part_number: str)
Retrieve detailed information about a specific part from the PLM system.
Parameters:
part_number: The part number to look up
Returns:
- Part details including specifications, status, and metadata
search_parts(search_term: str, limit: int = 10)
Search for parts in the PLM system (placeholder - implementation pending).
Parameters:
search_term: Term to search forlimit: Maximum number of results (default: 10)
Business Central ERP Tools
get_bc_entity_metadata(entity_name: str)
Discover available fields and structure for Business Central entities.
Parameters:
entity_name: BC entity name (e.g., 'Items', 'Vendors', 'PurchaseOrderHeaders')
Returns:
- Entity metadata including available fields, endpoint information, and sample data structure
Common Entities:
Items: Product/inventory itemsVendors: Supplier informationCustomers: Customer dataPurchaseOrderHeaders: Purchase order headersPurchaseOrderLines: Purchase order line detailsSalesOrderHeaders: Sales order headersSalesOrderLines: Sales order line details
query_bc_entity(entity_name: str, filters: str = None, top: int = 10, select: str = None)
Query Business Central entities with OData filtering and field selection.
Parameters:
entity_name: BC entity to queryfilters: OData filter expression (e.g.,"No eq '12345'"or"Description contains 'motor'")top: Maximum records to return (default: 10, max: 100)select: Comma-separated fields to return (e.g.,"No,Description,UnitPrice")
Filter Examples:
"No eq '12345'"- Exact item number match"Description contains 'motor'"- Description contains text"UnitPrice gt 100"- Price greater than 100"CreatedDateTime ge 2024-01-01T00:00:00Z"- Created after date
SQL Server Database Tools
get_sql_database_schema(database_name: str)
Discover complete database schema including all tables, views, and statistics.
Parameters:
database_name: Database to query ('business_central' or 'cedule')
Returns:
- Complete schema information organized by schemas
- Table and view counts, database statistics
- Server version and configuration details
get_sql_table_metadata(database_name: str, table_name: str, schema_name: str = "dbo")
Get detailed metadata for a specific table including columns, data types, and constraints.
Parameters:
database_name: Database to query ('business_central' or 'cedule')table_name: Name of the table to analyzeschema_name: Schema name (default: 'dbo')
Returns:
- Column definitions with data types, lengths, nullable status
- Primary keys and constraints
- Table statistics (row count, storage size)
sample_sql_table_data(database_name: str, table_name: str, schema_name: str = "dbo", limit: int = 10, columns: List[str] = None)
Get sample data from a table for analysis and development.
Parameters:
database_name: Database to querytable_name: Table to sampleschema_name: Schema name (default: 'dbo')limit: Maximum rows (default: 10, max: 100)columns: Specific columns to include (None = all)
Returns:
- Sample data with actual values
- Column names and data patterns
- Data type examples
execute_sql_query(database_name: str, query: str, limit: int = 50)
Execute safe, read-only SQL queries with built-in security restrictions.
Parameters:
database_name: Database to queryquery: SQL SELECT query to executelimit: Maximum rows to return (default: 50, max: 100)
Returns:
- Query results with column names
- Row count and execution metadata
Safety Features:
- Only SELECT statements allowed
- Blocks dangerous keywords (DROP, DELETE, INSERT, UPDATE, etc.)
- Automatic row limit enforcement
- Read-only database connections
get_sql_database_status()
Get connection status and information for all configured SQL Server databases.
Returns:
- Connection status for each database (business_central, cedule)
- Server versions and database information
- Configuration details and error messages
System Tools
get_server_status()
Get the current status of PLM, BC, and SQL server connections and configuration.
Deployment
Docker Compose (Recommended)
- Clone this repository to your Docker server (192.168.0.192)
- Ensure your PLM credentials are configured in
data/config.ini - Deploy using Docker Compose:
docker-compose up -d
The server will be available at: http://lpgadoc03:8002
Manual Docker
# Build the image
docker build -t gilbert-mcp-server .
# Run the container
docker run -d \
--name gilbert-mcp-server \
-p 8002:8002 \
-v $(pwd)/data:/app/data:ro \
gilbert-mcp-server
Configuration
PLM Credentials
Configure your PLM credentials using environment variables. Create a .env file:
# Copy the example file
cp .env.example .env
# Edit with your credentials
nano .env
Required environment variables:
PLM Configuration:
PLM_USERNAME: Your PLM usernamePLM_PASSWORD: Your PLM passwordPLM_BASE_URL: PLM server URL (default: https://plm.gilbert-tech.com)
Business Central Configuration:
BC_username: Your BC username (format: DOMAIN\USERNAME)BC_password: Your BC password or access token
SQL Server Database Configuration:
BC_SQL_server: Business Central SQL Server addressBC_SQL_database: Business Central database nameBC_SQL_username: SQL Server username for BC databaseBC_SQL_password: SQL Server password for BC databaseCedule_SQL_server: Cedule CNC SQL Server addressCedule_SQL_database: Cedule database nameCedule_SQL_username: SQL Server username for Cedule databaseCedule_SQL_password: SQL Server password for Cedule database
Claude Desktop Integration
Method 1: JSON Configuration File (Recommended)
This method uses a configuration file and MCP proxy script for reliable connection.
Step 1: Download the MCP Proxy Script
Create the MCP proxy script that bridges HTTP API to MCP Protocol:
-
Download the proxy script from this repository:
curl -o mcp_proxy.py https://raw.githubusercontent.com/your-repo/gilbert-mcp-server/main/mcp_proxy.py -
Or create it manually by copying the content from
mcp_proxy.pyin this repository -
Make it executable:
chmod +x mcp_proxy.py -
Update the server URL in the script if needed (line 22):
BASE_URL = "http://lpgadoc03:8002" # Change to your server address
Step 2: Create Claude Desktop Configuration
-
Locate your Claude Desktop configuration directory:
- macOS:
~/Library/Application Support/Claude/ - Windows:
%APPDATA%\Claude\
- macOS:
-
Create or edit
claude_desktop_config.jsonin that directory:{ "mcpServers": { "gilbert-tech-plm": { "command": "python3", "args": [ "/absolute/path/to/mcp_proxy.py" ] } } } -
Replace the path with the absolute path to your
mcp_proxy.pyfile
Step 3: Restart Claude Desktop
- Completely quit Claude Desktop
- Restart Claude Desktop
- Check for connection: You should see the Gilbert-Tech PLM tools available
Step 4: Verify Integration
Test the integration by asking Claude:
- "What's the status of the PLM server?"
- "Get information about part number [your-part-number]"
- "What tools are available from Gilbert-Tech?"
Method 2: UI Integration (Limited Functionality)
This method uses Claude Desktop's "Add Integration" UI but has limitations.
Step 1: Open Claude Desktop Settings
- Open Claude Desktop
- Go to Settings (gear icon)
- Navigate to Integrations
- Click "Add Integration"
Step 2: Configure Integration
- Integration Name:
gilbert-tech-plm - Integration URL:
http://lpgadoc03:8002
Step 3: Important Limitations
⚠️ Note: The UI method may have limited functionality because:
- It typically expects SSE (Server-Sent Events) transport
- Our server primarily uses HTTP transport
- Some tools may not be properly exposed through this method
If the UI method doesn't work, use Method 1 (JSON Configuration) instead.
Troubleshooting
Claude Desktop Connection Issues
-
Check server status:
curl http://lpgadoc03:8002/health -
Verify tools are available:
curl http://lpgadoc03:8002/mcp/tools/list -
Test a tool call:
curl -X POST http://lpgadoc03:8002/mcp/tools/call \ -H "Content-Type: application/json" \ -d '{"name": "get_server_status", "arguments": {}}' -
Check Claude Desktop logs:
- Look for MCP server logs in Claude Desktop
- Check for error messages related to
gilbert-tech-plm
-
Verify proxy script:
- Ensure Python 3 is available:
python3 --version - Check dependencies:
python3 -c "import mcp.server, httpx; print('Dependencies OK')" - Test proxy script:
python3 mcp_proxy.py(should start without errors)
- Ensure Python 3 is available:
MCP Inspector for Advanced Troubleshooting
Use the MCP Inspector to test your proxy script:
npx @modelcontextprotocol/inspector python /path/to/mcp_proxy.py
This will open a web interface to test the MCP connection and tools.
Common Issues
Issue: "Server disconnected" or "Connection failed"
- Solution: Ensure the proxy script path is absolute and correct
- Solution: Check that the server URL in the proxy script matches your deployment
Issue: "Tools not showing in Claude"
- Solution: Restart Claude Desktop completely
- Solution: Check that the HTTP server is responding to tool requests
Issue: "Permission denied" errors
- Solution: Make sure the proxy script is executable:
chmod +x mcp_proxy.py - Solution: Verify Python 3 is in your PATH
Current Deployment
The Gilbert-Tech MCP server is currently deployed at:
- Server URL:
http://lpgadoc03:8002 - Health Check:
http://lpgadoc03:8002/health - Available Tools: 10 tools for PLM, Business Central, and SQL access
- Transport: HTTP (SSE disabled)
- Auto-restart: Enabled with Docker Compose
Claude Code (CLI)
Add this server to your Claude Code configuration:
Option 1: HTTP Transport
claude-code config servers add gilbert-tech-plm \
--transport http \
--url http://192.168.0.192:8002
Option 2: SSE Transport
claude-code config servers add gilbert-tech-plm \
--transport sse \
--url http://192.168.0.192:8002/sse
Configuration File Method
Add to your Claude Code configuration file (~/.config/claude-code/servers.json):
{
"servers": {
"gilbert-tech-plm": {
"transport": "sse",
"url": "http://192.168.0.192:8002/sse",
"description": "Gilbert-Tech PLM data access"
}
}
}
Usage Examples
Once configured, you can use the MCP server in Claude:
What information do you have about part number "1510136"?
Get metadata for the Items entity in Business Central.
Query the first 5 items from Business Central where the description contains "motor".
Get purchase order headers created after January 1, 2024.
Get the database schema for the business_central database.
Show me the table structure for the Item table in business_central.
Sample 10 rows from the Vendor table in business_central.
Execute this query: SELECT TOP 5 * FROM dbo.Item WHERE Description LIKE '%motor%'
Check the status of all database connections (PLM, BC, and SQL).
API Endpoints
GET /- Server information and statusGET /health- Health check endpointGET /sse- SSE endpoint for MCP connectionsPOST /messages- Message handling endpointGET /docs- FastAPI documentation (Swagger UI)
Health Monitoring
The server includes health checks accessible at:
http://192.168.0.192:8002/health
Logs
View container logs:
docker-compose logs -f gilbert-mcp-server
Security Notes
- The server runs on your internal network (192.168.0.192)
- PLM credentials are stored in the mounted config file
- CORS is enabled for development - consider restricting for production
- Use HTTPS in production environments
Development
Local Development
# Install dependencies
pip install -r requirements.txt
# Run locally
python main.py
The server will start on http://localhost:8002
Testing
# Test the health endpoint
curl http://localhost:8002/health
# Test part lookup (replace with actual part number)
curl -X POST http://localhost:8002/messages \
-H "Content-Type: application/json" \
-d '{"method": "tools/call", "params": {"name": "get_part_info", "arguments": {"part_number": "TEST-123"}}}'
Troubleshooting
- Server won't start: Check Docker logs and ensure port 8002 is available
- PLM connection issues: Verify credentials in
data/config.ini - Claude can't connect: Ensure firewall allows access to port 8002 from your client machine
- SSL/TLS errors: PLM connection uses
verify=False- ensure your PLM server certificate is valid
Version
Current version: 1.0.0