mcp_server
mcp_server
claude mcp add --transport stdio ningwenjie-mcp_server python main.py \ --env PORT="8000" \ --env API_KEY="your_api_key_here" \ --env VECTOR_DB="faiss" \ --env MONGODB_URI="mongodb://localhost:27017"
How to use
This MCP server provides a multi-feature backend that supports file operations, database access, API integration, and vector database interactions. It is designed to work with large language model integration workflows (such as Qwen) by offering a structured interface for uploading and managing files, connecting to MongoDB, calling external APIs, and storing/searching vectors. The server is designed to be deployed with Docker for easy one-click setup, and it includes a Python client and examples to demonstrate how to interact with it from a Qwen-based client. You can start the server, then use the included API endpoints or the Python client to upload files, persist and query vectors, and perform database operations.
How to install
Prerequisites:
- Docker and Docker Compose (for one-click deployment) or Python 3.10+ and pip
- Git
- Optional: MongoDB instance or accessible MongoDB URI
Installation steps (Docker-based):
-
Clone the repository: git clone https://github.com/ningwenjie/mcp_server cd mcp_server
-
Start the service with Docker Compose: docker-compose -f docker/docker-compose.yml up -d
-
Verify that the service is running: curl http://localhost:8000/health
Installation steps (Direct Python execution):
-
Create a Python virtual environment and install dependencies: python -m venv venv source venv/bin/activate pip install -r requirements.txt
-
Run the server directly: python main.py
-
Ensure configurations (e.g., MONGODB_URI) are set via environment variables or a config file before running.
Notes:
- Docker deployment is recommended for production to simplify dependencies and networking.
- If MongoDB or a vector store is not yet available, configure placeholders and update them once the services are accessible.
Additional notes
Tips and common issues:
- Ensure MongoDB URI (MONGODB_URI) is reachable from the MCP server container or environment where you run Python.
- When using Docker, expose port 8000 (or update the config) so health checks and clients can reach the API.
- The server supports file operations (upload, list, download, delete), vector storage and similarity search, API integrations, and MongoDB document operations.
- If you encounter API call failures, verify external API access permissions and required API keys (set in API_KEY or environment variables).
- For large vector dimensions, ensure the FAISS or chosen vector store backend is properly configured and has sufficient memory.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP