Skip to main content
Glama
main.ts1.12 kB
import { Server } from "@modelcontextprotocol/sdk/server/index.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import { HandlerRegistry } from "./registry.js"; import { NavigationHandler } from "./handlers/navigation.js"; import { SearchHandler } from "./handlers/search.js"; export class MapboxServer { private server: Server; private registry: HandlerRegistry; constructor() { this.server = new Server( { name: "mcp-server/mapbox", version: "0.1.0", }, { capabilities: { tools: {}, }, } ); this.registry = new HandlerRegistry(); this.initializeHandlers(); } private initializeHandlers() { // Register all handlers this.registry.register(new NavigationHandler()); this.registry.register(new SearchHandler()); // Register all handlers to the server this.registry.registerAll(this.server); } async start() { const transport = new StdioServerTransport(); await this.server.connect(transport); console.error("Mapbox MCP Server running on stdio"); } }

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/AidenYangX/mapbox-mcp-server'

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