MCP Guardian 9c1b44c0

MCP数据服务

提供方 jacklatrobe

数据服务 stdio · 本地进程 会话登录 社区 / 第三方
查看接入方式

基于FastAPI的MCP代理服务,支持多上游MCP服务器注册、能力周期性验证及变更自动禁用功能,提供管理界面和SQLite存储。

一句话选型结论

按资料字段整理

MCP Guardian 9c1b44c0 属于数据服务类 MCP 服务器,stdio · 本地进程,会话登录,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类数据服务 传输方式stdio · 本地进程 鉴权会话登录 部署方式本地部署
GitHub 星标 0 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

数据服务
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

适用场景

MCP代理Python本地部署服务器验证自动化管理FastAPISQLite

安装与配置

stdio · 本地进程 会话登录
客户端在本机拉起子进程,数据不出本机
docker run -d \

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Docker,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
数据库查询

用自然语言查库、取数,不用手写 SQL。

数据同步与清洗

把多来源数据拉到一处做整理。

报表取数

按口径快速拉出统计结果。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 使用前要准备好会话登录对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在数据服务场景里让模型直接调用外部能力的人。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
MCP Guardian 9c1b44c0当前 未标注 stdio · 本地进程 本地部署 有 2026-05-17
Memory 9d25f64e 9 未标注 未标注 无 2026-05-17
Getzep MCP 9 stdio · 本地进程 本地部署 有 2026-05-17
anything-llm 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Prisma MCP Server 未标注 stdio · 本地进程 本地部署 有 2026-05-17
Astr Bot 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

数据服务
字段来自项目仓库与公开索引,中文说明由本站标注
提供方jacklatrobe上游标注的维护方 jacklatrobe
分类数据服务本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式会话登录远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · Docker本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

9.3 KB
来自项目仓库与上游目录的原文,未做删改

MCP Guardian 🛡️

A FastAPI-based MCP proxy that lets you register multiple upstream MCP servers, expose each under a stable URL, periodically re-validate their capabilities, and auto-disable any server whose tools/prompts/resources/spec change until a human re-approves.

Features

  • ✅ Proxy multiple MCP servers under stable paths (/{SERVICE_NAME}/mcp)
  • ✅ Snapshot capabilities on onboarding (tools, resources, prompts)
  • ✅ Periodic validation with configurable check frequency
  • ✅ Auto-disable on changes - services are automatically disabled if capabilities drift
  • ✅ Admin UI for service management and diff viewing
  • ✅ RFC 8785 JCS canonical JSON hashing for robust change detection
  • ✅ SSE streaming support for real-time MCP interactions
  • ✅ SQLite storage with JSON1 support

Architecture

MCP Guardian sits between MCP clients and upstream MCP servers:```
MCP Clients → MCP Guardian → Upstream MCP Servers
(proxy + validator)


### Key Components

- **Proxy Layer**: Wildcard routing that forwards POST/GET/DELETE to upstream servers
- **Snapshotter**: Captures capabilities (tools/resources/prompts) via MCP protocol
- **Canonicalizer**: RFC 8785 JCS + SHA-256 hashing for deterministic fingerprints
- **Schedulers**: Background tasks for route polling and periodic checks
- **Admin UI**: Web interface for service management

## Quick Start

### Using Docker```bash
# Build the image
docker build -t mcp-guardian .

# Run with auto-generated password (check logs for password)
docker run -d \
  -p 8000:8000 \
  --name mcp-guardian \
  mcp-guardian

# View logs to get the generated admin password
docker logs mcp-guardian

# Or run with custom config.yml and persistent data
docker run -d \
  -p 8000:8000 \
  -v $(pwd)/config.yml:/app/config.yml:ro \
  -v mcp-guardian-data:/app/data \
  --name mcp-guardian \
  mcp-guardian

Important for Docker Data Persistence:
- Use a named volume (e.g., mcp-guardian-data:/app/data) to persist your database
- In your config.yml, set the database URL to: sqlite+aiosqlite:////app/data/mcp_guardian.db (note the 4 slashes for absolute path)
- The named volume approach works reliably across platforms (Windows, macOS, Linux)
- Without a volume mount, your database will be lost when the container is removed

