文档更新服务器

一个简单的MCP服务器,用于获取langchain、openai、lama-index等工具的最新文档。

  • by egeokt
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 egeokt/mcp-server

使用说明

mcp服务器

一个简单的MCP服务器,允许获取某些工具的最新文档,例如:

  • 语言链
  • openai
  • 拉马指数

系统要求

  • Python 3.10或更高版本
  • MCP SDK 1.2.0或更高版本
  • uv 包管理器

入门指南

安装uv包管理器

在MacOS/Linux上:

curl -LsSf https://astral.sh/uv/install.sh | sh

确保之后重新启动终端,以确保 uv 命令被接收。

项目设置

  1. 创建并初始化项目:
# Create a new directory for our project
uv init mcp-server
cd mcp-server

# Create virtual environment and activate it
uv venv
source .venv/bin/activate

# Install dependencies
uv add "mcp[cli]" httpx
  1. 创建服务器实现文件:
touch main.py

运行服务器

  1. 启动MCP服务器:
uv run main.py
  1. 服务器将启动并准备接受连接

连接到克劳德桌面

  1. 从官方网站安装Claude Desktop
  2. 配置Claude Desktop以使用您的MCP服务器:

编辑 ~/Library/Application Support/Claude/claude_desktop_config.json:

{
    "mcpServers": {
        "mcp-server": {
            "command": "uv",  # It's better to use the absolute path to the uv command
            "args": [
                "--directory",
                "/ABSOLUTE/PATH/TO/YOUR/mcp-server",
                "run",
                "main.py"
            ]
        }
    }
}
  1. 重新启动克劳德桌面

故障排除

如果您的服务器未被Claude Desktop接收:

  1. 检查配置文件路径和权限
  2. 验证配置中的绝对路径是否正确
  3. 确保紫外线正确安装且易于接近
  4. 检查Claude Desktop日志中是否有任何错误消息