Skip to main content
Glama
index.ts512 B
import express from 'express'; import { statelessHandler } from 'express-mcp-handler'; import { createServer } from './server'; // Configure the stateless handler const handler = statelessHandler(createServer); // Create Express app const app = express(); app.use(express.json()); // Mount the handler (stateless only needs POST) app.post('/mcp', handler); // Start the server const PORT = process.env.PORT || 3001; app.listen(PORT, () => { console.log(`Stateless MCP server running on port ${PORT}`); });

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/jhgaylor/express-mcp-server-echo'

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