UNPKG

@crazyrabbitltc/railway-mcp

Version:

Railway MCP Server - 146+ tools with 100% Railway API coverage, comprehensive MCP testing framework, and real infrastructure management through AI assistants. Enhanced version with enterprise features, based on original work by Jason Tan.

70 lines (69 loc) 1.92 kB
export class TcpProxyRepository { client; constructor(client) { this.client = client; } /** * Create a new TCP proxy for a service in an environment * @param input The creation parameters for the TCP proxy */ async tcpProxyCreate(input) { const query = ` mutation tcpProxyCreate($input: TCPProxyCreateInput!) { tcpProxyCreate(input: $input) { id applicationPort createdAt deletedAt domain environmentId proxyPort serviceId updatedAt } } `; const variables = { input }; const response = await this.client.request(query, variables); return response.tcpProxyCreate; } /** * Delete a TCP proxy by ID * @param id The ID of the TCP proxy to delete */ async tcpProxyDelete(id) { const query = ` mutation tcpProxyDelete($id: String!) { tcpProxyDelete(id: $id) } `; const variables = { id }; const response = await this.client.request(query, variables); return response.tcpProxyDelete; } /** * List all TCP proxies for a service in an environment * @param environmentId The environment ID * @param serviceId The service ID */ async listTcpProxies(environmentId, serviceId) { const query = ` query tcpProxies($environmentId: String!, $serviceId: String!) { tcpProxies(environmentId: $environmentId, serviceId: $serviceId) { id applicationPort createdAt deletedAt domain environmentId proxyPort serviceId updatedAt } } `; const variables = { environmentId, serviceId }; const response = await this.client.request(query, variables); return response.tcpProxies; } }