Using Python```bash

Install dependencies

pip install -e .

Run the server (will generate random admin password)

python -m uvicorn mcp_guardian.app.main:app --host 0.0.0.0 --port 8000

Or with custom config

cp config.yml.example config.yml

Edit config.yml with your settings

python -m uvicorn mcp_guardian.app.main:app --host 0.0.0.0 --port 8000


## Configuration

MCP Guardian uses a `config.yml` file for all configuration. This file is **optional** - if not provided, sensible defaults will be used.

### Quick Start

1. **Copy the example config** (optional):```bash
   cp config.yml.example config.yml
   ```

2. **Edit config.yml** to customize:
   - Admin password (random password generated if not set)
   - Database location
   - Polling intervals
   - Pre-configured MCP services

### Configuration File (`config.yml`)```yaml
# Admin interface configuration
admin:
  password: "your-secure-password"  # Optional - random if not set
  disable_ui: false                  # Set true to disable admin UI/API

# Polling and scheduling
polling:
  interval_seconds: 60               # Scheduler wake-up frequency
  min_check_frequency: 5             # Minimum check frequency (minutes)

# Database
database:
  # For Docker with persistence (recommended):
  url: "sqlite+aiosqlite:////app/data/mcp_guardian.db"
  # For local development:
  # url: "sqlite+aiosqlite:///./mcp_guardian.db"

# Pre-configured services (optional)
services:
  - name: "my-service"
    upstream_url: "http://localhost:3000/mcp"
    enabled: true
    check_frequency_minutes: 15

Security Notes

  • Admin Password: If no password is set in config.yml, a random password is generated at startup and logged to the console. Save this password!
  • HTTP Basic Auth: The admin interface uses HTTP Basic Authentication. Username can be anything; password must match the configured/generated password.
  • Disable Admin UI: For production deployments managed entirely via config.yml, set admin.disable_ui: true to completely disable the admin interface.

Deployment Scenarios

Local Development:```bash

No config file needed - defaults work fine

python -m uvicorn mcp_guardian.app.main:app --reload

Watch logs for generated admin password


**Production (Docker with mounted config)**:```bash
# Using a named volume for data persistence (recommended)
docker run -d \
  -p 8000:8000 \
  -v /path/to/config.yml:/app/config.yml:ro \
  -v mcp-guardian-data:/app/data \
  --name mcp-guardian \
  mcp-guardian:latest

# Or using a bind mount for data (Linux/macOS)
docker run -d \
  -p 8000:8000 \
  -v /path/to/config.yml:/app/config.yml:ro \
  -v /path/to/data:/app/data \
  --name mcp-guardian \
  mcp-guardian:latest

Important:
- If your config.yml specifies a database path like sqlite+aiosqlite:////app/data/mcp_guardian.db, you must mount a volume to /app/data for persistence
- Use named volumes (e.g., mcp-guardian-data:/app/data) for best cross-platform compatibility
- Bind mounts (./data:/app/data) can have permission issues on Windows with Docker Desktop

Using Docker Compose

Create a docker-compose.yml file:```yaml
services:
mcp-guardian:
build: .
ports:
- "8000:8000"
volumes:
- ./config.yml:/app/config.yml:ro
- mcp-data:/app/data
restart: unless-stopped

volumes:
mcp-data:


**Key Points**:
- The `mcp-data` named volume persists your database across container restarts
- Ensure your `config.yml` has: `database.url: "sqlite+aiosqlite:////app/data/mcp_guardian.db"`
- Data persists even when running `docker compose down` and `docker compose up --build`

Then run:```bash
docker compose up -d

GitOps Friendly:
- Store config.yml in version control
- Services defined in config are auto-upserted to database on startup
- Existing services (by name) are never overwritten
- Perfect for CI/CD pipelines and infrastructure-as-code

Usage

