Guardian MCP
Guardian MCP
Guardian MCP 是一个面向 Alpaca 模拟交易的、受策略约束的 AI 交易网关。AI 智能体可以提出股票、ETF 和加密货币交易提案,但由确定性规则决定该交易是被阻止、批准供人工审核,还是提交至 Alpaca 模拟交易。
为什么这样做
大多数 AI 交易演示赋予模型过大的权限。Guardian 将工作流拆分如下:
AI proposes a TradeIntent
Guardian validates the intent
Policy engine approves or blocks
Alpaca paper trading receives only approved low-risk orders
Every decision becomes an audit receiptRelated MCP server: alpaca-mcp-server
当前范围
美股和 ETF
Alpaca 上的加密货币交易对,包括
BTC/USD、ETH/USD和SOL/USD仅限模拟交易
缺少 API 密钥时,使用模拟 Alpaca 执行
本地 JSON 审计日志(用于首次演示)
与官方 Alpaca Skills 对齐,以实现仅限模拟交易的安全门控
快速开始
npm install
npm run dev打开 http://localhost:3000。
要连接 Alpaca 模拟交易,请创建 .env.local:
ALPACA_API_KEY=your_key
ALPACA_SECRET_KEY=your_secret
ALPACA_PAPER_BASE_URL=https://paper-api.alpaca.markets
ALPACA_PAPER_TRADE=true
TELEGRAM_BOT_TOKEN=your_botfather_tokenAlpaca 官方 Skills 也使用 APCA_API_KEY_ID 和 APCA_API_SECRET_KEY;Guardian 同样支持这些名称。
不要将 API 密钥粘贴到聊天中,也不要将其提交到版本库。Guardian 会阻止 Alpaca 实盘配置,并且仅支持模拟交易。
演示流程
选择一个模拟 AI 交易提案。
运行防护检查。
查看被允许的交易如何被提交至模拟执行或真实的 Alpaca 模拟交易。
查看被阻止的交易如何被记录,并附有精确的策略原因。
Telegram 机器人
Guardian 也可以作为 Telegram 机器人运行,用于聊天优先的演示:
npm run telegram机器人命令:
/account
/portfolio
/policy
/preview buy SOL/USD 50
/confirm guardian-tg-...该机器人使用长轮询,因此应该在你的 Google VM 上运行,而不是 Vercel 上。它绝不会静默提交:/preview 会创建模拟订单预览,并且在 Guardian 可以向 Alpaca 模拟交易提交之前,必须执行 /confirm。
要在 VM 上与另一个进程一起运行:
pm2 start npm --name guardian-telegram -- run telegram
pm2 save默认策略
仅模拟交易模式
最大交易名义金额:
$500超过
$100需人工审批最大每日亏损:
2%最大仓位敞口:
15%最大加密货币交易名义金额:
$100最大加密货币投资组合敞口:
20%加密货币冷却时间:
15 minutes
黑客松推介
Guardian MCP 允许 AI 交易智能体通过 Alpaca 进行操作,而不会让模型对账户拥有不受约束的控制权。模型可以进行研究并提出交易建议;Guardian 会在执行前强制执行确定性的用户策略,并将每个决策记录在可重放的审计跟踪中。
Alpaca Skills
本仓库与 Alpaca 的官方智能体技能保持一致。有关模拟交易护栏以及剩余的 Alpaca 特定工作,请参阅 docs/alpaca-skills.md。
MCP 服务器
Guardian 包含自己的 MCP 服务器:
npm run mcp有关工具名称和 MCP 客户端配置,请参阅 docs/mcp.md。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to execute stock trading operations with built-in risk controls and human approval workflows. Supports paper trading simulation, real brokerage integration (Alpaca, Tradier), backtesting, sentiment analysis, and portfolio management while maintaining strict separation between AI intelligence and trade execution.MIT
- AlicenseNot gradedqualityDmaintenanceEnables natural language trading operations for stocks, options, crypto, and portfolio management via Alpaca's Trading API through AI assistants.MIT
- AlicenseBqualityAmaintenanceProvides a safe trading toolkit for AI agents with market data, indicators, paper trading, and guarded broker integration.63MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to analyze Ethereum wallets, simulate transactions, and draft transfers with deterministic policy and risk scoring, requiring human approval before on-chain execution.2ISC
Related MCP Connectors
Build, backtest, and deploy quantitative trading strategies from your AI agent.
No-KYC managed MCP for AI agents: sandboxed TypeScript trading SDK, isolated sub-accounts, futures.
Deterministic compliance and vertical knowledge bases for autonomous agents. Free 24hr trial.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Dozie2001/guardian-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server