Skip to main content
Glama

MCP Server for Alloy Modeling Language

by awwaiid
test-error.js1.12 kB
#!/usr/bin/env node import { Client } from "@modelcontextprotocol/sdk/client/index.js"; import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js"; async function testErrorHandling() { console.log("Testing MCP Alloy Server error handling...\n"); const transport = new StdioClientTransport({ command: "node", args: ["build/index.js"] }); const client = new Client( { name: "test-client", version: "1.0.0" }, { capabilities: { tools: {} } } ); await client.connect(transport); // Test with invalid Alloy code console.log("Testing with invalid Alloy code..."); const result = await client.callTool({ name: "execute_alloy", arguments: { code: "this is not valid alloy code" } }); console.log("Error result:"); result.content.forEach(item => { if (item.type === 'text') { console.log(item.text); } }); await client.close(); console.log("\n✓ Error handling test completed"); } testErrorHandling().catch(error => { console.error("Test failed:", error); process.exit(1); });

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/awwaiid/mcp-server-alloy'

If you have feedback or need assistance with the MCP directory API, please join our Discord server