Self-Hosted Supabase MCP Server 标志

Self-Hosted Supabase MCP Server

社区
HenkDz

An MCP Server for your Self Hosted Supabase

发布者HenkDz
代码仓库selfhosted-supabase-mcp
语言TypeScript
复刻数
48
星标数
138
可用工具
0
传输类型stdio
分类
链接
  • 将工具接入 AI 工作流

    Self-Hosted Supabase MCP Server 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 138 个星标和 48 个复刻。

Self-Hosted Supabase MCP Server

License: MIT smithery badge

Overview

This project provides a Model Context Protocol (MCP) server designed specifically for interacting with self-hosted Supabase instances. It bridges the gap between MCP clients (like IDE extensions) and your local or privately hosted Supabase projects, enabling database introspection, management, and interaction directly from your development environment.

This server was built from scratch, drawing lessons from adapting the official Supabase cloud MCP server, to provide a minimal, focused implementation tailored for the self-hosted use case.

Purpose

The primary goal of this server is to enable developers using self-hosted Supabase installations to leverage MCP-based tools for tasks such as:

  • Querying database schemas and data.
  • Managing database migrations.
  • Inspecting database statistics and connections.
  • Managing authentication users.
  • Interacting with Supabase Storage.
  • Generating type definitions.

It avoids the complexities of the official cloud server related to multi-project management and cloud-specific APIs, offering a streamlined experience for single-project, self-hosted environments.

Features (Implemented Tools)

Tools are categorized by privilege level:

  • Regular tools are accessible by any authenticated Supabase JWT (authenticated or service_role role).
  • Privileged tools require a service_role JWT (HTTP mode) or direct database/service-key access (stdio mode).

Schema & Migrations

ToolDescriptionPrivilege
list_tablesLists tables in the database schemasRegular
list_extensionsLists installed PostgreSQL extensionsRegular
list_available_extensionsLists all available (installable) extensionsRegular
list_migrationsLists applied migrations from supabase_migrations.schema_migrationsRegular
apply_migrationApplies a SQL migration and records it in supabase_migrations.schema_migrationsPrivileged
list_table_columnsLists columns for a specific tableRegular
list_indexesLists indexes for a specific tableRegular
list_constraintsLists constraints for a specific tableRegular
list_foreign_keysLists foreign keys for a specific tableRegular
list_triggersLists triggers for a specific tableRegular
list_database_functionsLists user-defined database functionsRegular
get_function_definitionGets the source definition of a functionRegular
get_trigger_definitionGets the source definition of a triggerRegular

Database Operations & Stats

ToolDescriptionPrivilege
execute_sqlExecutes an arbitrary SQL queryPrivileged
explain_queryRuns EXPLAIN ANALYZE on a queryPrivileged
get_database_connectionsShows active connections (pg_stat_activity)Regular
get_database_statsRetrieves database statistics (pg_stat_*)Regular
get_index_statsShows index usage statisticsRegular
get_vector_index_statsShows pgvector index statisticsRegular

Security & RLS

ToolDescriptionPrivilege
list_rls_policiesLists Row-Level Security policies for a tableRegular
get_rls_statusShows RLS enabled/disabled status for tablesRegular
get_advisorsRetrieves security and performance advisory noticesRegular

Project Configuration

ToolDescriptionPrivilege
get_project_urlReturns the configured Supabase URLRegular
verify_jwt_secretChecks if the JWT secret is configuredRegular

Development & Extension Tools

ToolDescriptionPrivilege
generate_typescript_typesGenerates TypeScript types from the database schemaRegular
rebuild_hooksRestarts the pg_net worker (if used)Privileged
get_logsRetrieves recent log entries (analytics stack or CSV fallback)Regular

Auth User Management

ToolDescriptionPrivilege
list_auth_usersLists users from auth.usersRegular
get_auth_userRetrieves details for a specific userRegular
create_auth_userCreates a new user in auth.users (password bcrypt-hashed via pgcrypto)Privileged
update_auth_userUpdates user details (password bcrypt-hashed if changed)Privileged
delete_auth_userDeletes a user from auth.usersPrivileged

Storage

ToolDescriptionPrivilege
list_storage_bucketsLists all storage bucketsRegular
list_storage_objectsLists objects within a specific bucketRegular
get_storage_configRetrieves storage bucket configurationRegular
update_storage_configUpdates storage bucket settingsPrivileged

