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
- -securityAlicense-qualityNode.js server implementing Model Context Protocol (MCP) for filesystem operations.Last updated -103,29257,615TypeScriptMIT License
- 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
- AsecurityAlicenseAqualityAn MCP server enabling secure interaction with n8n workflows, executions, and settings via the Model Context Protocol, designed for integration with Large Language Models (LLMs).Last updated -336534TypeScriptMIT License
- AsecurityAlicenseAqualityA comprehensive Model Context Protocol server that provides advanced Node.js development tooling for automating project creation, component generation, package management, and documentation with AI-powered assistance.Last updated -72JavaScriptMIT License