
一款模型上下文协议(MCP)服务器,利用上下文人工智能提供RAG(检索增强生成)功能。该服务器可与多种MCP客户端集成。
概览
一款模型上下文协议(MCP)服务器,提供基于上下文人工智能的RAG(检索增强生成)功能。该服务器可与多种MCP客户端集成。它提供灵活性,你可以自行决定服务器中提供哪些功能。在这份说明文件中,我们将展示与Cursor IDE和Claude Desktop的集成。 Contextual AI 现在在平台内提供了一个托管服务器,地址为:https://mcp.app.contextual.ai/mcp/连接服务器后,您可以使用平台 MCP 服务器提供的查询等工具。完整教程请查看 MCP 用户指南。 MCP服务器作为AI接口(Cursor IDE或Claude Desktop)与专用上下文AI代理之间的桥梁。它能够实现: 1. : 将您的领域特定问题直接指向专门的情境人工智能代理 2.: 在您的知识库中搜索全面信息 3.
概述(AI 翻译)
一款模型上下文协议(MCP)服务器,提供基于上下文人工智能的RAG(检索增强生成)功能。该服务器可与多种MCP客户端集成。它提供灵活性,你可以自行决定服务器中提供哪些功能。在这份说明文件中,我们将展示与Cursor IDE和Claude Desktop的集成。
Contextual AI 现已在平台内提供托管服务器,地址为:https://mcp.app.contextual.ai/mcp/ 连接服务器后,你可以使用平台MCP服务器提供的查询等工具。 想了解完整的攻略,可以查看MCP用户指南。
概述
MCP服务器作为AI接口(Cursor IDE或Claude Desktop)与专用上下文AI代理之间的桥梁。它能够实现:
- 查询处理:将您的领域特定问题直接指向专门的上下文AI代理
- 智能检索:在你的知识库中搜索全面信息
- 上下文感知反应:生成以下答案:
- 基于源文档
- 包含引用和出处
- 保持对话上下文
积分流程
先修条件
- Python 3。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Contextual MCP Server
A Model Context Protocol (MCP) server that provides RAG (Retrieval-Augmented Generation) capabilities using Contextual AI. This server integrates with a variety of MCP clients. It provides flexibility in you can decide what functionality to offer in the server. In this readme, we will show integration with the both Cursor IDE and Claude Desktop.
Contextual AI now offers a hosted server inside the platform available at: https://mcp.app.contextual.ai/mcp/
After you connect to the server, you can use the tools, such as query, provided by the platform MCP server.
For a complete walkthrough, check out the MCP user guide.
Overview
An MCP server acts as a bridge between AI interfaces (Cursor IDE or Claude Desktop) and a specialized Contextual AI agent. It enables:
- Query Processing: Direct your domain specific questions to a dedicated Contextual AI agent
- Intelligent Retrieval: Searches through comprehensive information in your knowledge base
- Context-Aware Responses: Generates answers that are:
- Grounded in source documentation
- Include citations and attributions
- Maintain conversation context
Integration Flow
Cursor/Claude Desktop → MCP Server → Contextual AI RAG Agent
↑ ↓ ↓
└──────────────────┴─────────────┴─────────────── Response with citations
Prerequisites
- Python 3.10 or higher
- Cursor IDE and/or Claude Desktop
- Contextual AI API key
- MCP-compatible environment
Installation
- Clone the repository:
git clone https://github.com/ContextualAI/contextual-mcp-server.git
cd contextual-mcp-server
- Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows, use `.venv\Scripts\activate`
- Install dependencies:
pip install -e .
Configuration
Configure MCP Server
The server requires modifications of settings or use. For example, the single_agent server should be customized with an appropriate docstring for your RAG Agent.
The docstring for your query tool is critical as it helps the MCP client understand when to route questions to your RAG agent. Make it specific to your knowledge domain. Here is an example:
A research tool focused on financial data on the largest US firms
or
A research tool focused on technical documents for Omaha semiconductors
The server also requires the following settings from your RAG Agent:
API_KEY: Your Contextual AI API keyAGENT_ID: Your Contextual AI agent ID
If you’d like to store these files in .env file you can specify them like so:
cat > .env << EOF
API_KEY=key...
AGENT_ID=...
EOF
The repo also contains more advance MPC servers for multi-agent systems or a document-agent.
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
cat > mcp.json << EOF
{
"mcpServers": {
"ContextualAI-TechDocs": {
"command": "$UV_PATH", # make sure this is set properly
"args": [
"--directory",
"\${workspaceFolder}", # Will be replaced with your project path
"run",
"multi-agent/server.py"
]
}
}
}
EOF