Token导航 LogoToken导航TokenDH.com
MCP Jina Supabase RAG logo
搜索检索stdio官方级别未说明来源级核验

MCP Jina Supabase RAG

MCP Server

一个轻量级的MCP服务器,用于爬取文档网站并将其索引到Supabase,支持检索增强生成(RAG)。

工具数

0

提示词数

0

GitHub Stars

1

资源数

0
PythonClaude搜索Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

croakingtoad

提供方

croakingtoad

最后核验

2026/5/17 20:21

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install -e .

详细介绍

MCP Jina Supabase RAG

一个精简、专注的MCP服务器,用于抓取文档网站并将其索引到RAG(检索增强生成)的Supabase。

特性

  • 智能URL发现:首先尝试sitemap.xml,回退到Crawl4AI递归发现
  • 混合内容提取:使用Jina AI进行快速内容提取,Crawl4AI作为后备
  • 多项目支持:为多个文档站点建立索引,以分隔Supabase项目
  • 高效分块:具有可配置大小和重叠的智能文本分块
  • 矢量嵌入:存储在Supabase pgvector中的OpenAI嵌入

建筑

┌─────────────────────────────────────────────────────────────┐
│                    MCP Server Tools                         │
├─────────────────────────────────────────────────────────────┤
│  1. crawl_and_index(url_pattern, project_name)             │
│  2. list_projects()                                         │
│  3. search_documents(query, project_name, limit)           │
└─────────────────────────────────────────────────────────────┘
                            │
                            ▼
┌─────────────────────────────────────────────────────────────┐
│                   Discovery Layer                           │
├─────────────────────────────────────────────────────────────┤
│  • Try sitemap.xml (fast)                                   │
│  • Try common doc patterns                                  │
│  • Crawl4AI recursive discovery (fallback)                  │
└─────────────────────────────────────────────────────────────┘
                            │
                            ▼
┌─────────────────────────────────────────────────────────────┐
│                  Extraction Layer                           │
├─────────────────────────────────────────────────────────────┤
│  • Jina AI Reader API (primary, fast)                       │
│  • Crawl4AI (fallback for complex pages)                    │
└─────────────────────────────────────────────────────────────┘
                            │
                            ▼
┌─────────────────────────────────────────────────────────────┐
│              Chunking & Embedding Layer                     │
├─────────────────────────────────────────────────────────────┤
│  • Smart text chunking                                      │
│  • OpenAI embeddings (text-embedding-3-small)               │
└─────────────────────────────────────────────────────────────┘
                            │
                            ▼
┌─────────────────────────────────────────────────────────────┐
│                   Supabase Storage                          │
├─────────────────────────────────────────────────────────────┤
│  • pgvector for similarity search                           │
│  • Project isolation via source column                      │
└─────────────────────────────────────────────────────────────┘

安装

先决条件

设置

  1. 克隆存储库:
git clone https://github.com/yourusername/mcp-jina-supabase-rag.git
cd mcp-jina-supabase-rag
  1. 安装依赖项:
# Using uv (recommended)
uv venv
source .venv/bin/activate  # or .venv\Scripts\activate on Windows
uv pip install -e .

# Or using pip
pip install -e .
  1. 设置Supabase数据库:
# Run the SQL in supabase_schema.sql in your Supabase SQL Editor
  1. 配置环境:
cp .env.example .env
# Edit .env with your credentials

用法

运行MCP服务器

# SSE transport (recommended for remote connections)
python src/main.py

# The server will start on http://localhost:8052/sse

配置MCP客户端

克劳德代码

claude mcp add --transport sse jina-supabase http://localhost:8052/sse

光标/克劳德桌面

{
  "mcpServers": {
    "jina-supabase": {
      "transport": "sse",
      "url": "http://localhost:8052/sse"
    }
  }
}

斜杠命令

创建 /home/marty/.claude/commands/jina.md:

---
allowed-tools: mcp__jina-supabase
argument-hint:  

description: Crawl documentation and index to Supabase RAG
---

# Index Documentation to Supabase

Use the jina-supabase MCP server to crawl and index documentation.

Arguments:
- $1: URL pattern (e.g., https://docs.example.com/*)
- $2: Project name for isolation

Example:
/jina https://docs.anthropic.com/claude/* anthropic-docs

工具

crawl_and_index

抓取文档网站并索引到Supabase。

参数:

  • url_pattern (string):要爬网的URL或模式
  • project_name (string):隔离的项目标识符
  • discovery_method (字符串,可选): auto, sitemap,或 crawl
  • extraction_method (字符串,可选): auto, jina,或 crawl4ai

例子:

await crawl_and_index(
    url_pattern="https://docs.supabase.com/docs/*",
    project_name="supabase-docs",
    discovery_method="auto",
    extraction_method="jina"
)

list_projects

列出所有索引项目。

退货: 带有文档计数的项目名称列表

search_documents

使用向量相似度搜索索引文档。

参数:

  • query (string):搜索查询
  • project_name (字符串,可选):按项目筛选
  • limit (int,可选):最大结果(默认值:5)

例子:

results = await search_documents(
    query="How do I set up authentication?",
    project_name="supabase-docs",
    limit=10
)

配置

.env.example 对于所有配置选项。

发现方法

  • auto:先尝试站点地图,然后回退到爬网
  • sitemap:仅使用sitemap.xml(快速,如果没有站点地图则失败)
  • crawl:仅使用Crawl4AI递归发现(缓慢、全面)

提取方法

  • auto:使用Jina进行批量提取(>10个URL),否则使用Crawl4AI
  • jina:使用Jina AI阅读器API(快速,需要API密钥)
  • crawl4ai:使用Crawl4AI浏览器自动化(速度慢,不需要API密钥)

发展

# Install dev dependencies
uv pip install -e ".[dev]"

# Run tests
pytest

# Format code
black src/

# Lint
ruff check src/

与mcp-crawl4ai-rag的区别

功能mcp-crawl4ai-ragmcp-jina suabase rag
聚焦带知识图的全功能RAG精益文档索引器
发现仅递归先使用Sitemap,爬行回退
提取仅限Crawl4AIJina初选,Crawl4AI回退
依赖项重型(Neo4j等)轻型(仅内核)
用例具有幻觉检测功能的高级RAG快速文档索引

许可证

麻省理工学院

贡献

欢迎投稿!请先打开一个问题来讨论更改。

目录标签

目录标签

PythonClaude搜索文档爬取本地部署Supabase索引RAG智能文本处理多项目支持

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

部署方式(deploymentType,部署类型)

remote-capable

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiononeremote-capable

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP