AGA-mcp-server
AGA — Attested Governance Artifacts (Заверенные артефакты управления)
Криптографическое управление средой выполнения для ИИ-агентов и автономных систем.
# Try it now
pip install aga-governance
python -m aga demo
python -m aga verify demo-bundle.jsonЧто это делает
Каждый вызов инструмента, который делает ИИ-агент, проходит через шлюз AGA. Каждый вызов оценивается на соответствие политике, а решение (РАЗРЕШЕНО или ЗАПРЕЩЕНО) записывается как подписанная, хеш-связанная квитанция управления. Квитанции собираются в пакеты доказательств, которые любая третья сторона может проверить в автономном режиме, используя стандартную криптографию.
Записывай. Доказывай. Проверяй.
Related MCP server: contextboundary-gw
Использование с Claude Desktop
Добавьте в конфигурацию MCP вашего Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"aga": {
"command": "npx",
"args": ["-y", "@attested-intelligence/aga-mcp-server"]
}
}
}После этого Claude сможет запечатывать артефакты, измерять целостность, создавать пакеты доказательств и проверять соответствие требованиям с помощью естественного языка.
Инструменты MCP (20)
Категория | Инструменты |
Идентификация |
|
Жизненный цикл |
|
Принудительное исполнение |
|
Доказательства |
|
Конфиденциальность |
|
Делегирование |
|
Аудит |
|
Быстрый старт
Проверка пакета доказательств (3 команды)
pip install aga-governance
curl -s https://aga-mcp-gateway.attestedintelligence.workers.dev/bundle -o evidence-bundle.json
python -m aga verify evidence-bundle.jsonИли проверка в браузере
Перейдите на attestedintelligence.com/verify и нажмите "Run Verification". Установка не требуется.
Как это работает
AI Agent AGA Gateway Verifier
| | |
|-- tools/call ----------->| |
| [Evaluate Policy] |
| [Sign Receipt] |
| [Chain to Previous] |
|<-- PERMITTED/DENIED -----| |
| | |
| [Export Bundle] |
| |--------- evidence.json ----->|
| | [Verify Signatures]
| | [Verify Chain]
| | [Verify Merkle Tree]
| | [PASS / FAIL]Прокси управления MCP
Запустите AGA как прозрачный прокси между любым клиентом MCP и любым сервером MCP. Каждый вызов инструмента оценивается на соответствие политике и создает подписанную квитанцию.
# Start the proxy with an upstream MCP server
npx tsx src/proxy/index.ts start --upstream "npx -y @modelcontextprotocol/server-filesystem /tmp/test" --profile standard
# Export the evidence bundle
npx tsx src/proxy/index.ts export --output evidence.json
# Verify
npx tsx src/proxy/index.ts verify evidence.jsonПрокси перехватывает запросы tools/call, оценивает их на соответствие запечатанному артефакту политики и генерирует подписанные квитанции. Разрешенные вызовы пересылаются на подчиненный сервер. Запрещенные вызовы возвращают ошибку MCP. Каждое решение хеш-связано в цепочку с защитой от несанкционированного доступа.
Три встроенных профиля политики:
permissive — регистрировать всё, ничего не блокировать (по умолчанию)
standard — ограничение частоты запросов + блокировка деструктивных операций
restrictive — явный список разрешенных инструментов, все неизвестные инструменты запрещены
Проверка (5 шагов)
Проверка алгоритма — Пакет объявляет Ed25519-SHA256-JCS, при любом другом значении проверка не проходит
Подписи квитанций — Ed25519 поверх канонического JSON RFC 8785 (поле подписи исключено)
Целостность цепочки —
previous_receipt_hashкаждой квитанции = SHA-256 предыдущей квитанцииДоказательства Меркла — Проход по узлам/направлениям к корню, сравнение с корнем пакета
Согласованность пакета — Количество доказательств = количеству квитанций, хеши листьев совпадают с хешами квитанций
Криптографические примитивы
Примитив | Назначение |
Ed25519 | Подписи квитанций |
SHA-256 | Хеш-цепочки, деревья Меркла, вычисление листьев |
RFC 8785 (JCS) | Канонический JSON для детерминированной подписи |
Деревья Меркла | Привязка всех квитанций к единому проверяемому корню |
Живой шлюз
Демонстрационный шлюз развернут на Cloudflare Workers:
# Check status
curl https://aga-mcp-gateway.attestedintelligence.workers.dev/health
# Export evidence bundle
curl https://aga-mcp-gateway.attestedintelligence.workers.dev/bundle -o evidence-bundle.jsonPython SDK
pip install aga-governancefrom aga import AgentSession
with AgentSession(gateway_id="my-gateway") as session:
session.record_tool_call(
tool_name="search_web",
decision="PERMITTED",
reason="tool in allowlist",
request_id="req-1",
)
bundle = session.export_bundle()
result = session.verify()
assert result["overall_valid"]Набор тестов
355+ автоматизированных тестов на TypeScript и Python:
TypeScript MCP Server: 218 тестов (vitest)
Python SDK: 137 тестов (pytest)
Кросс-языковые тестовые векторы: 37 векторов в 9 категориях
npm test # TypeScript testsДля Python SDK установите aga-governance из PyPI: https://pypi.org/project/aga-governance/
Структура проекта
src/ # Core protocol: artifacts, receipts, chain, Merkle, crypto, portal state machine
core/ # Governance primitives (artifact, receipt, chain, portal, bundle)
crypto/ # Ed25519, SHA-256, BLAKE2b, Merkle, JCS canonicalization
proxy/ # MCP governance proxy (transparent interception + policy enforcement)
tools/ # MCP tool handlers (20 tools)
middleware/ # Zero-trust governance enforcement wrapper
independent-verifier/ # Standalone verifier with zero AGA imports
scenarios/ # Deployment scenarios (SCADA, drone, AI agent)
tests/ # TypeScript test suite (218 tests)Ссылки
Безопасность
См. SECURITY.md для сообщения об уязвимостях.
Участие в разработке
См. CONTRIBUTING.md для настройки разработки и руководящих принципов.
Лицензия
Attested Intelligence Holdings LLC
Available Tools
15 toolsattest_subjectC
Attest subject, generate sealed Policy Artifact. Auto-loads into portal.
Inputs: subject_content (required), subject_metadata (required), evidence_items, behavioral_baseline.
delegate_to_subagentB
Derive a constrained policy artifact for a sub-agent. Scope can only diminish, never expand. (NCCoE constrained delegation)
Inputs: measurement_types (required), delegation_purpose (required), enforcement_triggers (required), requested_ttl_seconds (required).
generate_evidence_bundleA
Export the canonical SEP evidence bundle: signed PERMITTED/DENIED tool-call receipts + Merkle proofs + a mandatory signed checkpoint, for offline third-party verification (verify_bundle_offline, aga-verify, or aga-receipt-spec/verify/verify-sep.mjs). Pin gateway_public_key to prove provenance.
Inputs: no named parameters.
get_chain_eventsC
Get continuity chain events.
Inputs: end_seq, start_seq.
get_portal_stateA
Get current portal state, loaded artifact info, and enforcement status.
Inputs: no named parameters.
get_receiptsC
Get all signed receipts, optionally filtered by artifact.
Inputs: artifact_hash.
get_server_infoA
Get AGA server info, public keys, and portal state.
Inputs: no named parameters.
init_chainC
Initialize continuity chain with genesis event.
Inputs: specification_hash.
list_claimsA
List available claims with sensitivity levels.
Inputs: no named parameters.
measure_behaviorA
Measure behavioral patterns (unauthorized tools, rate violations, forbidden sequences). DETECTIVE-ONLY by default: it records and PROVES drift but does not block. Pass enforce=true to also trip the portal into phantom quarantine on drift (opt-in; off by default). (NIST-2025-0035)
Inputs: enforce.
measure_integrityB
Measure subject state, compare to sealed reference. Generates signed receipt for every measurement.
Inputs: subject_content (required), subject_metadata (required).
request_claimC
Request disclosure of a claim. Auto-substitutes if denied.
Inputs: claim_id (required), mode, requester_id.
revoke_artifactA
Revoke an active policy artifact mid-session. Portal terminates on next measurement. (NCCoE Phase 3b)
Inputs: reason (required), sealed_hash (required).
verify_bundle_offlineA
Verify a canonical SEP evidence bundle offline (full §6 algorithm: structural floor, receipt signatures, chain+ordering, leaf-recompute + Merkle bijection, signed checkpoint). Pass pinned_public_key to also prove provenance.
Inputs: bundle, pinned_public_key.
verify_chainC
Verify continuity chain integrity.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Each tool has a unique purpose with no overlapping functionality. For example, measure_behavior and measure_integrity measure different aspects, and verify_chain vs. get_chain_events are distinct operations. The descriptions clearly differentiate them.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., attest_subject, delegate_to_subagent, verify_chain). There is no mixing of conventions or irregular naming.
With 15 tools, the server is well-scoped for its attestation and policy domain. Each tool earns its place, covering setup, measurement, verification, and revocation without being excessively numerous.
The tool surface appears complete for the server's purpose, covering artifact creation, delegation, evidence export, chain initialization, state querying, claims handling, behavioral and integrity measurement, revocation, and offline verification. No obvious gaps in the core workflow.
Maintenance
Related MCP Connectors
Zero-trust gateway for AI agents: score tool calls, verify agent cards, enforce policy, audit.
Free hosted notary: make any AI agent's actions provable in one call. Verify signed agent logs.
Free hosted notary: make any AI agent's actions provable in one call. Verify signed agent logs.
Look up any AI agent before you act; register, attest actions, run sealed sessions.
Related MCP Servers
- AlicenseAqualityCmaintenanceLocal zero-trust permission gateway for AI agents. Enforces policy-based tool authorization, human approvals, scoped permissions, and cryptographically verifiable audit logs.4115 PyPI5Apache 2.0
- AlicenseNot gradedqualityCmaintenanceSelf-hosted MCP gateway that applies deterministic, compiled policy to tool discovery, invocation, and outbound data flow, with no model in the enforcement path. Every decision emits a hash-chained receipt sealed with Ed25519 and verifiable using public keys only.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceProvides permission gates and tamper-evident audit logging for AI agent tool executions, with declarative policies, consent ladders, and hash-chained verification.MIT
- AlicenseAqualityAmaintenanceGates every AI agent tool call against your policy before it runs, then writes a hash-chained, tamper-evident record of what was decided and what happened. Anyone can verify that record offline, without your software, your systems or any key you hold.415AGPL 3.0