Realtime Inspection

ToolDescriptionPrivilege
list_realtime_publicationsLists PostgreSQL publications (e.g. supabase_realtime)Regular

Extension-Specific Tools

ToolDescriptionPrivilege
list_cron_jobsLists scheduled jobs (requires pg_cron extension)Regular
get_cron_job_historyShows recent execution history for a cron jobRegular
list_vector_indexesLists pgvector indexes (requires pgvector extension)Regular

Edge Functions

ToolDescriptionPrivilege
list_edge_functionsLists deployed Edge FunctionsRegular
get_edge_function_detailsGets details and metadata for an Edge FunctionRegular
list_edge_function_logsRetrieves recent logs for an Edge FunctionRegular

About supabase_migrations.schema_migrations

The list_migrations and apply_migration tools rely on the supabase_migrations.schema_migrations table. This table is created and managed by the Supabase CLI — it is not part of the MCP server itself.

How the table is created:

The table is automatically created when you initialise or run migrations using the Supabase CLI:

bash
supabase db push        # pushes local migrations to a remote database
supabase migration up   # applies pending local migration files

If you have never run the Supabase CLI against your database, the table will not exist and list_migrations will return an error. You can create it manually with:

sql
CREATE SCHEMA IF NOT EXISTS supabase_migrations;
CREATE TABLE IF NOT EXISTS supabase_migrations.schema_migrations (
    version text NOT NULL PRIMARY KEY,
    name    text NOT NULL DEFAULT '',
    inserted_at timestamptz NOT NULL DEFAULT now()
);

Schema difference vs. official Supabase:

The Supabase cloud platform tracks additional columns (e.g. statements, dirty). This MCP server uses the minimal schema (version + name + inserted_at) that is compatible with the Supabase CLI's local-development workflow. If your existing table has extra columns they are simply ignored.

Setup and Installation

Installing via Smithery

To install Self-Hosted Supabase MCP Server for Claude Desktop automatically via Smithery:

bash
npx -y @smithery/cli install @HenkDz/selfhosted-supabase-mcp --client claude

Prerequisites

  • Bun v1.1 or later (replaces Node.js/npm — used for runtime and builds)
  • Access to your self-hosted Supabase instance (URL, keys, and optionally a direct PostgreSQL connection string).

Steps

  1. Clone the repository:
    bash
    git clone <repository-url>
    cd selfhosted-supabase-mcp
  2. Install dependencies:
    bash
    bun install
  3. Build the project:
    bash
    bun run build
    This compiles the TypeScript source to JavaScript in the dist directory.

Configuration

The server requires configuration details for your Supabase instance. These can be provided via command-line arguments or environment variables. CLI arguments take precedence.

