Skip to main content
Glama

MCP Server NestJS

by Cstannahill

MCP サーバー (NestJS)

NestJSで構築された、堅牢でスケーラブル、かつ拡張性の高いサーバーサイドアプリケーションです。このプロジェクトは、モデルコンテキストプロトコル(MCP)サーバー実装、ファイル管理、認証、そして投稿とユーザー向けのモジュール式REST APIを提供します。


目次


特徴

  • MCP サーバー: ファイル操作などのためのモデル コンテキスト プロトコルを実装します。
  • ファイル管理: REST エンドポイントを介してファイルをアップロード、ダウンロード、一覧表示、削除します。
  • 認証: ローカル戦略による JWT ベースの認証。
  • ユーザーと投稿のモジュール: DTO とエンティティを使用したユーザーと投稿のモジュール構造。
  • Swagger 統合: すぐに使用できる API ドキュメント。
  • 拡張可能: 新しいモジュールや機能を簡単に追加できます。

建築

  • NestJS : 効率的で信頼性が高く、スケーラブルなサーバー側アプリケーションを構築するためのプログレッシブ Node.js フレームワーク。
  • MCP 統合: ファイル操作にカスタム FileBrowserMCP を使用します。
  • モジュラー設計: 各機能は独自のモジュールにカプセル化されます。

はじめる

前提条件

インストール

# Clone the repository $ git clone https://github.com/Cstannahill/mcp-server-nestjs.git $ cd nestjs-mcp-server # Install dependencies $ npm install

環境変数

シークレットまたは構成のオーバーライド用に、ルート ディレクトリに.envファイルを作成します (オプション)。


発達

サーバーの実行

# Start in development mode (with hot reload) $ npm run start:dev # Start in production mode $ npm run start:prod

便利なコマンド

# Compile TypeScript $ npm run build # Lint code $ npm run lint

テスト

ユニットテストを実行する

$ npm run test

エンドツーエンド(e2e)テストを実行する

$ npm run test:e2e

テスト範囲

$ npm run test:cov

展開

  1. プロジェクトをビルドします。
    $ npm run build
  2. サーバーを起動します。
    $ npm run start:prod
  3. 高度なデプロイメント(Docker、クラウドなど)については、 NestJS デプロイメント ドキュメントを参照してください。

APIリファレンス

  • サーバーの実行中、Swagger UI は/apiで利用できます (有効な場合)。
  • 主なエンドポイント:
    • POST /auth/login — 認証してJWTを受け取る
    • POST /files/upload — ファイルをアップロードする
    • GET /files/:id — ファイルをダウンロードする
    • DELETE /files/:id — ファイルを削除する
    • GET /files — ファイルを一覧表示する
    • POST /users — ユーザーを作成する
    • POST /posts — 投稿を作成する

詳細については、 src/内のコントローラー ファイルを参照してください。


プロジェクト構造

src/ app.module.ts # Root module main.ts # Entry point auth/ # Authentication (JWT, guards, strategies) file/ # File management (upload, download, delete) mcps/ # Model Context Protocol integration posts/ # Posts module users/ # Users module database/ # Database connection (if used) uploads/ # Uploaded files (local dev)

貢献

  1. リポジトリをフォークする
  2. 機能ブランチを作成します( git checkout -b feature/YourFeature
  3. 変更をコミットします( git commit -am 'Add some feature'
  4. ブランチにプッシュする ( git push origin feature/YourFeature )
  5. プルリクエストを開く

コーディング標準

  • 既存のコードスタイルに従う(ESLint設定を参照)
  • 新しい機能のユニットテストとE2Eテストを書く
  • コードを文書化し、必要に応じてREADMEを更新します

Gitのセットアップ

このプロジェクトではバージョン管理にGitを使用しています。リモートオリジンは次のように設定されています。

https://github.com/Cstannahill/mcp-server-nestjs.git

ライセンス

Nest はMIT ライセンスです。


リソースとサポート


ご質問、問題、機能リクエストがある場合は、問題を開くか、メンテナーに連絡してください。

-
security - not tested
F
license - not found
-
quality - not tested

ファイル操作用のモデル コンテキスト プロトコル (MCP) を実装し、ファイル、ユーザー、投稿を管理するための認証とモジュール式 REST API を提供する堅牢なサーバー側アプリケーションです。

  1. 目次
    1. 特徴
      1. 建築
        1. はじめる
          1. 前提条件
          2. インストール
          3. 環境変数
        2. 発達
          1. サーバーの実行
          2. 便利なコマンド
        3. テスト
          1. ユニットテストを実行する
          2. エンドツーエンド(e2e)テストを実行する
          3. テスト範囲
        4. 展開
          1. APIリファレンス
            1. プロジェクト構造
              1. 貢献
                1. コーディング標準
              2. Gitのセットアップ
                1. ライセンス
                  1. リソースとサポート

                    Related MCP Servers

                    • -
                      security
                      A
                      license
                      -
                      quality
                      MCP 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 -
                      4
                      3
                      TypeScript
                      MIT License
                    • -
                      security
                      A
                      license
                      -
                      quality
                      MCP Server provides a simpler API to interact with the Model Context Protocol by allowing users to define custom tools and services to streamline workflows and processes.
                      Last updated -
                      13
                      2
                      TypeScript
                      MIT License
                    • -
                      security
                      A
                      license
                      -
                      quality
                      A Model Context Protocol (MCP) server that allows AI models to safely access and interact with local file systems, enabling reading file contents, listing directories, and retrieving file metadata.
                      Last updated -
                      47
                      1
                      JavaScript
                      MIT License
                      • Linux
                    • A
                      security
                      F
                      license
                      A
                      quality
                      A Model Context Protocol (MCP) server that interacts with system APIs, allowing users to check connections, search employees, register breakfast, and update chemical information by shifts.
                      Last updated -
                      21
                      76
                      JavaScript

                    View all related MCP servers

                    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/Cstannahill/mcp-server-nestjs'

                    If you have feedback or need assistance with the MCP directory API, please join our Discord server