Skip to main content
Glama
aj47
by aj47
server.ts1.26 kB
/** * MCP Server Setup * Configures and exports the MCP server with all tools */ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { domTools } from './tools/dom/index.js'; import { uiTools } from './tools/ui/index.js'; import { permissionTools } from './tools/permissions/index.js'; /** * Create and configure the MCP server */ export function createServer(): McpServer { const server = new McpServer({ name: 'electron-native-mcp', version: '0.1.0', }); // Register all DOM inspection tools for (const tool of domTools) { server.registerTool( tool.name, { description: tool.description, inputSchema: tool.inputSchema.shape, }, tool.handler ); } // Register all UI automation tools for (const tool of uiTools) { server.registerTool( tool.name, { description: tool.description, inputSchema: tool.inputSchema.shape, }, tool.handler ); } // Register all permission tools for (const tool of permissionTools) { server.registerTool( tool.name, { description: tool.description, inputSchema: tool.inputSchema.shape, }, tool.handler ); } return server; }

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/aj47/electron-native-mcp'

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