Required:

  • --url <url> or SUPABASE_URL=<url>: The main HTTP URL of your Supabase project (e.g., http://localhost:8000).
  • --anon-key <key> or SUPABASE_ANON_KEY=<key>: Your Supabase project's anonymous key.

Optional (but Recommended/Required for certain tools):

  • --service-key <key> or SUPABASE_SERVICE_ROLE_KEY=<key>: Your Supabase project's service role key. Required for privileged tools and for auto-creating the execute_sql helper function on startup.
  • --db-url <url> or DATABASE_URL=<url>: The direct PostgreSQL connection string for your Supabase database (e.g., postgresql://postgres:password@localhost:5432/postgres). Required for tools needing direct database access (apply_migration, Auth tools, Storage tools, pg_catalog queries).
  • --jwt-secret <secret> or SUPABASE_AUTH_JWT_SECRET=<secret>: Your Supabase project's JWT secret. Required when using --transport http and needed by the verify_jwt_secret tool.
  • --tools-config <path>: Path to a JSON file specifying which tools to enable (whitelist). If omitted, all tools are enabled. Format: {"enabledTools": ["tool_name_1", "tool_name_2"]}.

HTTP transport options (when using --transport http):

  • --port <number>: HTTP server port (default: 3000).
  • --host <string>: HTTP server host (default: 127.0.0.1).
  • --cors-origins <origins>: Comma-separated list of allowed CORS origins. Defaults to localhost only.
  • --rate-limit-window <ms>: Rate limit window in milliseconds (default: 60000).
  • --rate-limit-max <count>: Max requests per rate limit window (default: 100).
  • --request-timeout <ms>: Request timeout in milliseconds (default: 30000).

Important Notes:

  • execute_sql Helper Function: Many tools rely on a public.execute_sql function within your Supabase database for SQL execution via RPC. The server attempts to check for this function on startup. If it's missing and a service-key and db-url are provided, it will attempt to create the function automatically. If creation fails or keys aren't provided, tools relying solely on RPC may fail.
  • Direct Database Access: Tools interacting directly with privileged schemas (auth, storage) or system catalogs (pg_catalog) generally require DATABASE_URL to be configured.
  • Coolify / reverse-proxy deployments:
    • The DATABASE_URL must use the internal hostname reachable from wherever the MCP server process runs, not the public-facing domain.
    • An ECONNRESET error during startup means the DATABASE_URL cannot be reached from the server's network context.
    • The server will still start successfully and all tools that don't require a direct DB connection will continue to work normally.

Security

HTTP transport (recommended for remote access)

When running with --transport http, the server enforces:

  • JWT authentication on all /mcp endpoints using your SUPABASE_AUTH_JWT_SECRET.
  • Privilege-based access control (RBAC) — the role claim in the JWT determines which tools are accessible:
    • service_role: Full access (all tools including privileged ones).
    • authenticated: Regular tools only.
    • anon: No tool access.
  • Rate limiting — configurable request rate limit per IP address.
  • CORS — configurable allow-list of origins (defaults to localhost only).
  • Security headers — X-Content-Type-Options, X-Frame-Options, Strict-Transport-Security, etc.
  • Request timeouts — configurable timeout to prevent resource exhaustion.

Stdio transport (local development)

Stdio mode has no authentication — all tools (including privileged ones) are accessible. It is intended for trusted local clients only (e.g., an IDE extension running on your local machine). A warning is printed on startup when this mode is used.

Password handling for auth user tools

create_auth_user and update_auth_user accept a plain-text password from the MCP client, then immediately hash it with bcrypt (via PostgreSQL's pgcrypto extension: crypt($password, gen_salt('bf'))) before storing it in auth.users. The plain-text password is never stored. Passwords are passed as query parameters (not string-interpolated into SQL), preventing SQL injection.

Note: The password travels over the MCP transport in plain text between the MCP client and server. This is inherent to the MCP protocol interface and unavoidable at this layer. Use the HTTP transport with TLS termination (e.g., behind Kong/nginx) for network protection.

SQL execution security

All database operations in the MCP server use parameterized queries ($1, $2, ...) to prevent SQL injection. The execute_sql tool is an intentional exception — it executes arbitrary SQL by design (it is the tool's purpose). This tool is restricted to service_role privilege level to limit exposure.

Usage

Stdio mode (local MCP clients)

Run the server using Bun, providing the necessary configuration:

bash
# Using CLI arguments (stdio mode — default)
bun run dist/index.js --url http://localhost:8000 --anon-key <your-anon-key> \
  --db-url postgresql://postgres:password@localhost:5432/postgres \
  --service-key <your-service-key>

# Example with tool whitelisting via config file
bun run dist/index.js --url http://localhost:8000 --anon-key <your-anon-key> \
  --tools-config ./mcp-tools.json

# Or configure using environment variables and run:
# export SUPABASE_URL=http://localhost:8000
# export SUPABASE_ANON_KEY=<your-anon-key>
# export DATABASE_URL=postgresql://postgres:password@localhost:5432/postgres
# export SUPABASE_SERVICE_ROLE_KEY=<your-service-key>
bun run dist/index.js

HTTP mode (Docker / remote access)

bash
bun run dist/index.js \
  --transport http \
  --port 3100 \
  --host 0.0.0.0 \
  --url http://kong:8000 \
  --anon-key <your-anon-key> \
  --service-key <your-service-key> \
  --jwt-secret <your-jwt-secret> \
  --db-url postgresql://postgres:password@db:5432/postgres

HTTP mode requires --jwt-secret. All /mcp requests must include a valid Supabase JWT in the Authorization: Bearer <token> header.

The server communicates via stdio (default) or HTTP (Streamable HTTP Transport) and is designed to be invoked by an MCP client application (e.g., an IDE extension like Cursor). The client will connect to the server's stdio stream or HTTP endpoint to list and call the available tools.

Client Configuration Examples

Below are examples of how to configure popular MCP clients to use this self-hosted server.

Important:

  • Replace placeholders like <your-supabase-url>, <your-anon-key>, <your-db-url>, <path-to-dist/index.js> etc., with your actual values.
  • Ensure the path to the compiled server file (dist/index.js) is correct for your system.
  • Be cautious about storing sensitive keys directly in configuration files, especially if committed to version control. Consider using environment variables or more secure methods where supported by the client.

Cursor

  1. Create or open the file .cursor/mcp.json in your project root.

  2. Add the following configuration:

    json
    {
      "mcpServers": {
        "selfhosted-supabase": { 
          "command": "bun",
          "args": [
            "run",
            "<path-to-dist/index.js>", // e.g., "/home/user/selfhosted-supabase-mcp/dist/index.js"
            "--url",
            "<your-supabase-url>", // e.g., "http://localhost:8000"
            "--anon-key",
            "<your-anon-key>",
            // Optional - Add these if needed by the tools you use
            "--service-key",
            "<your-service-key>",
            "--db-url",
            "<your-db-url>", // e.g., "postgresql://postgres:password@host:port/postgres"
            "--jwt-secret",
            "<your-jwt-secret>",
            // Optional - Whitelist specific tools
            "--tools-config",
            "<path-to-your-mcp-tools.json>" // e.g., "./mcp-tools.json"
          ]
        }
      }
    }

Visual Studio Code (Copilot)

VS Code Copilot allows using environment variables populated via prompted inputs, which is more secure for keys.

  1. Create or open the file .vscode/mcp.json in your project root.

  2. Add the following configuration:

    json
    {
      "inputs": [
        { "type": "promptString", "id": "sh-supabase-url", "description": "Self-Hosted Supabase URL", "default": "http://localhost:8000" },
        { "type": "promptString", "id": "sh-supabase-anon-key", "description": "Self-Hosted Supabase Anon Key", "password": true },
        { "type": "promptString", "id": "sh-supabase-service-key", "description": "Self-Hosted Supabase Service Key (Optional)", "password": true, "required": false },
        { "type": "promptString", "id": "sh-supabase-db-url", "description": "Self-Hosted Supabase DB URL (Optional)", "password": true, "required": false },
        { "type": "promptString", "id": "sh-supabase-jwt-secret", "description": "Self-Hosted Supabase JWT Secret (Optional)", "password": true, "required": false },
        { "type": "promptString", "id": "sh-supabase-server-path", "description": "Path to self-hosted-supabase-mcp/dist/index.js" },
        { "type": "promptString", "id": "sh-supabase-tools-config", "description": "Path to tools config JSON (Optional, e.g., ./mcp-tools.json)", "required": false }
      ],
      "servers": {
        "selfhosted-supabase": {
          "command": "bun",
          "args": [
            "run",
            "${input:sh-supabase-server-path}",
            "--tools-config", "${input:sh-supabase-tools-config}"
           ],
          "env": {
            "SUPABASE_URL": "${input:sh-supabase-url}",
            "SUPABASE_ANON_KEY": "${input:sh-supabase-anon-key}",
            "SUPABASE_SERVICE_ROLE_KEY": "${input:sh-supabase-service-key}",
            "DATABASE_URL": "${input:sh-supabase-db-url}",
            "SUPABASE_AUTH_JWT_SECRET": "${input:sh-supabase-jwt-secret}"
          }
        }
      }
    }
  3. When you use Copilot Chat in Agent mode (@workspace), it should detect the server. You will be prompted to enter the details (URL, keys, path) when the server is first invoked.

Other Clients (Windsurf, Cline, Claude)

Adapt the configuration structure shown for Cursor or the official Supabase documentation, replacing the command and args with the bun run command and the arguments for this server, similar to the Cursor example:

json
{
  "mcpServers": {
    "selfhosted-supabase": { 
      "command": "bun",
      "args": [
        "run",
        "<path-to-dist/index.js>", 
        "--url", "<your-supabase-url>", 
        "--anon-key", "<your-anon-key>", 
        "--service-key", "<your-service-key>", 
        "--db-url", "<your-db-url>", 
        "--jwt-secret", "<your-jwt-secret>",
        "--tools-config", "<path-to-your-mcp-tools.json>"
      ]
    }
  }
}

Consult the specific documentation for each client on where to place the mcp.json or equivalent configuration file.

Docker Integration with Self-Hosted Supabase

This MCP server can be integrated directly into a self-hosted Supabase Docker Compose stack, making it available alongside other Supabase services via the Kong API gateway.

Architecture Overview

When integrated with Docker:

  • The MCP server runs in HTTP transport mode (not stdio)
  • It's exposed through Kong at /mcp/v1/*
  • JWT authentication is handled by the MCP server itself
  • The server has direct access to the database and all Supabase keys

Setup Steps

1. Add the MCP Server as a Git Submodule

From your Supabase Docker directory:

bash
git submodule add https://github.com/HenkDz/selfhosted-supabase-mcp.git selfhosted-supabase-mcp

2. Create the Dockerfile

Create volumes/mcp/Dockerfile:

dockerfile
# Dockerfile for selfhosted-supabase-mcp HTTP mode
# Multi-stage build using Bun runtime for self-hosted Supabase

FROM oven/bun:1.1-alpine AS builder

WORKDIR /app

# Copy package files from submodule
COPY selfhosted-supabase-mcp/package.json selfhosted-supabase-mcp/bun.lock* ./

# Install dependencies
RUN bun install --frozen-lockfile || bun install

# Copy source code
COPY selfhosted-supabase-mcp/src ./src
COPY selfhosted-supabase-mcp/tsconfig.json ./

# Build the application
RUN bun build src/index.ts --outdir dist --target bun

# Production stage
FROM oven/bun:1.1-alpine AS runner

WORKDIR /app

# Create non-root user for security
RUN addgroup --system --gid 1001 mcp && \
    adduser --system --uid 1001 --ingroup mcp mcp

# Copy built application from builder
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./

# Set ownership
RUN chown -R mcp:mcp /app

USER mcp

# Default environment variables
ENV NODE_ENV=production

# Health check
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
    CMD wget --no-verbose --tries=1 --spider http://localhost:3100/health || exit 1

# Expose HTTP port
EXPOSE 3100

# Start the MCP server in HTTP mode
CMD ["bun", "run", "dist/index.js"]

3. Add the MCP Service to docker-compose.yml

Add this service definition to your docker-compose.yml:

yaml
## MCP Server - Model Context Protocol for AI integrations
## DISABLED BY DEFAULT - Add 'mcp' to COMPOSE_PROFILES to enable
mcp:
  container_name: ${COMPOSE_PROJECT_NAME:-supabase}-mcp
  profiles:
    - mcp
  build:
    context: .
    dockerfile: ./volumes/mcp/Dockerfile
  restart: unless-stopped
  healthcheck:
    test:
      [
        "CMD",
        "wget",
        "--no-verbose",
        "--tries=1",
        "--spider",
        "http://localhost:3100/health"
      ]
    timeout: 5s
    interval: 10s
    retries: 3
  depends_on:
    db:
      condition: service_healthy
    rest:
      condition: service_started
  environment:
    SUPABASE_URL: http://kong:8000
    SUPABASE_ANON_KEY: ${ANON_KEY}
    SUPABASE_SERVICE_ROLE_KEY: ${SERVICE_ROLE_KEY}
    SUPABASE_AUTH_JWT_SECRET: ${JWT_SECRET}
    DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
  command:
    [
      "bun",
      "run",
      "dist/index.js",
      "--transport", "http",
      "--port", "3100",
      "--host", "0.0.0.0",
      "--url", "http://kong:8000",
      "--anon-key", "${ANON_KEY}",
      "--service-key", "${SERVICE_ROLE_KEY}",
      "--jwt-secret", "${JWT_SECRET}",
      "--db-url", "postgresql://postgres:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"
    ]

4. Add Kong API Gateway Routes

Add the MCP routes to volumes/api/kong.yml in the services section:

yaml
## MCP Server routes - Model Context Protocol for AI integrations
## Authentication is handled by the MCP server itself (JWT validation)
- name: mcp-v1
  _comment: 'MCP Server: /mcp/v1/* -> http://mcp:3100/*'
  url: http://mcp:3100/
  routes:
    - name: mcp-v1-all
      strip_path: true
      paths:
        - /mcp/v1/
  plugins:
    - name: cors
      config:
        origins:
          - "$SITE_URL_PATTERN"
          - "http://localhost:3000"
          - "http://127.0.0.1:3000"
        methods:
          - GET
          - POST
          - DELETE
          - OPTIONS
        headers:
          - Accept
          - Authorization
          - Content-Type
          - X-Client-Info
          - apikey
          - Mcp-Session-Id
        exposed_headers:
          - Mcp-Session-Id
        credentials: true
        max_age: 3600

5. Enable the MCP Service

The MCP service uses Docker Compose profiles, so it's disabled by default. To enable it:

Option A: Set in .env file:

bash
COMPOSE_PROFILES=mcp

Option B: Enable at runtime:

bash
docker compose --profile mcp up -d

Accessing the MCP Server

Once running, the MCP server is available at:

  • Internal (from other containers): http://mcp:3100
  • External (via Kong): http://localhost:8000/mcp/v1/

Authentication

When running in HTTP mode, the MCP server validates JWTs using the configured JWT_SECRET. Clients must include a valid Supabase JWT in the Authorization header:

Authorization: Bearer <supabase-jwt>

The JWT's role claim determines access:

  • service_role: Full access to all tools (regular + privileged)
  • authenticated: Access to regular tools only
  • anon: No tool access

Health Check

The MCP server exposes a health endpoint:

bash
curl http://localhost:8000/mcp/v1/health

Security Considerations

When deploying via Docker:

  1. The MCP server runs as a non-root user (mcp:mcp)
  2. JWT authentication is enforced for all tool calls
  3. Privileged tools (like execute_sql) require service_role JWT
  4. CORS is configured via Kong - adjust origins for your deployment

Development

  • Language: TypeScript
  • Build: bun build (via bun run build)
  • Runtime: Bun v1.1+
  • Test runner: bun test
  • Dependencies: Managed via bun (bun.lock)
  • Core Libraries: @supabase/supabase-js, pg (node-postgres), zod (validation), commander (CLI args), @modelcontextprotocol/sdk (MCP server framework), express, jsonwebtoken.

License

This project is licensed under the MIT License. See the LICENSE file for details.

安装

TypingMind
{
  "mcpServers": {
    "selfhosted-supabase-mcp": {
      "command": "npx",
      "args": [
        "@henkdz/selfhosted-supabase-mcp",
        "--url",
        "{{config.SUPABASE_URL}}",
        "--anon-key",
        "{{config.SUPABASE_ANON_KEY}}",
        "--service-key",
        "{{config.SUPABASE_SERVICE_ROLE_KEY}}",
        "--db-url",
        "{{config.DATABASE_URL}}",
        "--jwt-secret",
        "{{config.SUPABASE_AUTH_JWT_SECRET}}",
        "--tools-config",
        "{{config.TOOLS_CONFIG_PATH}}"
      ],
      "env": {
        "SUPABASE_URL": "<SUPABASE_URL>",
        "SUPABASE_ANON_KEY": "<SUPABASE_ANON_KEY>"
      }
    }
  }
}

将 Self-Hosted Supabase MCP Server MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 Self-Hosted Supabase MCP Server 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请勿关闭终端窗口或停止其中的连接器进程。
3

将 Self-Hosted Supabase MCP Server 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 Self-Hosted Supabase MCP Server MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "selfhosted-supabase-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "self-hosted-supabase-mcp"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 Self-Hosted Supabase MCP Server MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 Self-Hosted Supabase MCP Server MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 Self-Hosted Supabase MCP Server 帮我完成这项任务吗?
Self-Hosted Supabase MCP Server
当然,我看过了。
以下是我使用 Self-Hosted Supabase MCP Server 得到的结果。

常见问题

Self-Hosted Supabase MCP Server MCP 服务器有什么用途?

Self-Hosted Supabase MCP Server 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 Self-Hosted Supabase MCP Server MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您无需为每个模型单独配置 MCP 服务器,就能在 Claude、ChatGPT、Gemini 或您在 TypingMind 中配置的其他 AI 模型中使用 Self-Hosted Supabase MCP Server。

为什么在 TypingMind 中使用 Self-Hosted Supabase MCP Server MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是最出色的大语言模型聊天前端之一。连接 Self-Hosted Supabase MCP Server 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 Self-Hosted Supabase MCP Server MCP 连接到 TypingMind?

Self-Hosted Supabase MCP Server 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

Self-Hosted Supabase MCP Server MCP 在 TypingMind 中提供哪些工具?

Self-Hosted Supabase MCP Server 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 Self-Hosted Supabase MCP Server MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行选择模型提供商,并自行管理 API 密钥、提示词和 MCP 配置。如果 Self-Hosted Supabase MCP Server 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