Skip to main content
Glama

Coupler Analytics

by railsware
index.ts1.36 kB
import { Server } from '@modelcontextprotocol/sdk/server/index.js' import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js' // Import all tools here import * as getData from '../tools/get-data/index.js' import * as getSchema from '../tools/get-schema/index.js' import * as listDataflows from '../tools/list-dataflows/index.js' import * as getDataflow from '../tools/get-dataflow/index.js' const TOOL_MAP = { [getData.name]: getData.handler, [getSchema.name]: getSchema.handler, [listDataflows.name]: listDataflows.handler, [getDataflow.name]: getDataflow.handler, } export const server = new Server({ name: 'Coupler.io MCP server', version: '0.0.4', }, { capabilities: { tools: {}, logging: {} } }) // Look up the tool by name in TOOL_MAP and call its handler server.setRequestHandler(CallToolRequestSchema, async (request) => { const handler = TOOL_MAP[request.params.name as keyof typeof TOOL_MAP] if (!handler) { throw new Error(`Handler for tool "${request.params.name}" not found`) } return await handler(request.params.arguments) }) // List all tools server.setRequestHandler( ListToolsRequestSchema, async () => ({ tools: [ getData.toolListEntry, getSchema.toolListEntry, listDataflows.toolListEntry, getDataflow.toolListEntry, ] }) )

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/railsware/coupler-io-mcp-server'

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