
A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

An example MCP server offering RAG-backed tools for adding, listing and searching documents in a knowledge base, plus simple tools, a sample resource and a greeting prompt template.
MCP demo server with RAG knowledge base tools is cataloged as an MCP server attributed to thinklytics. An example MCP server offering RAG-backed tools for adding, listing and searching documents in a knowledge base, plus simple tools, a sample resource and a greeting prompt template. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for MCP demo server with RAG knowledge base tools are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
The RAG implementation supports a fallback to in-memory storage.
It supports both SSE (HTTP) and stdio communication modes.
README.md · 2a87ee240784 · 采集于 2026-11-13 11:23:38 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
This demonstration project shows how to implement a Model Context Protocol (MCP) server with Retrieval-Augmented Generation (RAG) capabilities. The demo allows AI models to interact with a knowledge base, search for information, and add new documents.
git clone <repository-url>
cd mcp-demo
python -m venv mcp-env
source mcp-env/bin/activate # On Windows: mcp-env\Scripts\activate
pip install -r requirements.txt
mcp-demo/
├── server.py # Main MCP server implementation
├── client_example.py # Example client to interact with the server
├── requirements.txt # Project dependencies
├── sample_data.txt # Sample data available as a resource
├── tools/
│ ├── __init__.py # Package initialization
│ └── rag_tools.py # RAG tools implementation
└── README.md # This readme file
You can run the MCP server in two different modes:
This mode allows the server to accept connections over HTTP using Server-Sent Events (SSE):
python server.py --sse
By default, the server will listen on 0.0.0.0:8000. You can customize the host and port:
python server.py --sse --host 127.0.0.1 --port 9000
This mode allows the server to communicate through standard input/output:
python server.py --stdio
After the server is up and running, open a new terminal window (keeping the server running in the first one):
# Make sure your virtual environment is activated
source mcp-env/bin/activate # On Windows: mcp-env\Scripts\activate
# Run the client with SSE mode
python client_example.py --sse http://localhost:8000
The client will automatically append "/sse" to the URL if it's not already present.
# Make sure your virtual environment is activated
source mcp-env/bin/activate # On Windows: mcp-env\Scripts\activate
# Run the client with stdio mode
python client_example.py --stdio --command python --args "server.py --stdio"
You can customize the command and arguments as needed.
The client example demonstrates several key operations:
The following tools are available in this demo:
echo: A simple tool that echoes back the provided messageadd: A tool that adds two numbers togetheradd_document: Adds a document to the knowledge baserag_search: Searches the knowledge base for information related to a querylist_documents: Lists all documents in the knowledge basesample://data: Provides access to the sample data in sample_data.txtgreeting: A simple greeting prompt templateTo add new tools, modify the server.py file:
@mcp.tool()
def your_tool_name(param1: type, param2: type) -> return_type:
"""Tool description"""
# Tool implementation
return result
To add new resources, modify the server.py file:
@mcp.resource("resource://pattern")
def your_resource_function() -> str:
"""Resource description"""
# Resource implementation
return "Resource content"
To add new prompt templates, modify the server.py file:
@mcp.prompt()
def your_prompt_name(param1: str, param2: str) -> str:
"""Prompt description"""
return f"""
Your prompt template text with {param1} and {param2} parameters.
"""
If you get a "Connection refused" error when running the client:
python client_example.py --sse http://localhost:8000The MCP server exposes an SSE (Server-Sent Events) endpoint at /sse. When connecting with the client:
http://localhost:8000/sse/sse if it's missing from your specified URLIf you encounter issues, you can enable debug mode for more verbose output:
python client_example.py --sse http://localhost:8000 --debug
Import errors with client connection
If you see import errors when running the client example, make sure you have installed all the required dependencies:
pip install mcp-sdk
Package not found or version mismatch
If you're experiencing import errors or version compatibility issues, try installing a specific version of the MCP package:
pip install mcp-sdk>=1.0.0
This project is provided as an example implementation and is available under the MIT License.
Install the required dependencies:
pip install -r requirements.txt
Create a .env file:
cp .env.example .env
Edit the .env file and add your OpenAI API key:
OPENAI_API_KEY=your_api_key_here
You can also configure other options in the .env file:
MCP_SERVER_URL: The URL of the MCP server (default: http://localhost:3000)DEBUG: Enable debug mode (default: false)Run the demo with:
python openai_example.py
You can override the settings in the .env file by using command-line arguments:
python openai_example.py --api-key YOUR_API_KEY --server-url http://your-server-url
The following environment variables can be set in the .env file:
OPENAI_API_KEY: Your OpenAI API key (required)MCP_SERVER_URL: The URL of the MCP server (optional)DEBUG: Enable debug mode (optional)--api-key: Your OpenAI API key (overrides the .env file)--server-url: The URL of the MCP server (overrides the .env file)--debug: Enable debug mode (overrides the .env file)This example demonstrates how to use the Model Control Protocol (MCP) with OpenAI's API.
Install the required dependencies:
pip install -r requirements.txt
Create a .env file based on the .env.example template:
cp .env.example .env
Edit the .env file and add your OpenAI API key:
OPENAI_API_KEY=your_api_key_here
Run the example script:
python openai_example.py
You can also specify options directly:
python openai_example.py --api-key your_api_key_here --server-url http://localhost:3000 --debug
.env fileOPENAI_API_KEY: Your OpenAI API key (required)MCP_SERVER_URL: URL of the MCP server (optional, defaults to http://localhost:3000)DEBUG: Enable debug logging (optional, defaults to false)Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for MCP demo server with RAG knowledge base tools from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/mcp-demo-thinklytics)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.