MCP Server
by ProbonoBonobo
This project provides a proof-of-concept implementation of a Machine Conversation Protocol (MCP) server that allows an AI agent to query a vector database and retrieve relevant documents for Retrieval-Augmented Generation (RAG). It integrates FastAPI, FAISS, and LLMs for a complete RAG workflow.
Last updated: N/A
What is MCP Server?
The MCP Server is a FastAPI-based server that enables Retrieval-Augmented Generation (RAG) by querying a FAISS vector database. It's designed to extract, process, and index documents (specifically GitHub Move files) and then use an LLM to provide enhanced responses based on the retrieved information.
How to use MCP Server?
The server can be installed using pipx or manually. After installation, you can use command-line tools to download Move files from GitHub, index them into the FAISS database, and then query the database using natural language. The server can be started to expose an MCP API endpoint for programmatic access.
Key features of MCP Server
FastAPI server with MCP endpoints
FAISS vector database integration
Document chunking and embedding
GitHub Move file extraction and processing
LLM integration for complete RAG workflow
Simple client example
Sample documents
Use cases of MCP Server
Answering questions about Sui Move code
Building a knowledge base for smart contracts
Creating a chatbot that can answer questions about a specific topic
Improving the accuracy of LLM responses by providing context
Automated documentation retrieval and summarization
FAQ from MCP Server
What is RAG?
What is RAG?
Retrieval-Augmented Generation (RAG) is a technique that combines information retrieval with language generation to improve the accuracy and relevance of LLM responses.
What is FAISS?
What is FAISS?
FAISS is a library for efficient similarity search and clustering of dense vectors. It's used here to store and query document embeddings.
How do I configure my GitHub token?
How do I configure my GitHub token?
Set the GITHUB_TOKEN
environment variable in your .env
file or directly in your shell environment.
What document types are supported?
What document types are supported?
The server supports text files (.txt), Markdown files (.md), and Move files (.move).
How do I use the MCP API?
How do I use the MCP API?
The MCP API endpoint is available at /mcp/action
. You can send POST requests with a JSON payload specifying the action type and payload.