Skip to main content
Glama
index.ts1.11 kB
import 'dotenv/config'; import { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; import { GHLApiClient } from './clients/ghl-api-client.js'; import { DEFAULT_GHL_BASE_URL, configSchema, resolveConfig } from './config.js'; import { GHLMCPServer, setupGracefulShutdown } from './server.js'; export { configSchema }; async function main(): Promise<void> { const config = resolveConfig(); const server = new Server( { name: 'ghl-mcp-server', version: '1.0.0', }, { capabilities: { tools: {}, }, } ); const ghlClient = new GHLApiClient({ accessToken: config.ghlApiKey, baseUrl: config.ghlBaseUrl ?? DEFAULT_GHL_BASE_URL, version: '2021-07-28', locationId: config.ghlLocationId, }); const ghlServer = new GHLMCPServer({ server, ghlClient }); setupGracefulShutdown(); await ghlServer.start(new StdioServerTransport()); } main().catch((error) => { console.error('Unhandled error while starting MCP server:', error); process.exit(1); });

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/cpretzinger/GoHighLevel-MCP'

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