Skip to main content
Glama

MCPKit

by ribeirogab

MCP simple

Una biblioteca TypeScript simple para crear servidores MCP (Protocolo de contexto de modelo).

Características

  • API simple : crea servidores MCP con un código mínimo
  • Seguridad de tipos : Integración completa con TypeScript
  • Validación de parámetros : Validación integrada con Zod
  • Compatible con MCP : implementa completamente el protocolo de contexto de modelo

Instalación

npm install simple-mcp

Inicio rápido

import { McpServer } from 'simple-mcp'; import { z } from 'zod'; // Create a server instance const server = new McpServer({ name: 'my-server' }); // Register the tool with the server server.tool({ name: 'greet', parameters: { name: z.string().describe('Person\'s name') }, execute: async ({ name }) => { return { content: [ { type: 'text', text: `Hello, ${name}! Nice to meet you.` } ] }; } }); // Start the server server.start({ transportType: 'stdio' });

Implementación basada en clases

También puedes implementar herramientas MCP usando clases:

import { McpServer, type McpTool } from 'simple-mcp'; import { z, ZodObject } from 'zod'; const parameters = { name: z.string().describe('The name is required'), }; class GreetTool implements McpTool<typeof parameters> { public readonly name = 'greet'; public readonly parameters = parameters; public async execute({ name }: z.infer<ZodObject<typeof this.parameters>>) { return { content: [ { type: 'text', text: `Hello, ${name}! Nice to meet you.`, }, ], }; } } // Initialize a new MCP server with the name 'greet-server' const server = new McpServer({ name: 'greet-server' }); // Create an instance of the GreetTool class const greetTool = new GreetTool(); // Register the tool with the server server.tool(greetTool); // Start the server using stdio as the transport method server.start({ transportType: 'stdio' });

Ejemplos

Consulte el directorio de ejemplos para obtener ejemplos más completos:

Contribuyendo

¡Agradecemos sus contribuciones! No dude en abrir problemas o enviar solicitudes de incorporación de cambios.

Licencia

Instituto Tecnológico de Massachusetts (MIT)

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Tools

Una biblioteca TypeScript simple para crear servidores de Protocolo de Contexto de Modelo (MCP) con características como seguridad de tipos, validación de parámetros y una API de código mínima.

  1. Características
    1. Instalación
      1. Inicio rápido
        1. Implementación basada en clases
          1. Ejemplos
            1. Contribuyendo
              1. Licencia

                Related MCP Servers

                • A
                  security
                  F
                  license
                  A
                  quality
                  A template for creating Model Context Protocol (MCP) servers in TypeScript, offering features like container-based dependency injection, a service-based architecture, and integration with the LLM CLI for architectural design feedback through natural language.
                  Last updated -
                  1
                  2
                  6
                  TypeScript
                • A
                  security
                  A
                  license
                  A
                  quality
                  A TypeScript-based template for building Model Context Protocol servers, featuring fast testing, automated version management, and a clean structure for MCP tool implementations.
                  Last updated -
                  1
                  676
                  4
                  TypeScript
                  MIT License
                • -
                  security
                  F
                  license
                  -
                  quality
                  A TypeScript framework for building Model Context Protocol (MCP) servers with automatic discovery and loading of tools, resources, and prompts.
                  Last updated -
                  1
                  TypeScript
                  • Apple
                • -
                  security
                  F
                  license
                  -
                  quality
                  A starter template for creating Model Context Protocol servers using TypeScript, providing basic setup and sample tool implementation for developers to build their own MCP servers.
                  Last updated -
                  TypeScript

                View all related MCP servers

                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/ribeirogab/mcpkit'

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