Skip to main content
Glama
Cstannahill

MCP Server NestJS

by Cstannahill

MCP サーバー (NestJS)

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


目次


Related MCP server: Desktop Commander MCP Server

特徴

  • 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 ライセンスです。


リソースとサポート


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

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Node.js server implementing Model Context Protocol (MCP) for filesystem operations with comprehensive permission controls, allowing secure file and directory manipulation with granular access restrictions.
    21
    668,809
    3
    Unlicense - libtelnet variant
  • -
    license
    B
    quality
    Not graded
    maintenance
    A comprehensive Model Context Protocol server for PocketBase that provides both user and administrative functionality, enabling authentication, collection/record management, file operations, and system administration through a standardized interface.
    38
    12
  • A
    license
    Not graded
    quality
    F
    maintenance
    Node.js server implementing Model Context Protocol (MCP) for filesystem operations, enabling read/write files, directory management, search, and metadata retrieval via SSE transport.
    668,809
    17
    MIT

Latest Blog Posts

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