Skip to main content
Glama
http-transport.mdc582 B
--- globs: index.ts alwaysApply: false --- # HTTP Transport Mode for MCP Server - The MCP server can run in HTTP mode using the `--http` CLI flag. - When `--http` is set, the entrypoint [src/index.ts](mdc:src/index.ts) starts an Express server and exposes the MCP API at `/mcp`. - Each POST to `/mcp` creates a new `McpServer` and `StreamableHTTPServerTransport` for stateless, isolated handling. - The HTTP port can be set with `--port` (default: 3000). - Express must be installed as a dependency for HTTP mode. - If `--http` is not set, the server runs in stdio mode as before.

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/baruchiro/paperless-mcp'

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