Paul-MHP/sysmlv2-MCP-Server
If you are the rightful owner of sysmlv2-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 SysML v2 MCP Server is a Model Context Protocol server that provides AI assistants with access to SysML v2 API functionality through Azure Functions.
SysML v2 MCP Server
A Model Context Protocol (MCP) Server that provides AI assistants with access to SysML v2 API systems through standardized MCP tools. Deployed as an Azure Function for scalable, serverless operation.
Architecture
Claude Client ←→ MCP Protocol ←→ Azure Functions ←→ SysML v2 REST API
The server translates MCP tool calls into SysML API requests and formats responses for AI consumption.
Available MCP Tools
The server provides these tools to AI assistants:
- list_projects - List all SysML v2 projects
- get_project - Get details of a specific project (requires: projectId)
- create_project - Create new project (requires: name, description)
- delete_project - Delete project (requires: projectId)
- list_elements - List elements in project (requires: projectId, optional: commitId)
- get_element - Get element details (requires: projectId, elementId, optional: commitId)
Quick Start
Prerequisites
- Azure subscription with permission to create Function Apps
- Access to Azure Cloud Shell (recommended) or Azure CLI locally
- SysML v2 API endpoint (default:
https://sysml-api-webapp-2024.azurewebsites.net)
Deployment
-
Open Azure Cloud Shell at https://shell.azure.com
-
Run the deployment script:
# Set configuration variables RESOURCE_GROUP="287013_Scalable_AI_Applications" # Change to your resource group LOCATION="westeurope" STORAGE_ACCOUNT="sysmlv2mcpstorage$(date +%s | tail -c 6)" FUNCTION_APP="sysmlv2-mcp-server-$(date +%s | tail -c 6)" SYSML_API_URL="https://sysml-api-webapp-2024.azurewebsites.net" # Create Azure resources echo "🚀 Creating Azure resources..." az storage account create --name "$STORAGE_ACCOUNT" --resource-group "$RESOURCE_GROUP" --location "$LOCATION" --sku "Standard_LRS" --kind "StorageV2" az functionapp create --resource-group "$RESOURCE_GROUP" --consumption-plan-location "$LOCATION" --runtime "dotnet-isolated" --runtime-version "8" --functions-version "4" --name "$FUNCTION_APP" --storage-account "$STORAGE_ACCOUNT" --disable-app-insights false az functionapp config appsettings set --name "$FUNCTION_APP" --resource-group "$RESOURCE_GROUP" --settings "FUNCTIONS_WORKER_RUNTIME=dotnet-isolated" "FUNCTIONS_EXTENSION_VERSION=~4" "DOTNET_VERSION=8.0" "SYSML_API_BASE_URL=$SYSML_API_URL" az functionapp cors add --name "$FUNCTION_APP" --resource-group "$RESOURCE_GROUP" --allowed-origins "*" # Deploy the code echo "📦 Deploying function code..." git clone https://github.com/Paul-MHP/sysmlv2-MCP-Server.git cd sysmlv2-MCP-Server dotnet build --configuration Release func azure functionapp publish $FUNCTION_APP --dotnet-isolated --force echo "✅ Deployment complete!" echo "MCP Endpoint: https://$FUNCTION_APP.azurewebsites.net/api/mcp" -
Test the deployment:
# Test MCP initialize curl -X POST https://YOUR-FUNCTION-APP.azurewebsites.net/api/mcp?auth=false \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":"1","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' # Test tools list curl -X POST https://YOUR-FUNCTION-APP.azurewebsites.net/api/mcp?auth=false \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":"2","method":"tools/list"}' # Test list projects curl -X POST https://YOUR-FUNCTION-APP.azurewebsites.net/api/mcp?auth=false \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":"3","method":"tools/call","params":{"name":"list_projects","arguments":{}}}'
Local Development
Prerequisites
- .NET 8 SDK
- Azure Functions Core Tools v4
- Visual Studio Code (recommended)
Setup
-
Clone the repository:
git clone https://github.com/Paul-MHP/sysmlv2-MCP-Server.git cd sysmlv2-MCP-Server -
Configure local settings:
// local.settings.json { "IsEncrypted": false, "Values": { "AzureWebJobsStorage": "UseDevelopmentStorage=true", "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated", "SYSML_API_BASE_URL": "https://sysml-api-webapp-2024.azurewebsites.net" }, "Host": { "CORS": "*" } } -
Start locally:
func start -
Test locally:
# Test MCP initialize curl -X POST http://localhost:7071/api/mcp?auth=false \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":"1","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' # Test tools list curl -X POST http://localhost:7071/api/mcp?auth=false \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":"2","method":"tools/list"}'
Configuration
Environment Variables
- SYSML_API_BASE_URL (required) - Base URL for SysML v2 API server
- FUNCTIONS_WORKER_RUNTIME - Set to
dotnet-isolated(auto-configured) - FUNCTIONS_EXTENSION_VERSION - Set to
~4(auto-configured) - AzureWebJobsStorage - Azure storage connection string (auto-configured)
CORS
The function is configured to accept requests from any origin (*). For production, consider restricting this to specific domains.
Claude Desktop Integration
Prerequisites
- Node.js installed on your local machine
- Access to your deployed Azure Function App
Step 1: Set up Native MCP Server
-
Install MCP SDK:
npm install @modelcontextprotocol/sdk -
Copy the native MCP server:
# Copy native-mcp-server.js to your local machine # Update the SERVER_URL in the file to match your deployed function: const SERVER_URL = 'https://your-function-app.azurewebsites.net/api/mcp?auth=false';
Step 2: Configure Claude Desktop
Add to your Claude Desktop configuration file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"sysmlv2": {
"command": "node",
"args": [
"/path/to/your/native-mcp-server.js"
]
}
}
}
Step 3: Restart Claude Desktop
Close and reopen Claude Desktop to load the new MCP server.
Step 4: Test Integration
Try these commands in Claude:
- "List all SysML projects"
- "Create a new project called 'Vehicle System' with description 'Automotive system model'"
- "Show me the elements in project c58945fb-f2d0-4696-bce3-8afcb2c1966e"
- "Get details of project Projekt1"
API Configuration
The server connects to the SysML v2 API at:
- Production:
https://sysml-api-webapp-2024.azurewebsites.net - Local:
http://localhost:9000
Configure via the SYSML_API_BASE_URL environment variable.
Architecture
Claude Client ←→ MCP Protocol ←→ Azure Functions ←→ SysML v2 REST API
The MCP server acts as a translation layer, converting MCP tool calls into SysML API requests and formatting responses for AI consumption.
Error Handling
The server provides comprehensive error handling:
- Invalid request formats return appropriate MCP error responses
- API failures are captured and returned as tool execution errors
- All errors include descriptive messages for debugging
Troubleshooting
Claude Desktop Connection Issues
If Claude Desktop shows "disconnected" or validation errors:
- Verify Node.js is installed:
node --version - Install MCP SDK:
npm install @modelcontextprotocol/sdk - Check file paths: Ensure the path in
claude_desktop_config.jsonpoints to yournative-mcp-server.js - Test the native server locally:
node native-mcp-server.js # Then send test JSON-RPC messages to stdin
Azure Function Issues
- Check function logs in Azure portal under Function App > Logs
- Verify environment variables are set correctly
- Test with curl using the examples above
- Check CORS settings if testing from browser
Common Solutions
- Authentication errors: Use
?auth=falseparameter in URL for testing - CORS errors: Ensure
*is configured as allowed origin - Timeout errors: Increase request timeout in Claude Desktop config
Testing with Online Tools
You can test your deployed MCP server using online MCP Inspector tools:
- https://onlinemcpinspector.com/
- Enter your server URL:
https://your-function-app.azurewebsites.net/api/mcp?auth=false - Select "Streamable HTTP" transport type
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test locally with
func start - Submit a pull request
License
MIT License - see LICENSE file for details