Admin UI

Navigate to http://localhost:8000/ADMIN/ to access the admin interface.

Authentication: You'll be prompted for HTTP Basic Auth credentials. Username can be anything; password must match the value in config.yml (or the generated password from logs).

Overview

The admin interface provides a dashboard to manage all your MCP services:

Service list showing enabled services with their upstream URLs, check frequencies, and snapshot approval status

Adding a Service

  1. Click "Add Service"
  2. Fill in:
    - Service Name: Alphanumeric identifier (e.g., my-mcp-service)
    - Upstream MCP URL: Full URL to upstream MCP endpoint (e.g., http://localhost:3000/mcp)
    - Check Frequency: Minutes between checks (0 = never, minimum 5)
    - Enable: Whether to enable the service immediately
  3. Click "Save"

The system will:
- Initialize the upstream server
- List all tools, resources, and prompts
- Create a canonical JSON snapshot
- Mark it as user_approved
- Expose the service at /{SERVICE_NAME}/mcp

Viewing Service Details

Click "View" on any service to see:
- Service configuration
- Recent snapshots
- Diff between approved and latest snapshots
- Actions: Approve, Enable/Disable, Delete

Service detail view showing configuration, snapshot history, and approval status

Handling Changes

When the periodic checker detects capability changes:
1. Service is automatically disabled
2. New snapshot is marked as unapproved
3. Admin reviews the diff in the UI
4. Admin clicks "Approve Latest Snapshot" to re-enable

How It Works

Initialization Flow

  1. Admin creates a service via UI/API
  2. Guardian sends initialize to upstream
  3. Guardian calls tools/list, resources/list, prompts/list
  4. Capabilities are sorted, canonicalized (RFC 8785), and hashed (SHA-256)
  5. Snapshot stored with user_approved status
  6. Service enabled and added to route registry

Periodic Check Flow

Every minute (configurable):

  1. Scheduler identifies services due for checks (based on check_frequency_minutes)
  2. For each due service:
    - Take new snapshot
    - Compare hash with last approved hash
    - If same: Create snapshot with system_approved status
    - If different: Create snapshot with unapproved status and disable service
  3. Route registry reloaded to reflect changes

Proxy Flow

  1. Client sends request to /{service_name}/mcp
  2. Guardian checks route registry for enabled status
  3. If disabled: Return HTTP 403 Forbidden. If not configured, it returns HTTP 404.
  4. If enabled: Forward request to upstream, preserving:
    - Headers: MCP-Protocol-Version, Mcp-Session-Id, Last-Event-ID
    - Body: Raw JSON-RPC
    - SSE: Event stream with proper id: propagation
  5. Stream response back to client

Security Considerations (POC)

This is a Proof of Concept with basic security:

  • ✅ Single shared admin token (env var)
  • ✅ Token-based API authentication
  • ❌ No HTTPS (use reverse proxy)
  • ❌ No rate limiting
  • ❌ No audit trail export
  • ❌ No multi-tenant RBAC

License

See LICENSE.md

常见问题

7 问
答案由本站依据条目字段整理,不引用上游原文
MCP Guardian 9c1b44c0 怎么安装?

在客户端按下面的安装命令接入:docker run -d \。装完在客户端配置里引用同一个包或端点。

MCP Guardian 9c1b44c0 怎么在客户端里配置?

它的传输方式未标注,在客户端 MCP 配置里按官方文档填写启动命令和参数,保存后重启客户端生效。

MCP Guardian 9c1b44c0 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

MCP Guardian 9c1b44c0 需要 API Key 吗?

资料标注需要会话登录认证,使用前准备好对应凭据,并按最小权限配置。

MCP Guardian 9c1b44c0 能提供哪些能力?

资料显示能力标签包括 自动化管理、FastAPI、SQLite、Python。具体工具清单以官方文档为准。

MCP Guardian 9c1b44c0 需要什么运行环境?

运行时为 Docker;属于本地进程,需要在本机装好运行环境。

MCP Guardian 9c1b44c0 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。