Skip to main content
Glama

connect_scenic

Test and establish a TCP connection to Scenic applications using the Scenic MCP server. Configure the port to validate connectivity and ensure seamless integration for AI-driven automation and testing.

Instructions

Test connection to a Scenic application via TCP server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNoTCP port (default: 9999)

Implementation Reference

  • The handler function that establishes connection to the Scenic TCP server: sets port, checks if server is running, sends 'hello' command if connected, or returns waiting message.
    async function handleConnectScenic(args: any) { try { const { port = 9999 } = args; conn.setCurrentPort(port); const isRunning = await conn.checkTCPServer(port); if (!isRunning) { return { content: [ { type: 'text', text: `No Scenic TCP server found on port ${port}.\n\nStatus: Waiting for connection\n\nTo use Scenic MCP, your Scenic application needs to include the ScenicMcp.Server module and start it on the specified port. The MCP server will continue monitoring for the connection.`, }, ], isError: false, }; } const response = await conn.sendToElixir('hello'); const data = JSON.parse(response); return { content: [ { type: 'text', text: `Successfully connected to Scenic application!\n\nServer info:\n${JSON.stringify(data, null, 2)}`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error connecting to Scenic application: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; } }
  • Tool schema definition: name, description, and inputSchema specifying optional 'port' parameter (default 9999).
    { name: 'connect_scenic', description: 'CONNECTION SETUP: Establish the connection to the ScenicMCP GenServer running inside our Scenic app. Use this first before other interaction tools.', inputSchema: { type: 'object', properties: { port: { type: 'number', description: 'TCP port (default: 9999)', default: 9999, }, }, }, },
  • src/tools.ts:190-191 (registration)
    Handler registration in the tool router switch statement within handleToolCall function.
    case 'connect_scenic': return await handleConnectScenic(args);

Other Tools

Related Tools

Latest Blog Posts

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/scenic-contrib/scenic_mcp_experimental'

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