GitHubスター
0
ユーザー評価
未評価
フォーク
1
イシュー
0
閲覧数
0
お気に入り
0
README
MongoDB Agent LangGraph MCP
This project is a fork of Gaurab MCP project
This project provides a REPL to interact with a MongoDB instance using natural language, powered by LangChain.js MCP Adapter, LangGraph agent and OpenAI.
Features
- Ask open-ended questions about your MongoDB instance
- Uses a suite of MongoDB tools (find, aggregate, insert, update, etc.)
Prerequisites
- Node.js (v18+ recommended)
- npm
- Access to an OpenAI resource (API key, deployment, etc.)
- Access to a running MongoDB instance
Environment Variables
Ensure you have the following environment variables set:
export OPENAI_API_KEY=
export OPENAI_MODEL_NAME=gpt-3.5-turbo
export TEMPERATURE=0
export MONGO_CONNECTION_STRING=
Installation
- Clone the repository:
git clone git@github.com:josmanperez/mongodb-agent-langgraph-mcp.git cd mongodb-agent-langgraph-mcp - Install dependencies:
npm install
Usage
- Ensure your MongoDB instance is running and accessible.
- For MongoDB MCP, the default connection string is set to
mongodb://localhost:27017/?directConnection=trueinclient.js. Change it if needed.
- For MongoDB MCP, the default connection string is set to
- Start the REPL:
node client.js - Interact with the agent:
- Type natural language questions or commands, e.g.:
list all my databasescount documents in collection users in database mydbinsert a document into collection test in database mydb
- Press
Ctrl+Cto exit.
- Type natural language questions or commands, e.g.:
Customization
- To change the MongoDB connection string, edit the
connectionStringinclient.js. - To use a different Azure OpenAI deployment/model, update the environment variables accordingly.
License
MIT
作者情報
42
フォロワー
49
リポジトリ
3
Gist
7
貢献数
トップ貢献者
スレッド