AI Autonomous Data Manager MCP について
AIエージェント向けのデータベース管理MCPサーバーです。動的なコレクションの作成やCRUD操作に対応し、会話をまたいでデータを保持します。STDIOとSSEに対応し、コレクション閲覧画面も備えています。
主な機能
- 01スキーマ検証付きコレクション作成
- 02コレクションデータのCRUD操作
- 03セッションをまたぐデータ保持
- 04STDIOとSSEに対応
- 05コレクション閲覧用Web画面
活用シーン
- 01会話中のナレッジベース構築と維持
- 02プロジェクトやタスクの自律的な追跡
- 03学習内容の整理とクイズ作成
- 04後の会話で使う情報の保存
MCP 対応
MCPクライアントに、コレクション管理ツールとサーバー説明・コレクションメタデータのリソースを公開します。STDIOまたはSSEで接続できます。
設定
ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。
このサーバーのパッケージやリモートエンドポイントはまだ取得できていません。プロジェクトの README の手順に従ってください。
ツール
ローカルサーバーのツールはマシン上で起動して初めて取得できます。メンテナーはまだツール一覧を提供していません。
詳細
AI Autonomous Data Manager MCP
概要
AI Autonomous Data Manager は、Cursor、Cline などの AI 対応エディターで動作する AI エージェントが、動的に構造化されたデータコレクションを自律的に管理できるように設計された、専用のデータ管理システムです。AI アシスタントは、会話をまたいで永続的なメモリーを維持し、情報を整理し、人の介入なしにデータを管理できます。
このサーバーは、MCP サーバーについて学ぶための練習として作成されました。どの程度役立つかは、まだ分かりません。MIT ライセンスのもと、現状のまま提供されています。
主な機能:
- AI によるコレクションの作成と、自動スキーマ検証
- AI エージェントによる自律的な CRUD 操作
- チャットセッションをまたいで保持される永続的なデータ保存
- STDIO モードと SSE(Server-Sent Events)モードの両方をサポート
このシステムにより、AI エージェントは次のようなことができます:
- 会話中にナレッジベースを構築、維持する
- プロジェクトやタスクを自律的に追跡する
- 学習コンテンツを整理し、クイズを作成する
- 重要な情報を将来参照できるように保存する
コレクションの表示と監視
AI エージェントはプログラムを通じてコレクションを操作しますが、人間は次の方法でデータを監視、確認できます:
- SSE モードの実行時に、組み込みのウェブインターフェースを使用する(http://localhost:3001)
- MCP Inspector ツールを使用する(https://modelcontextprotocol.io/docs/tools/inspector)
- MCP サーバーの API エンドポイントをプログラムから使用する
コレクションを PDF にエクスポートするには:
- SSE モードの実行時に、ウェブインターフェースにアクセスする
- 対象のコレクションに移動し、PDF アイコンをクリックする
コレクションビューアーのスクリーンショット
はじめに
-
Node と NPM がインストールされていることを確認してください
- 開発には Node バージョン 22.14.0 を使用しましたが、ほかのバージョンでも動作すると思われます
-
npm installを実行して依存関係をインストールします
STDIO モードで実行する
-
run-example.shをrun.shにコピーし、正しいパス(リポジトリのディレクトリ)を設定します -
.env-exampleを.envにコピーし、必要に応じて変更します(そのままでも動作するはずです) -
docker-compose upで MongoDB を起動するか、独自の Mongo インスタンスを使用します- 独自のインスタンスを使用する場合は、
run.shファイル内のエクスポートされたMONGO_*環境変数とRUN_MODE環境変数を適宜変更してください
- 独自のインスタンスを使用する場合は、
-
エディター/ツールで MCP サーバーを使用するように設定します
Cursor エディターの例(
mpc.json):{ "mcpServers": { "data_service": { // Same repository path as mentioned above "command": "/<path>/run.sh", "args": [] } } }
Run in SSE mode
Note: Running in SSE mode seems sketchy at times. While it works fine for the MCP Inspector tool. The server has sometimes crashed when Cursor or Cline was the client. So some improvements should be made to make SSE mode a bit sturdier.
-
Start MongoDB using
docker-compose upor use your own Mongo instance- If using your own instance, remember to change exported
MONGO_*andRUN_MODEenvironment variables in the.envfile accordingly
- If using your own instance, remember to change exported
-
Start the server:
npm start -
Configure your editor/tool to use the MCP server
Cursor editor example (
mpc.json):{ "mcpServers": { "data_service": { "url": "http://localhost:3001/sse", } } }
Start the app using scripts
NPM Scripts
-
start- Starts the back-end directly from sourcecs using TSX.
- Serves front-end from
dist/public/ - No hot-reloading is enabled
- Front- and back-end are both available at port 3001
-
dev:back- Starts the back-end on port 3001
- Hot-reloading is enabled
-
dev:front- Starts the front-end on port 5173 (default Vite port)
- Hot-reloading is enabled
-
dev- Runs
dev:backanddev:frontconcurrently - Front- and back-end are served from ports 5173 and 3001 respectively
- Hot-reloading is enabled for both
- Runs
-
start:prod- Run this script when providing the MCP server in SSE mode to an LLM
- Builds the app
- Runs the app from
dist/, making available on port 3001 - No hot-reloading (obviously)
Shell script
run.sh- You are not supposed to run this shell script. Instead you will provide it for the LLM to run.
- Sets environment variables (NPM scripts above uses
dotenv) - Runs the app directly from
dist/in STDIO mode - Note that it will not compile the app for you, so make sure to do that beforehand
Available resources
-
data://server-descriptionServer Description: Description of the data service and its use cases.
-
data://collectionsMetadata about available collections
Available tools
Note: This section will not explain each tool in detail. Fot that please check
src/back-end/mcp/tools/_tools-schema.yml where you can see the descriptions provided for the LLM.
-
add_collection_type
Create a new collection type in the database
-
add_batch_to_collection
Add one or more entries to a collection
-
get_from_collection
Perform a query to retrieve entries from a collection
-
delete_from_collection
Delete a collection entry
-
collection_summary
Get a summary of a collection (returns all entries but only includes the
_idandsummaryfields) -
get_resource_data
Provides the same information as the
data://server-descriptionanddata://collectionsresources. The reason for incuding it, is that not all MCP clients support resources.
コメント
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。