Skip to main content
Glama

GitHub Enterprise MCP Server

stdio.js1.26 kB
/** * This is a minimal implementation of the MCP SDK stdio transport for the GitHub Enterprise MCP server. * In a real-world scenario, you would use the actual @modelcontextprotocol/sdk package. */ export class StdioServerTransport { constructor() { this.onRequest = null; // Set up stdin/stdout handling process.stdin.on('data', (data) => { try { const request = JSON.parse(data.toString()); if (this.onRequest) { this.onRequest(request) .then((result) => { const response = { jsonrpc: '2.0', id: request.id, result, }; process.stdout.write(JSON.stringify(response) + '\n'); }) .catch((error) => { const response = { jsonrpc: '2.0', id: request.id, error: { code: error.code || -32603, // Internal error message: error.message || 'Unknown error', }, }; process.stdout.write(JSON.stringify(response) + '\n'); }); } } catch (error) { console.error('Error processing request:', error); } }); } }

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/piyushgIITian/github-enterprice-mcp'

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