leonexin/mongodb-create-read
If you are the rightful owner of mongodb-create-read and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
This document provides a structured summary of the MCP server designed for MongoDB operations, focusing on creating and reading data.
mongodb create read - MCP Server
Generated from MCP Scaffolding on 2025-11-10T10:09:37.110946Z
Overview
Service-agnostic MCP server with modular scaffolding
Version: 1.0.0
Transport: streamable-http
Port: 8004
Protocol: Model Context Protocol
What is MCP?
Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to Large Language Models (LLMs). This server exposes tools and resources that can be used by MCP clients like Claude Desktop, IDEs, or custom applications.
Quick Start
This MCP server is designed to run in a Kubernetes cluster. Follow the deployment steps below to get started.
Environment Configuration
Before deploying, configure your environment variables:
-
Copy the example environment file:
cp .env.example .env -
Edit
.envand fill in your credentials and configuration values:# Example values to configure: JWT_SECRET=your-secret-key-here MONGODB_URI=mongodb://your-mongodb-host:27017 # ... see .env.example for all required values -
Important: Never commit your
.envfile to version control. It's already included in.gitignore.
Connect to MCP Clients
Once deployed, MCP clients can connect via streamable-http on port 8004.
Authentication
This server uses jwt authentication.
Configure your credentials in the .env file. The server expects JWT tokens in the Authorization header:
Authorization: Bearer <your-jwt-token>
Available Tools
This MCP server exposes the following tools:
Database
Mongodb
-
mongodb_create -
mongodb_read
Productivity
Knowledge_base
Monitoring
It_service_management
Version_control
Integrations
Using Tools
Tools are invoked through the MCP protocol by your client (e.g., Claude Desktop). Each tool can be called with parameters defined in src/templates/tools.json.
Server Configuration
Transport: streamable-http on 0.0.0.0:8004
Authentication: jwt (local)
This server was generated from a YAML configuration. To regenerate or modify the structure, update your mcpserver.yaml and run the MCP Scaffolding generator again.
Docker Deployment
Build the Image
docker build -t mongodb_create_read:1.0.0 .
Run Locally with Docker
docker run -d -p 8004:8004 \
--name mongodb_create_read \
mongodb_create_read:1.0.0
The server will be available on http://localhost:8004.
Kubernetes Deployment
Production-ready Kubernetes manifests are included in k8s/deployment.yaml.
Deploy to Kubernetes
# Build and push to your registry
docker build -t your-registry/mongodb_create_read:1.0.0 .
docker push your-registry/mongodb_create_read:1.0.0
# Update image in k8s/deployment.yaml, then deploy
kubectl apply -f k8s/deployment.yaml
# Check status
kubectl get deployment mongodb_create_read-deployment
kubectl get pods -l app=mongodb_create_read
kubectl logs -f -l app=mongodb_create_read
Expose the Service
# Port forwarding (for testing)
kubectl port-forward service/mongodb_create_read-service 8004:8004
In production, configure an Ingress or LoadBalancer to expose the MCP server.
Development & Customization
Implementing Your MCP Tools
The generated server includes placeholder implementations. To add your business logic:
src/persistence/datasource_tools.py - This is where you write your MCP tool implementations
- Implement the actual logic for each tool
- Connect to databases, APIs, or external services
- Add data processing and business rules
Other files you may need to customize:
src/persistence/connections.py- Configure database connections and API clientssrc/middleware/auth.py- Customize authentication logic and authorization rulessrc/core/server.py- Register new tools, add custom MCP resources or prompts
Monitoring & Health Checks
The server exposes standard endpoints for monitoring:
- Health:
http://0.0.0.0:8004/health - Metrics:
http://0.0.0.0:8004/metrics(if enabled)
Troubleshooting
Server Won't Start
- Verify port 8004 is not already in use
- Review logs for connection errors to external services
- Check Kubernetes pod status:
kubectl get pods -l app=mongodb_create_read
Tools Not Appearing in Client
- Ensure the server is running and accessible
- Verify the service is exposed correctly
- Check MCP protocol compatibility
Authentication Errors
- Check jwt configuration in Kubernetes secrets