Skip to main content
Glama

Mattermost MCP Server

index.ts1.37 kB
#!/usr/bin/env node import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; import { loadConfig } from './config/config'; import { getMattermostMcpTools } from './handlers'; /** * Main entry point for the Mattermost MCP server */ async function main() { // Disable all console logging to prevent interference with JSON-RPC communication const noop = () => {}; console.log = noop; console.error = noop; console.warn = noop; console.info = noop; console.debug = noop; try { const config = loadConfig(); const server = new McpServer({ name: 'mcp-mattermost', version: '0.0.5', }); const tools = await getMattermostMcpTools(config); tools.forEach(tool => { if ( typeof tool === 'object' && tool !== null && 'name' in tool && 'description' in tool && 'parameter' in tool && 'handler' in tool ) { server.tool( tool.name as string, tool.description as string, tool.parameter as any, tool.handler as any, ); } }); await server.connect(new StdioServerTransport()); } catch (e) { process.stderr.write(`Error: ${e instanceof Error ? e.message : String(e)}\n`); process.exit(1); } } main();

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/Wagmi-Tech-Co/mcp-mattermost'

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