Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@one-mcpSearch for any tools related to financial data or stock prices"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
๐ง one-mcp
๐ Overview
one-mcp is a lightweight MCP (Model Context Protocol) server built using FastAPI that enables intelligent tool management and semantic search for APIs.
It allows you to upload, manage, and query API tools using natural language โ powered by modern embedding models via sentence-transformers.
The server supports multiple transport modes (stdio, HTTP, or both) and provides both a REST API and MCP tool interface for maximum flexibility.
โจ Features
๐ Semantic Search: Find relevant API tools based on descriptive queries using sentence-transformers embeddings.
๐ค Upload Tools: Add new API tools via JSON body or file upload.
๐๏ธ Delete Tools: Remove specific tools by name (supports batch deletion).
๐งพ Tool Statistics: Get insights on stored tools including count, model, and storage path.
๐งน Tool Management: Clear, inspect, or modify your tool store easily.
โก FastAPI Backend: High-performance, async-ready backend server.
๐ค MCP Compatibility: Dual interface - REST API and MCP tools for seamless integration.
๐ Dual Transport: Support for stdio and HTTP transports simultaneously.
๐พ Persistent Storage: Tools and embeddings saved to disk with automatic loading.
๐ Structured Logging: Comprehensive logging with rotating file handlers.
๐งฉ Project Structure
โ๏ธ Installation
1. Clone the Repository
2. Set Up Virtual Environment
3. Install Dependencies
Dependencies include:
๐ง Running the Server
Note: The first time you run the server, it will download the
all-MiniLM-L6-v2model from sentence-transformers. This may take a few seconds depending on your internet connection.
Start with Dual Transport (stdio + HTTP)
This enables both MCP stdio communication and HTTP REST API access.
HTTP-only Mode
Stdio-only Mode (for MCP clients)
Using Uvicorn Directly
Configuration Options
--transport: Transport mode (stdio, http, or stdio,http) - default: stdio--port: HTTP port number - default: 8000--host: Host to bind to - default: 0.0.0.0--storage_path: Path to store tool embeddings - default: tool_embeddings.json
By default, the server starts at:
๐ http://localhost:8003 (when HTTP transport is enabled)
The server automatically:
Creates a
logs/directory for application logsLoads existing tools from
tool_embeddings.jsonon startupSaves tools to disk after any modification
๐งช Testing the API
The server provides two interfaces:
REST API: Available at
/api/*endpoints (see CURLS.md for examples)MCP Tools: Available via MCP protocol (see MCP_TOOLS.md for documentation)
REST API Endpoints
All endpoints return structured JSON responses with appropriate status codes.
Check Server Status
Upload Tools via JSON
Upload Tools via File
Search for Similar Tools
Get Statistics
Delete Specific Tools
Clear All Tools
MCP Access
The MCP endpoint is mounted at /mcp for HTTP streaming mode:
For full MCP tool documentation, see MCP_TOOLS.md.
For more comprehensive testing examples, see CURLS.md.
๐งฐ Example MCP Configuration
To integrate with an MCP client (like Claude Desktop):
For dual transport mode (stdio for MCP + HTTP for REST API):
๐๏ธ Architecture
Components
server.py: Entry point that initializes the app and starts the MCP server
mcp_server.py: Handles multi-transport server orchestration (stdio/HTTP/dual)
api.py: FastAPI application factory and REST endpoint definitions
mcp_tools.py: MCP tool decorators and function implementations
tools_store.py: Singleton store for tool embeddings with search capability
models.py: Pydantic models for type safety and validation
config.py: Configuration management and CLI argument parsing
logging_setup.py: Centralized logging with rotating file handlers
How It Works
Tool Storage: Tools are stored with their embeddings using
sentence-transformersSemantic Search: Query embeddings are compared using cosine similarity
Persistence: Tools automatically saved to
tool_embeddings.jsonDual Interface: Same functionality available via REST API and MCP tools
Multi-Transport: Server can run stdio (for MCP clients) and HTTP simultaneously
Dev
Create zip:
zip -r one-mcp.zip . -x "*.git/*" -x ".env" -x ".DS_Store" -x ".dockerignore" -x ".gitignore"
๐งโ๐ป Contributing
Contributions are welcome! To contribute:
Fork the repository
Create a new feature branch (
git checkout -b feature/my-feature)Commit your changes (
git commit -m "Add my feature")Push to your fork (
git push origin feature/my-feature)Submit a Pull Request
Before submitting, ensure:
Code passes linting and basic tests.
Youโve updated documentation if needed.
๐ License
This project is licensed under the MIT License โ see the LICENSE file for details.
๐ฌ Support
If you encounter any issues or have feature requests:
Open an issue on GitHub
Or contact @freakynit directly.