MCPKit
シンプルなMCP
MCP (Model Context Protocol) サーバーを作成するためのシンプルな TypeScript ライブラリ。
特徴
シンプルなAPI : 最小限のコードでMCPサーバーを作成
型安全性: TypeScriptの完全統合
パラメータ検証: Zod による組み込み検証
MCP互換:モデルコンテキストプロトコルを完全に実装
Related MCP server: easy-mcp
インストール
npm install simple-mcpクイックスタート
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' });クラスベースの実装
クラスを使用して MCP ツールを実装することもできます。
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' });例
より完全な例については、例のディレクトリを参照してください。
貢献
貢献を歓迎します!お気軽に問題を報告したり、プルリクエストを送信してください。
ライセンス
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA TypeScript wrapper library for the Model Context Protocol SDK that provides a simplified interface for creating MCP servers with tools, resources, and prompts without needing to work directly with the protocol.94AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceSimplifies creating MCP servers in TypeScript with an Express-like API and experimental decorators, enabling quick definition of tools, resources, and prompts.57196MIT
- AlicenseNot gradedqualityAmaintenanceA lightweight SDK for building Model Context Protocol (MCP) servers with zero-config setup, automatic TypeScript type inference, and Zod runtime validation.142MIT
- AlicenseNot gradedqualityCmaintenanceTurn your typed TypeScript functions into an MCP server — tool, resource, and prompt schemas inferred from your types and JSDoc. No schema library, no decorators, no boilerplate.12MIT
Related MCP Connectors
A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…
A Model Context Protocol server for Wix AI tools
MCP Spec Compliance MCP — audits any MCP server.json against the official Model Context Protocol
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/simple-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server