{
  "markdown": "# AgentSecurityLens\n\nAgentSecurityLens (ASL) is an MCP security trust-check server for autonomous agents.\n\nBefore an agent installs or enables an MCP, Skill, tool, prompt bundle, workflow, or memory component, it can ask ASL for a machine-readable safe-install decision.\n\nASL is not a malware verdict tool. It returns observable risk signals, required controls, safer alternatives or mitigation paths, and a decision contract an agent can execute.\n\n## For Autonomous Agents\n\nWhen you plan to install or enable an MCP, Skill, tool, prompt bundle, workflow or memory component:\n\n1. Run `mcp-security-lens ...`, `agent-security-lens-review ...`, or call the MCP tool `review_before_install`.\n2. Read `agent_decision_contract`.\n3. Do not install automatically when `automatic_install_allowed` is `false`.\n4. Apply every `safe_install_plan` item before restricted installs.\n5. Prefer `recommended_alternatives` when ASL returns `avoid`, `ask_user`, or missing controls.\n6. Report the final outcome with `report_install_outcome`.\n\nMachine-readable agent instructions are also available in [AGENTS.md](AGENTS.md).\n\n## Agent Quick Install\n\nCheck whether ASL can reach online intelligence and what local fallback is available:\n\n```bash\nnpx -y agent-security-lens doctor\n```\n\nTry one pre-install decision first:\n\n```bash\nnpx -y mcp-security-lens filesystem \\\n  --type mcp \\\n  --source-url https://github.com/modelcontextprotocol/servers \\\n  --install-command \"npx -y @modelcontextprotocol/server-filesystem .\" \\\n  --permission filesystem-read \\\n  --permission filesystem-write\n```\n\nThe command returns an agent-readable decision, trust score, risk signals, safe install plan, and whether automatic installation is allowed.\n\nIf your shell does not expose npm temporary binaries correctly, use `npm install -g agent-security-lens` once, then run the same command without `npx -y`.\n\nMore copy-ready calls:\n\n- [MCP first-call examples](docs/public-intelligence/mcp-first-call-examples-v0.1.md)\n\nAdd ASL as a pre-install trust check MCP:\n\n```json\n{\n  \"mcpServers\": {\n    \"agent-security-lens\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"agent-security-lens\"]\n    }\n  }\n}\n```\n\nThen give the agent this policy:\n\n```text\nBefore installing or enabling any MCP, Skill, tool, prompt bundle,\nworkflow or memory component, call AgentSecurityLens review_before_install.\nFollow agent_decision_contract and agent_actions exactly.\nNever submit private source code, secrets, tokens, cookies or file contents.\n```\n\nSee [Agent install guide](docs/agent-install.md) for Claude Desktop, Cursor, Codex-style and generic MCP configurations.\n\nCopy-ready files:\n\n- [Install snippets](docs/install-snippets/README.md)\n- [Agent pre-install policy](docs/policies/agent-preinstall-policy.md)\n\n## Public Intelligence\n\nThe public package includes a reviewed baseline so agents can still make conservative decisions when the cloud API is unavailable.\n\n- [Public Security Index v0.1](docs/public-intelligence/asl-public-security-index-v0.1.md)\n- [Top MCP Security Signals v0.1](docs/public-intelligence/top-mcp-security-signals-v0.1.md)\n- [Top Skill Security Signals v0.1](docs/public-intelligence/top-skill-security-signals-v0.1.md)\n- [Agent Framework Install Decisions v0.1](docs/public-intelligence/agent-framework-install-decisions-v0.1.md)\n- [MCP First-Call Examples v0.1](docs/public-intelligence/mcp-first-call-examples-v0.1.md)\n\nThe online ASL intelligence API serves the current expanded catalog. The npm package intentionally does not ship the complete private intelligence database.\n\n## Basic MCP Config\n\n```json\n{\n  \"mcpServers\": {\n    \"agent-security-lens\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"agent-security-lens\"]\n    }\n  }\n}\n```\n\nNode.js 20 or newer is required.\n\n## Online Configuration\n\nThe public MCP uses online intelligence by default:\n\n```text\nASL_API_URL=https://agentsecuritylens-api.agentsecuritylens.workers.dev\nASL_API_URLS=https://agentsecuritylens-api.agentsecuritylens.workers.dev\n```\n\n`ASL_API_URLS` may contain multiple comma-separated endpoints. The MCP tries them in order and falls back automatically.\n\n## Agent Policy\n\nAgents should call `get_install_policy` after connecting, then call `review_before_install` before every component installation.\nThe policy call records a minimal activation event for product health and abuse monitoring when online mode is enabled. It does not send private files, local paths, secrets, tokens or code. Set `ASL_DISABLE_USAGE_TELEMETRY=1` to disable this usage event.\n\n```text\nallow                    install from the recorded source and version\nallow_with_restrictions  apply every safe_install_plan item before installation\nask_user                 stop automatic installation and request confirmation\navoid                    do not install automatically\n```\n\nUnknown or incompletely reviewed components never receive automatic-install authorization.\n\nRecommended instruction:\n\n```text\nBefore installing or enabling any MCP, Skill, tool, prompt bundle, workflow,\nor memory component, call AgentSecurityLens review_before_install.\nFollow agent_decision_contract and agent_actions exactly.\nNever submit private source code, secrets, tokens, cookies, or file contents.\n```\n\n## MCP Tools\n\n- `get_install_policy`: returns the current Agent execution policy and records a minimal first-call activation event.\n- `get_intelligence_status`: reports online or local intelligence status for MCP clients.\n- `review_before_install`: evaluates a proposed component and installation context.\n- `check_component`: retrieves known component intelligence.\n- `recommend_alternatives`: returns evidence-backed alternatives and mitigations.\n- `submit_unknown_component`: submits public metadata for research.\n- `get_research_status`: checks whether an unknown component has been reviewed.\n- `report_install_outcome`: reports the result of an Agent action.\n- `submit_decision_feedback`: reports useful, incorrect, or incomplete decisions.\n- `discover_workspace`: discovers Agent, MCP, and Skill environments.\n- `scan_workspace`: performs a local fallback assessment.\n\n## Decision Contract\n\nExample request:\n\n```json\n{\n  \"component_name\": \"filesystem\",\n  \"component_type\": \"mcp\",\n  \"source_url\": \"https://github.com/modelcontextprotocol/servers\",\n  \"install_command\": \"npx -y @modelcontextprotocol/server-filesystem .\",\n  \"planned_use\": \"Read and edit project files.\",\n  \"requested_permissions\": [\"filesystem-read\", \"filesystem-write\"],\n  \"submit_if_unknown\": true\n}\n```\n\nExample response shape:\n\n```json\n{\n  \"decision\": \"ask_user\",\n  \"risk_signals\": [\"filesystem-read\", \"filesystem-write\", \"shell-execution\"],\n  \"safe_install_plan\": [\n    \"Restrict filesystem scope to the current project directory.\",\n    \"Prefer read-only mode when the task only needs inspection.\",\n    \"Pin the package version before enabling it.\"\n  ],\n  \"agent_decision_contract\": {\n    \"automatic_install_allowed\": false,\n    \"user_confirmation_required\": true,\n    \"blocks_install\": true\n  },\n  \"one_step_action\": {\n    \"action_type\": \"ask_user_before_install\"\n  }\n}\n```\n\nAgents must execute the structured fields rather than infer policy from prose.\n\n## Intelligence States\n\n- `strict_reviewed`: versioned evidence, technical scan, community-source check, and independent recalculation completed.\n- `curated_baseline`: manually curated fallback information with limited evidence.\n- `automatic_assessment`: automated coverage that cannot authorize automatic installation.\n- `unknown`: no matching intelligence record.\n\nASL evaluates observable behavior and installation context. It does not label a component malicious without evidence.\n\nThe public fallback contains strict reviewed records and curated fallback baselines. Automatic assessments are available through the online service but cannot authorize automatic installation.\n\n## Privacy\n\nOnline lookup uses public component metadata only. Do not submit:\n\n- private source code or file contents\n- API keys, passwords, tokens, or SSH keys\n- browser cookies or personal browser history\n- private prompts, memories, or customer records\n- secrets from environment variables\n\nSee [PRIVACY.md](PRIVACY.md) and [SECURITY.md](SECURITY.md).\n\n## Local Fallback\n\n```powershell\n$env:ASL_MODE=\"local\"\nnpx -y agent-security-lens\n```\n\nLocal fallback provides basic rules and a limited public intelligence baseline. The current online intelligence service should be preferred when available.\n\n## Verification\n\n```bash\nnpm run verify:public\n```\n\nThe scoring method is documented in [ASL Agent Component Safety Standard v0.2](docs/asl-agent-component-safety-standard-v0.2.md).\n\n## License\n\nApache-2.0\n",
  "bytes": 8637,
  "sha": "e3216bf792659b0430962f3da0c01bcd3d2822cc4035ef18cd3cdd9a8a2b2763",
  "repo_slug": "professor2k8/agent-security-lens",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_professor2k8_agent_security_le_947174a6/readme"
}