Quick-start Auto MCP

by teddynote-lab
Verified

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Used for storing and managing API keys and configuration variables needed for the various MCP functionalities

  • Utilizes OpenAI platform API keys for certain functionalities within the MCP server

  • Primary runtime environment for the MCP server with version 3.11+ requirement

快速启动自动 MCP:一体化 Claude 桌面和光标

English |韩语

介绍

快速启动自动 MCP是一种工具,可帮助您在 Claude Desktop 和 Cursor 中轻松快速地注册 Anthropic 的模型上下文协议 (MCP)。

主要优势:

  1. 快速设置:只需运行工具并复制/粘贴生成的 JSON 文件,即可将 MCP 功能添加到 Claude Desktop 和 Cursor。
  2. 提供各种工具:我们持续更新实用的 MCP 工具。点赞并关注我们,即可随时获取您专属的工具包。:)

目录

特征

  • RAG(检索增强生成) ——PDF 文档的关键字、语义和混合搜索功能
  • Dify 外部知识 API - 通过 Dify 的外部知识 API 实现文档搜索功能
  • Dify Workflow - 执行并检索 Dify Workflow 的结果
  • 网络搜索- 使用 Tavily API 进行实时网络搜索
  • 自动 JSON 生成- 自动生成 Claude Desktop 和 Cursor 所需的 MCP JSON 文件

项目结构

. ├── case1 # RAG example ├── case2 # Dify External Knowledge API example ├── case3 # Dify Workflow example ├── case4 # Web Search example ├── data # Example data files ├── docs # Documentation folder │ ├── case1.md # case1 description 🚨 Includes tips for optimized tool invocation │ ├── case2.md # case2 description │ ├── case3.md # case3 description │ ├── case4.md # case4 description │ └── installation.md # Installation guide ├── .env.example # .env example format ├── pyproject.toml # Project settings ├── requirements.txt # Required packages list └── uv.lock # uv.lock

要求

  • Python >= 3.11
  • Claude Desktop 或 Cursor(MCP 支持版本)
  • uv(推荐)或 pip

安装

1. 克隆存储库

git clone https://github.com/teddynote-lab/mcp.git cd mcp

2. 设置虚拟环境

使用 uv(推荐)

# macOS/Linux uv venv uv pip install -r requirements.txt
# Windows uv venv uv pip install -r requirements_windows.txt

使用 pip

python -m venv .venv # Windows .venv\Scripts\activate pip install -r requirements_windows.txt # macOS/Linux source .venv/bin/activate pip install -r requirements.txt

3.准备PDF文件

请在./data目录中准备 RAG 所需的 PDF 文件。

配置

为了执行每个案例,需要一个.env文件。请在根目录下的.env.example文件中指定必要的环境变量,并将其重命名为.env

针对每种情况配置所需环境变量的站点

用法

1.生成JSON文件

在每个案例目录中运行以下命令来生成必要的 JSON 文件:

# Activate virtual environment # Windows .venv\Scripts\activate # macOS/Linux source .venv/bin/activate # Navigate to example directory cd case1 # Generate JSON file python auto_mcp_json.py

2. 在 Claude Desktop/Cursor 中注册 MCP

  1. 启动 Claude Desktop 或 Cursor
  2. 打开 MCP 设置菜单
  3. 复制并粘贴生成的 JSON 内容
  4. 保存并restart

注意:当您运行 Claude Desktop 或 Cursor 时,MCP 服务器将自动随之运行。当您关闭软件时,MCP 服务器也将终止。

故障排除

常见问题及解决方案:

  • MCP 服务器连接失败:请检查服务是否正常运行,以及是否存在端口冲突。特别需要注意的是,在应用 case2 时,还必须运行dify_ek_server.py
  • API 密钥错误:验证环境变量是否设置正确。
  • 虚拟环境问题:确保 Python 版本为 3.11 或更高版本。

执照

麻省理工学院许可证

贡献

欢迎大家贡献代码!请通过注册问题或提交拉取请求来参与项目。:)

接触

如果您有疑问或需要帮助,请注册问题或联系: dev@brain-crew.com

作者

林韩泽

-
security - not tested
A
license - permissive license
-
quality - not tested

该工具可帮助在 Claude Desktop 和 Cursor 中轻松注册 Anthropic 的模型上下文协议 (MCP),提供 RAG 功能、Dify 集成和网络搜索功能。

  1. Introduction
    1. Table of Contents
      1. Features
        1. Project Structure
          1. Requirements
            1. Installation
              1. 1. Clone the repository
              2. 2. Set up virtual environment
              3. 3. Preparing the PDF File
            2. Configuration
              1. sites for configuring required environment variables for each case
            3. Usage
              1. 1. Generate JSON File
              2. 2. Register MCP in Claude Desktop/Cursor
            4. Troubleshooting
              1. License
                1. Contributing
                  1. Contact
                    1. Author
                      ID: 5a5e9xx526