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.
- π 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
| 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 |
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)
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
The following features are included in the MCP Basic server:
| 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 |
| Name | Resource Handler | URI | File Source | Description |
|---|---|---|---|---|
product-details |
Product Details | products://all |
/src/seed/product.txt |
Provides product data (seed file) |
| 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). |
Follow the steps below to run the MCP Basic server locally:
git clone https://github.com/PAIshanMadusha/model-context-protocol-server.gitcd model-context-protocol-server/mcp-basicnpm installnpm run buildBelow are multiple ways to test this MCP server using Inspector, Cursor, and Claude.
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
"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
}
}This MCP server implementation runs entirely on Cloudflare Workers, offering task & todo management through HTTP-based MCP transport.
| 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. |
| 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. |
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).
Follow the steps below to run and deploy the Cloudflare MCP server:
git clone https://github.com/PAIshanMadusha/model-context-protocol-server.gitcd model-context-protocol-server/mcp-cloudflarenpm install* 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
}
]wrangler deployBelow are multiple ways to test this MCP server using Inspector, Cursor, and Claude.
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
"mcpServers": {
"model-context-protocol-cloudflare": {
"command": "node",
"args": ["https://mcp-cloudflare.paishanmadusha.workers.dev/mcp"] // replace with your domain
}
}"mcpServers": {
"model-context-protocol-cloudflare": {
"command": "node",
"args": ["https://mcp-cloudflare.paishanmadusha.workers.dev/mcp"] // replace with your domain
}
}The following features are included in the MCP Mongo server:
| 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. |
| 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. |
Follow the steps below to run the MCP Mongo server locally:
git clone https://github.com/PAIshanMadusha/model-context-protocol-server.gitcd model-context-protocol-server/mcp-mongonpm installnpm run buildBelow are multiple ways to test this MCP server using Inspector, Cursor, and Claude.
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
"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
}
}"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
}
}Ishan Madhusha
GitHub: PAIshanMadusha
Feel free to explore my work and reach out if you'd like to collaborate! π
This project is licensed under the MIT License.
See the LICENSE file for more details.



