mcp-server
0
The MCP Server is a FastAPI-based application designed for efficient WebSocket communication, file management, and tool execution. It serves static files and includes a comprehensive testing suite, making it a versatile server solution.
MCP Server
A FastAPI-based server providing WebSocket communication, file management, and tools endpoints.
๐ Features
- ๐ File Management API
- ๐ WebSocket Communication
- ๐ ๏ธ Tools Endpoint
- ๐ Static File Serving
- โ Comprehensive Test Suite
๐ ๏ธ Installation
- Clone the repository:
git clone https://github.com/khaosans/mcp-server.git
cd mcp-server
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: .\venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
๐โโ๏ธ Running the Server
Start the server with:
uvicorn server:app --reload --host 0.0.0.0 --port 8080
๐งช Running Tests
Run the test suite with:
python test_server.py
๐ก API Endpoints
HTTP Endpoints
GET /files?q=<query>
: Search files in the public directoryGET /files/{filename}
: Read a specific filePOST /tools
: Execute tools (currently supports summarization)GET /public/*
: Serve static files
WebSocket Endpoint
ws://localhost:8080/ws
: WebSocket endpoint for real-time communication
๐ License
MIT License