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 サーバーを簡単に作成する機能を追加します。
MCPクライアントの作成に使用される「@node-in-layers/mcp-client」というコンパニオンライブラリがあります。これら2つのライブラリは、モデルとツールを定義するための同じ機能を共有しています。
新しいレイヤー
このライブラリは、システムに新しいレイヤーmcp
を追加します。express express
の後に配置する必要があります。
使用法
このライブラリを使用するには、設定に追加を行うだけでなく、アプリ/ドメインから「mcp」レイヤーを作成してエクスポートする必要があります。
設定
このアプリ/ドメインを設定ファイルに追加します。MCPサーバーにツールを追加するアプリの前に、この作業を行う必要があります。
次に、 mcp
アプリ/ドメインを次のように構成します。
MCPレイヤーの作成
アプリ/ドメインからレイヤーを返す関数をエクスポートすることで、MCP レイヤーを作成できます。
モデルの追加
モデルをCRUDS関数でラップし、mcpレイヤーを使ってMCPサーバーに追加できます。注:この処理を実行するには、レイヤーにサービスレイヤーと機能レイヤーの両方が必要です(モデルに加えて)。Node in Layersはモデルに自動的にcrudsプロパティを作成するので、これを追加できます。
1 つずつ実行する例を次に示します。(一般的には推奨されませんが、実行可能です)。
ガスを使って本当に調理できる方法をご紹介します。(超おすすめ)
モデルの追加を整理するもう一つの方法は、集中管理されたMCPドメインから行うことです。他のドメインがすべて読み込まれた後、このドメインを最後のドメインとして配置します。
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
モデルの定義、CRUD 操作の追加、クライアントとの対話のためのツールを使用して MCP (Model-Control-Protocol) サーバーの作成を簡素化する Node In Layers パッケージ。
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