AgentsID Guard

AgentsID Guard

MCP server that protects shell, file, database, git, and HTTP operations with per-agent permission rules

Category
访问服务器

README

<p align="center"> <h1 align="center">AgentsID Guard</h1> <p align="center"> <strong>One MCP server. Every operation protected.</strong> </p> </p>

<p align="center"> <a href="https://agentsid.dev"><img src="https://img.shields.io/badge/powered%20by-AgentsID-f59e0b?style=flat-square" alt="AgentsID" /></a> <a href="https://github.com/AgentsID-dev/shell-guard/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-f59e0b?style=flat-square" alt="License" /></a> </p>


Your AI agent has access to your shell, file system, database, git repos, and the internet. Right now, nothing controls what it can do with any of them.

AgentsID Guard fixes that. 11 tools across 5 categories — shell, files, database, git, HTTP — every operation validated against per-agent permission rules before execution.

How It Works

Agent: shell_run("ls -la /src")
  → Classified: shell.read.ls
  → AgentsID: ALLOWED ✓
  → Executes normally

Agent: shell_run("rm -rf /data")
  → Classified: shell.danger.rm
  → AgentsID: BLOCKED ✗
  → Never executes

Agent: db_query("DROP TABLE users")
  → Classified: db.danger.ddl
  → AgentsID: BLOCKED ✗
  → Never executes

Agent: git_run("push origin main")
  → Classified: git.write.push
  → AgentsID: BLOCKED ✗
  → Never executes

Quick Start

1. Install

npx @agentsid/guard

2. Get your keys

Sign up at agentsid.dev/dashboard — free tier: 25 agents, 10K events/month.

3. Add to Claude Code

claude mcp add guard \
  -e AGENTSID_PROJECT_KEY=aid_proj_your_key \
  -e AGENTSID_AGENT_TOKEN=aid_tok_your_token \
  -- npx @agentsid/guard

4. Set permissions

npx agentsid register-agent --name "my-agent" \
  --permissions "shell.read.*" "file.read" "file.list" "git.read.*" "http.get"

Tools

AgentsID Guard exposes 11 MCP tools:

Tool What it does Permission pattern
shell_run Execute a shell command shell.read.*, shell.write.*, shell.danger.*, shell.admin.*
file_read Read a file file.read
file_write Write/create a file file.write
file_delete Delete a file file.delete
file_list List directory contents file.list
file_info Get file metadata file.info
db_query Run a SQL query db.read, db.write.*, db.danger.*
git_run Run a git command git.read.*, git.write.*, git.danger.*
http_request Make an HTTP request http.get, http.post, http.put, http.delete
check_permission Check if an action would be allowed
list_categories List all permission categories

Permission Categories

Shell

Pattern Commands Risk
shell.read.* ls, cat, grep, find, ps, df, curl, ping Safe
shell.write.* mkdir, touch, cp, mv Moderate
shell.danger.* rm, chmod, chown, kill High
shell.admin.* sudo, docker, apt, npm, systemctl Critical

Files

Pattern Operations Risk
file.read Read file contents Safe
file.list List directories Safe
file.info File metadata Safe
file.write Create/write files Moderate
file.delete Delete files High

Database

Pattern Statements Risk
db.read SELECT, SHOW, DESCRIBE, EXPLAIN Safe
db.write.insert INSERT Moderate
db.write.update UPDATE Moderate
db.write.create CREATE Moderate
db.danger.delete DELETE High
db.danger.ddl DROP, TRUNCATE, ALTER Critical

Git

Pattern Commands Risk
git.read.* status, log, diff, branch, show, blame Safe
git.write.* add, commit, push, pull, merge, checkout, stash Moderate
git.danger.* reset, force-push Critical

HTTP

Pattern Methods Risk
http.get GET Safe
http.post POST Moderate
http.put PUT Moderate
http.delete DELETE High

Permission Examples

Read-only research agent:

shell.read.*    → allow
file.read       → allow
file.list       → allow
db.read         → allow
git.read.*      → allow
http.get        → allow

Developer agent (read + write, no destructive):

shell.read.*    → allow
shell.write.*   → allow
file.read       → allow
file.write      → allow
file.list       → allow
db.read         → allow
db.write.*      → allow
git.read.*      → allow
git.write.*     → allow
http.get        → allow
http.post       → allow

Full access with approval gates:

shell.read.*    → allow
shell.write.*   → allow
shell.danger.*  → allow (requires approval)
shell.admin.*   → allow (requires approval)
file.*          → allow
db.read         → allow
db.write.*      → allow
db.danger.*     → allow (requires approval)
git.*           → allow
http.*          → allow

Environment Variables

Variable Required Description
AGENTSID_PROJECT_KEY Yes Your AgentsID project key
AGENTSID_AGENT_TOKEN Yes Agent token for permission checks
AGENTSID_BASE_URL No API URL (default: https://agentsid.dev)
GUARD_CWD No Working directory (default: cwd)
GUARD_TIMEOUT No Command timeout in ms (default: 30000)
GUARD_ALLOWED_DIRS No Comma-separated allowed directories for file ops (default: cwd)
GUARD_DB_URL No Database connection string for db_query (postgresql://, mysql://, or .db path)

Security

  • Deny-first — unknown commands and tools are blocked by default
  • Path containment — file operations restricted to allowed directories
  • Fail-closed — network errors to AgentsID result in denial, not bypass
  • Audit trail — every allow and deny logged to AgentsID's tamper-evident hash chain
  • No shell injection — commands executed via execSync with no shell interpolation of user input in tool arguments

Dashboard

Every operation appears in your AgentsID dashboard:

  • Which agent ran which command
  • Whether it was allowed or denied and why
  • Full audit trail across all 5 categories

Links

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选