MCP.so
登录

MCP Implementation

@AshikNesin

基本信息

分类

其他

许可证

MIT

传输方式

stdio

作者

AshikNesin

关于 MCP Implementation

Learn MCP by building from Scarch

#mcp#learning-by-doing#learn-in-public#mcp-server#mcp-client

MCP Implementation 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "learn-mcp-by-building": {
      "command": "node",
      "args": [
        "src/examples/stdio-server.js"
      ]
    }
  }
}

MCP Implementation 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is Model Context Protocol (MCP) Implementation?

This project implements the Model Context Protocol (MCP) for building AI tools. It provides a modular framework that can be used to create MCP-compatible servers and clients, enabling AI assistants to interact with external tools and data sources.

How to use Model Context Protocol (MCP) Implementation?

Install Node.js 20.x or later, clone the repository, run npm install, then use provided scripts like npm run server:stdio and npm run client:stdio to run examples. Developers can create custom servers using the McpServer class and register tools with JSON Schema definitions.

Key features of Model Context Protocol (MCP) Implementation

  • JSON-RPC 2.0 message handling and protocol initialization
  • Tool registration with JSON Schema and invocation
  • STDIO and HTTP+SSE transport support
  • Capability negotiation and tool list change notifications
  • Standardized error handling and structured tool results
  • Example calculator tool and test clients

Use cases of Model Context Protocol (MCP) Implementation

  • Build an MCP-compatible server exposing a calculator tool via STDIO
  • Serve AI tools over HTTP with Server-Sent Events for web clients
  • Debug and test MCP server behavior using the official MCP Inspector
  • Develop custom tools and integrate them into AI assistant workflows

常见问题

1

What is the Model Context Protocol?

It is an open protocol that enables AI assistants to interact with external tools and data sources.

2

What are the runtime requirements?

Node.js 20.x or later and npm or pnpm.

3

What transports are supported?

STDIO and HTTP+SSE (Server-Sent Events) are supported.

4

How do I create a new tool?

Create a new file in `src/tools/`, define the tool definition with `inputSchema` and a handler function, then export it in `src/tools/index.js`.

5

Where can I find the protocol specification?

The MCP Protocol Specification is available at https://spec.modelcontextprotocol.io/specification/2024-11-05/.

评论

其他 分类下的更多 MCP 服务器