Package Exports
- @juliandb/universal-mcp-server
- @juliandb/universal-mcp-server/index-universal.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@juliandb/universal-mcp-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
BuildHub MCP Server
A Model Context Protocol (MCP) server that exposes BuildHub SDK functionality to VS Code Copilot Chat.
Quick Setup
1. Install Dependencies
cd mcp-server
npm install2. Configure Environment
# Copy environment template
Copy-Item .env.example .env
# Edit .env with your BuildHub credentials
notepad .envSet these environment variables:
BUILDHUB_API_KEY: Your BuildHub API keyBUILDHUB_API_URL: BuildHub API base URLBUILDHUB_TENANT_ID: (Optional) Default tenant ID
3. Set Environment Variables in Windows
# Set environment variables for your user account
[System.Environment]::SetEnvironmentVariable('BUILDHUB_API_KEY', 'your_actual_api_key', 'User')
[System.Environment]::SetEnvironmentVariable('BUILDHUB_API_URL', 'https://api.buildhub.com/v1', 'User')
[System.Environment]::SetEnvironmentVariable('BUILDHUB_TENANT_ID', 'your_tenant_id', 'User')4. Restart VS Code
After setting environment variables, restart VS Code to enable the MCP server.
Available Tools
| Tool | Description | Parameters |
|---|---|---|
list_bookings |
List all bookings for a tenant | tenant_id, status, limit |
get_booking |
Get details for a specific booking | booking_id |
create_booking |
Create a new booking | service_id, client_info, datetime, notes |
list_services |
List available services | tenant_id, category |
check_availability |
Check service availability | service_id, date, duration |
list_tenants |
List all accessible tenants | None |
get_tenant_config |
Get tenant configuration | tenant_id |
update_booking_status |
Update booking status | booking_id, status, notes |
Usage in VS Code
Once configured, you can use these tools in Copilot Chat:
@copilot List all bookings for today
@copilot Create a booking for service "haircut" for client John Doe at 2pm tomorrow
@copilot Check availability for service "massage" on December 1stTesting the Server
Test the server manually:
cd mcp-server
$env:BUILDHUB_API_KEY = "your_key_here"
$env:BUILDHUB_API_URL = "https://api.buildhub.com/v1"
node index.jsTroubleshooting
Common Issues
- Environment variables not loaded: Restart VS Code after setting environment variables
- API connection errors: Verify your API key and URL are correct
- Tool not found: Check that the MCP server is properly configured in
.vscode/settings.json
Debug Mode
Run the server in debug mode:
cd mcp-server
npm run devLogs
Check VS Code Output panel > "GitHub Copilot Chat" for MCP server logs.
Customization
To customize the MCP server for your specific BuildHub SDK:
- Update API endpoints in
index.jsto match your SDK structure - Modify tool schemas to match your API parameters
- Add new tools by extending the
toolsarray andswitchstatement - Update error handling for your specific API error formats
Files Structure
mcp-server/
├── package.json # Dependencies and scripts
├── index.js # Main MCP server implementation
├── .env.example # Environment variable template
├── .env # Your actual environment variables (gitignored)
└── README.md # This file