ningwenjie_mcp_server

ningwenjie_mcp_server

by ningwenjie
A backend service supporting file access, database connections, API integration, and vector database access, designed for integration with Qwen.

Multifunctional Computing Platform (MCP) Server for Qwen Integration

Overview

The Multifunctional Computing Platform (MCP) Server is a robust backend service designed to support a variety of functionalities including file access, database connections, API integrations, and vector database access. This project is specifically tailored for integration with large language models like Qwen, providing a complete Docker deployment configuration and Qwen invocation examples.

Project Structure

mcp_server/
├── src/                    # Source code directory
│   ├── __init__.py         # Initialization module
│   ├── config.py           # Configuration management
│   ├── server.py           # Server main class
│   └── modules/            # Functional modules
│       ├── __init__.py     # Module registration
│       ├── file_module.py  # File access module
│       ├── database_module.py # Database connection module
│       ├── api_module.py   # API integration module
│       └── vector_module.py # Vector database module
├── docker/                 # Docker configuration
│   ├── Dockerfile          # Docker image configuration
│   └── docker-compose.yml  # Docker Compose configuration
├── examples/               # Example code
│   ├── qwen_client.py      # Qwen client library
│   └── qwen_example.py     # Qwen usage example
├── docs/                   # Documentation
│   ├── user_guide.md       # User guide
│   ├── api_docs.md         # API documentation
│   └── qwen_examples.md    # Qwen example instructions
├── test_server.py          # Server test script
├── test_qwen_client.py     # Qwen client test script
├── main.py                 # Main entry file
└── requirements.txt        # Dependency list

Features

  • File Access: Upload, download, list, and delete files
  • Database Connection: MongoDB integration, supporting CRUD operations on documents
  • API Integration: Support for calling external API services
  • Vector Database: Support for vector storage and similarity search
  • Docker Deployment: Complete Docker configuration, supporting one-click deployment
  • Qwen Integration: Provides Qwen client and examples for invoking the MCP server

Quick Start

Installation

  1. Clone the project code:
git clone https://github.com/ningwenjie/mcp_server
cd mcp_server
  1. Start the service using Docker Compose:
docker-compose -f docker/docker-compose.yml up -d
  1. Verify that the service is running:
curl http://localhost:8000/health

Using the Qwen Client

from examples.qwen_client import QwenMCPClient

# Initialize the client
client = QwenMCPClient("http://localhost:8000")

# Upload a file
file_info = client.upload_file("example.txt")

# Store a vector
vector = [0.1, 0.2, 0.3] * 512  # 1536-dimensional vector
metadata = {"text": "This is an example text", "source": "Qwen"}
vector_info = client.store_vector("qwen_embeddings", vector, metadata)

# Search vectors
query_vector = [0.15, 0.25, 0.35] * 512
search_results = client.search_vector("qwen_embeddings", query_vector, top_k=3)

Documentation

For detailed documentation, please refer to:

Testing

Run the server tests:

python test_server.py

Run the Qwen client tests:

python test_qwen_client.py

Dependencies

  • Python 3.10+
  • FastAPI
  • Uvicorn
  • PyMongo
  • FAISS
  • Docker (for deployment)

For a detailed list of dependencies, please refer to requirements.txt.

License

MIT License

Features & Capabilities

Categories
mcp_server model_context_protocol python docker qwen fastapi mongodb api_integration vector_database

Implementation Details

Stats

0 Views
2 GitHub Stars

Repository Info

ningwenjie Organization

Similar MCP Servers

continuedev_continue by continuedev
25049
21423
9300