Integrations
Integrates with Express web framework, allowing the MCP server to be placed after the Express layer in the application stack and leverage Express for HTTP connections.
MCP 服务器 - 用于构建 MCP 服务器的 Node In Layers 包
该库增加了使用 Node In Layers 轻松创建 MCP 服务器的功能。
它有一个名为“@node-in-layers/mcp-client”的配套库,用于创建 MCP 客户端。这两个库在定义模型和工具方面共享相同的功能。
新建图层
此库为系统添加了一个新层mcp
。它应放置在express
层之后。
用法
为了使用这个库,您必须对您的配置进行添加,以及从您的应用程序/域中创建和导出“mcp”层。
配置
将此应用/域名添加到您的配置文件中。您应该在将工具添加到 MCP 服务器的应用程序之前执行此操作。
然后使用以下内容配置mcp
app/domain:
创建 MCP 层
您可以通过从应用程序/域导出返回层的函数来创建 MCP 层。
添加模型
您可以使用 CRUDS 函数包装您的模型,并通过 mcp 层将它们添加到 MCP 服务器。注意:为了实现此功能,您的层必须同时包含服务层和功能层。(除了您的模型之外。)层中的节点会自动为您的模型创建一个 cruds 属性,您可以添加它们。
下面是一个逐个执行的示例。(通常不推荐,但可行)。
这里有一种方法,让你真正用煤气做饭。(强烈推荐)
另一种组织添加模型的方式是使用集中式 mcp 域。在所有其他域都加载完成后,将其作为最后一个域。
Related MCP Servers
- AsecurityAlicenseAqualityA beginner-friendly Model Context Protocol (MCP) server that helps users understand MCP concepts, provides interactive examples, and lists available MCP servers. This server is designed to be a helpful companion for developers working with MCP. Also comes with a huge list of servers you can install.Last updated -3936JavaScriptApache 2.0
- -securityAlicense-qualityMCP Server simplifies the implementation of the Model Context Protocol by providing a user-friendly API to create custom tools and manage server workflows efficiently.Last updated -43TypeScriptMIT License
- -security-license-qualityA specialized server that helps users create new Model Context Protocol (MCP) servers by providing tools and templates for scaffolding projects with various capabilities.Last updated -1TypeScript
- -securityFlicense-qualityA starter template for building Model Context Protocol (MCP) servers, enabling developers to create and add custom tools that can be integrated with Claude Desktop.Last updated -TypeScript