Model Context Protocol Server
Model Context Protocol (MCP) Server
Installation
npx model-context-protocol-serverAsk AI about Model Context Protocol Server
Powered by Claude Β· Grounded in docs
I know everything about Model Context Protocol Server. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
MCP (MODEL CONTEXT PROTOCOL) SERVERS
BUILT WITH NODE.JS & TYPESCRIPT, POWERED BY KV & MONGODB
Β Β Β
Β Β
DEVELOPED & DEPLOYED USING CURSOR β’ CLOUDFLARE β’ TESTED WITH CLAUDE AI
Β Β Β Β
Β Β Β Β
This repository is structured as a monorepo containing three standalone MCP (Model Context Protocol) server implementations mcp-basic, mcp-cloudflare, and mcp-mongo each built for different execution environments and use-cases, These servers can integrate with AI models (e.g., Claude AI) and can be tested using commands and prompts.
π Table of Contents
- π Monorepo Overview
- π Repository Structure
- π Project Directory Layout
- π 1) MCP Basic Server: Features & Installation
- π 2) MCP Cloudflare Worker: Features & Installation
- π¦ 3) MCP Mongo Server: Features & Installation
- π€ Created By
- π License
π Monorepo Overview
| Project | Backend | Features | Use Cases |
|---|---|---|---|
mcp-basic | Node.js, TypeScript, STDIO | Tools, Resources, Prompts | Local execution, CLI usage, MCP Inspector integration, Tested with Claude AI |
mcp-cloudflare | Node.js, TypeScript, Cloudflare KV | Task/Todo CRUD tools, KV storage | Cloudflare Worker deployment, Remote execution via public endpoint, MCP Inspector, Tested with Claude AI |
mcp-mongo | Node.js, TypeScript, MongoDB, STDIO | Task/Todo CRUD tools with persistence | Local execution, CLI usage, Persistent data handling, MCP Inspector, Tested with Claude AI |
π Repository Structure
The repository is organized using the following structure:
model-context-protocol-server/
βββ mcp-basic/ # Simple MCP server with Tools, Prompts, Resources
βββ mcp-cloudflare/ # Cloudflare Worker MCP server with KV storage
βββ mcp-mongo/ # MCP server with MongoDB persistent storage
βββ LICENSE # MIT License
βββ README.md # (You are reading this file)
π Project Directory Layout
The following directory structure is used in this monorepo:
model-context-protocol-server/
β
βββ mcp-basic/ # model-context-protocol-basic (Basic MCP server implementation)
β βββ build/
β βββ node_modules/
β βββ src/
β β βββ prompts/
β β β βββ explainSql.ts
β β βββ resources/
β β β βββ productDetails.ts
β β βββ seed/
β β β βββ product.txt # Example seed input file
β β βββ tools/
β β β βββ addNumbers.ts
β β β βββ divideNumbers.ts
β β β βββ githubRepos.ts
β β β βββ multiplyNumbers.ts
β β β βββ subtractNumbers.ts
β β βββ index.ts
β βββ .gitignore
β βββ package.json # Project dependencies & scripts
β βββ tsconfig.json
β
βββ mcp-cloudflare/ # model-context-protocol-cloudflare (MCP implementation running on Cloudflare Workers)
β βββ node_modules/
β βββ src/
β β βββ models/
β β β βββ schema.ts
β β β βββ task.model.ts
β β β βββ todo.model.ts
β β βββ services/
β β β βββ kv.service.ts
β β β βββ task.service.ts
β β β βββ todo.service.ts
β β βββ tools/
β β β βββ task.tools.ts
β β β βββ todo.tools.ts
β β βββ utils/
β β β βββ error.ts
β β β βββ id.ts
β β β βββ time.ts
β β βββ index.ts
β βββ test/
β βββ .editorconfig
β βββ .gitignore
β βββ .prettierrc
β βββ package.json # Project dependencies & scripts
β βββ tsconfig.json
β βββ vitest.config.mts
β βββ worker-configuration.d.ts
β βββ wrangler.jsonc # Worker deployment configuration
β
βββ mcp-mongo/ # model-context-protocol-mongo (MCP server backed by MongoDB storage)
β βββ build/
β βββ node_modules/
β βββ src/
β β βββ db/
β β β βββ mongo.ts
β β βββ models/
β β β βββ schema.ts
β β β βββ task.model.ts
β β β βββ todo.model.ts
β β βββ services/
β β β βββ task.service.ts
β β β βββ todo.service.ts
β β βββ tools/
β β β βββ task.tools.ts
β β β βββ todo.tools.ts
β β βββ utils/
β β β βββ error.ts
β β β βββ time.ts
β β βββ index.ts
β βββ .gitignore
β βββ package.json # Project dependencies & scripts
β βββ tsconfig.json
β
βββ LICENSE # MIT License
βββ README.md # Project Documentation
π 1) MCP Basic Server: Features & Installation
π₯ Features
The following features are included in the MCP Basic server:
1. π§ Tools Included
| Name | Tool Function | Description |
|---|---|---|
add-numbers | addNumbers | Returns the sum of two numeric values |
subtract-numbers | subtractNumbers | Calculates the difference between two values |
multiply-numbers | multiplyNumbers | Multiplies two numeric values |
divide-numbers | divideNumbers | Divides one numeric value by another |
get-github-repos | githubRepos | Retrieves public repos from a provided GitHub username |
2. π Resources Available
| Name | Resource Handler | URI | File Source | Description |
|---|---|---|---|---|
product-details | Product Details | products://all | /src/seed/product.txt | Provides product data (seed file) |
3. π‘ Prompts Provided
| Name | Prompt Description | Prompt Example |
|---|---|---|
explain-sql-query | Generates a beginner-friendly explanation of any provided SQL query using the LLM. | Explain this SQL query in simple terms: ${sql} (be beginner-friendly). |
β Installation & Local Setup
Follow the steps below to run the MCP Basic server locally:
1. β Clone the repository:
git clone https://github.com/PAIshanMadusha/model-context-protocol-server.git
2. β Navigate to the Basic MCP server:
cd model-context-protocol-server/mcp-basic
3. β Install dependencies:
npm install
4. β Build the application:
npm run build
π§ͺ Run & Test
Below are multiple ways to test this MCP server using Inspector, Cursor, and Claude.
5. π Test using MCP Inspector (recommended):
npx @modelcontextprotocol/inspector
* After launching: Open the Inspector UI (auto-opens in browser), Click Add MCP Server & Use the following configuration:
Command:
nodeArguments:build/index.js
* Then click Connect to start testing tools.
6. π Test using Cursor IDE:
* Open Cursor: Settings β Tools β MCP and add:
"mcpServers": {
"model-context-protocol-basic": {
"command": "node",
"args": ["C:/path/to/model-context-protocol-server/mcp-basic/build/index.js"] // replace with your actual path
}
}
* Now you can use the tools directly inside Cursor's AI chats.
7. π Test with Claude AI (Desktop):
* Open Claude: **Settings β Developers β Edit config, Add:
"mcpServers": {
"model-context-protocol-basic": {
"command": "node",
"args": ["C:/path/to/model-context-protocol-server/mcp-basic/build/index.js"] // replace with your actual path
}
}
* Restart Claude & Start chatting and access the MCP Tools panel.
π 2) MCP Cloudflare Worker: Features & Installation
π₯ Features
This MCP server implementation runs entirely on Cloudflare Workers, offering task & todo management through HTTP-based MCP transport.
1. π§ Supported Tools: Task Management
| Tool Name | Function | Description |
|---|---|---|
create-task | Create Task | Creates a new task with title + details and stores it in KV backend. |
list-tasks | List Tasks | Retrieves the full list of stored tasks with metadata and timestamps. |
get-task-by-id | Retrieve Task | Fetches details of a specific task using its unique ID. |
update-task-by-id | Update Task | Updates task fields such as name, status, or description. |
delete-task-by-id | Delete Task | Permanently removes a task from storage using its ID. |
2. π§ Supported Tools: Todo Management
| Tool Name | Function | Description |
|---|---|---|
create-todo | Add Todo | Creates a new todo item and associates it with a task (parent task required). |
list-todos | List Todos | Retrieves all todo items under a specific task, grouped by task ID. |
get-todo-by-id | Retrieve Todo | Fetches detailed information for a todo item using its ID. |
update-todo-by-id | Update Todo | Updates todo fields such as text, checklist status, or completion progress. |
delete-todo-by-id | Delete Todo | Deletes a specific todo item from its linked task. |
3. π API Endpoints
* π Example Deployment: (Replace with your own deployment URL)
https://mcp-cloudflare.paishanmadusha.workers.dev
| Route | Purpose |
|---|---|
/mcp | REST-based MCP transport |
/sse | Server-Sent-Events MCP streaming |
β Note: Cloudflare free-tier accounts do not allow creation of Worker KV storage, you can still test without storage using mcp-mongo (same tools, MongoDB backend).
β Installation & Local Setup
Follow the steps below to run and deploy the Cloudflare MCP server:
1. β Clone Repository:
git clone https://github.com/PAIshanMadusha/model-context-protocol-server.git
2. β Navigate to Cloudflare MCP Server:
cd model-context-protocol-server/mcp-cloudflare
3. β Install Dependencies:
npm install
4. β Add Worker KV Binding:
* Create a KV namespace in Cloudflare β Storage & Database β Workers KV and enter it in wrangler.toml:
"kv_namespaces": [
{
"binding": "MCP_CLOUDFLARE_STORE",
"id": "b98f377e26184191968cf4a2ad014df5", # replace with yours
"remote": true
}
]
5. β Deploy to Cloudflare:
wrangler deploy
π§ͺ Run & Test
Below are multiple ways to test this MCP server using Inspector, Cursor, and Claude.
6. π Test with MCP Inspector:
npx @modelcontextprotocol/inspector
* After launching: Open the Inspector UI (auto-opens in browser), Click Add MCP Server & Use the following configuration:
Command:
nodeArguments:https://mcp-cloudflare.paishanmadusha.workers.dev/mcp
* Then click Connect to start testing tools.
7. π Test using Cursor IDE:
* Open Cursor: Settings β Tools β MCP and add:
"mcpServers": {
"model-context-protocol-cloudflare": {
"command": "node",
"args": ["https://mcp-cloudflare.paishanmadusha.workers.dev/mcp"] // replace with your domain
}
}
* Now you can use the tools directly inside Cursor's AI chats.
8. π Test with Claude Desktop (Recommended):
* Open Claude: **Settings β Developers β Edit config, Add:
"mcpServers": {
"model-context-protocol-cloudflare": {
"command": "node",
"args": ["https://mcp-cloudflare.paishanmadusha.workers.dev/mcp"] // replace with your domain
}
}
* Restart Claude & Start chatting and access the MCP Tools panel.
π¦ 3) MCP Mongo Server: Features & Installation
π₯ Features
The following features are included in the MCP Mongo server:
1. π§ Supported Tools: Task Management
| Tool Name | Function | Description |
|---|---|---|
create-task | Create Task | Creates a new task with title + details and stores it in MongoDB backend. |
list-tasks | List Tasks | Retrieves the full list of stored tasks with metadata and timestamps. |
get-task-by-id | Retrieve Task | Fetches details of a specific task using its unique ID. |
update-task-by-id | Update Task | Updates task fields such as name, status, or description. |
delete-task-by-id | Delete Task | Permanently removes a task from storage using its ID. |
2. π§ Supported Tools: Todo Management
| Tool Name | Function | Description |
|---|---|---|
create-todo | Add Todo | Creates a new todo item and associates it with a task (parent task required). |
list-todos | List Todos | Retrieves all todo items under a specific task, grouped by task ID. |
get-todo-by-id | Retrieve Todo | Fetches detailed information for a todo item using its ID. |
update-todo-by-id | Update Todo | Updates todo fields such as text, checklist status, or completion progress. |
delete-todo-by-id | Delete Todo | Deletes a specific todo item from its linked task. |
β Installation & Local Setup
Follow the steps below to run the MCP Mongo server locally:
1. β Clone the repository:
git clone https://github.com/PAIshanMadusha/model-context-protocol-server.git
2. β Navigate to the Mongo MCP server:
cd model-context-protocol-server/mcp-mongo
3. β Install dependencies:
npm install
4. β Build the application:
npm run build
π§ͺ Run & Test
Below are multiple ways to test this MCP server using Inspector, Cursor, and Claude.
5. π Test using MCP Inspector
npx @modelcontextprotocol/inspector
* After launching: Open the Inspector UI (auto-opens in browser), Click Add MCP Server & Use the following configuration:
Command:
nodeArguments:build/index.js
* Then click Connect to start testing tools.
6. π Test using Cursor IDE
* Open Cursor: Settings β Tools β MCP and add:
"mcpServers": {
"model-context-protocol-mongo": {
"command": "node",
"args": ["C:/path/to/model-context-protocol-server/mcp-mongo/build/index.js"] // replace with your actual path
}
}
* Now you can use the tools directly inside Cursor's AI chats.
7. π Test with Claude Desktop (recommended)
* Open Claude: **Settings β Developers β Edit config, Add:
"mcpServers": {
"model-context-protocol-mongo": {
"command": "node",
"args": ["C:/path/to/model-context-protocol-server/mcp-mongo/build/index.js"] // replace with your actual path
}
}
* Restart Claude & Start chatting and access the MCP Tools panel.
π€ Created By
Ishan Madhusha
GitHub: PAIshanMadusha
Feel free to explore my work and reach out if you'd like to collaborate! π
π License
This project is licensed under the MIT License.
See the LICENSE file for more details.
