thekrprince/crud-mcp-server
3.1
If you are the rightful owner of crud-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This is a Message Control Protocol (MCP) server that provides CRUD operations for notes using MongoDB.
MongoDB MCP Server
This is a Message Control Protocol (MCP) server that provides CRUD operations for notes using MongoDB.
Prerequisites
- Node.js or Bun installed
- MongoDB installed and running locally (or a MongoDB Atlas connection string)
Setup
- Clone this repository
- Install dependencies:
bun install
- Create a
.env
file in the root directory with your MongoDB configuration:MONGODB_URI=mongodb://localhost:27017 DB_NAME=notes_db COLLECTION_NAME=notes
Running the Server
Start the server with:
bun run index.ts
Available Operations
Create Note
Creates a new note in MongoDB.
{
"title": "My First Note",
"content": "This is the content of my note",
"tags": ["important", "todo"]
}
Read Note
Reads a note by its ID.
{
"id": "note_id_here"
}
Update Note
Updates an existing note.
{
"id": "note_id_here",
"updates": {
"title": "Updated Title",
"content": "Updated content",
"tags": ["updated", "tags"]
}
}
Delete Note
Deletes a note by its ID.
{
"id": "note_id_here"
}
Testing
You can test the server using the provided test client:
bun run test-client.ts
The test client will:
- Create a new note
- Read back the created note
- Display the results in the console
Security Note
Make sure to keep your MongoDB connection string secure and never commit it to version control.