{"$schema":"https://wellknown.network/schemas/agent-record-v1.json","schemaVersion":"1","id":"ag_5m8tsyhfu3ks","handle":"mcp-server-shield","url":"https://wellknown.network/agents/mcp-server-shield","links":{"self":"https://wellknown.network/agents/mcp-server-shield/record.json","html":"https://wellknown.network/agents/mcp-server-shield","markdown":"https://wellknown.network/agents/mcp-server-shield/record.md","api":"https://wellknown.network/api/v1/agents/mcp-server-shield","status":"https://wellknown.network/api/v1/agents/mcp-server-shield/status","claim":"https://wellknown.network/agents/mcp-server-shield/claim","claimApi":"https://wellknown.network/api/v1/claims","claimDescriptor":"https://wellknown.network/agents/mcp-server-shield/claim.json","badge":"https://wellknown.network/agents/mcp-server-shield/badge.svg","openapi":"https://wellknown.network/openapi.json","history":"https://wellknown.network/api/v1/agents/mcp-server-shield/history","tools":"https://wellknown.network/api/v1/agents/mcp-server-shield/tools"},"ard":{"identifier":"urn:air::server:mcp-server-shield","type":"application/mcp-server-card+json"},"kind":"mcp_server","declared":{"name":"mcp-server-shield","summary":"Author-side hardening primitives for Python MCP servers.","description":"# mcp-server-shield\n\n`mcp-server-shield` is a Python-first hardening library for MCP server authors. It is not\na scanner, gateway, proxy, or hosted security service. It protects the MCP tool function\nboundary directly: validate arguments before execution, use safe wrappers for dangerous\noperations, filter outputs before they reach the MCP client, lint tool descriptions, lock\ntool manifests, and emit structured audit logs.\n\nThe project is built for the way FastMCP and the official Python MCP SDK expose tools:\nordinary Python functions decorated as tools.\n\n## Install\n\n```bash\npip install mcp-server-shield\n```\n\nFor local development:\n\n```bash\npip install -e \".[dev]\"\n```\n\n## Quickstart\n\n```python\nfrom mcp_server_shield import ShieldPolicy, shield\nfrom mcp_server_shield.output_filters import PromptInjectionFilter, SecretRedactor\nfrom mcp_server_shield.validators import PathGuard, StringGuard, URLGuard\n\npolicy = ShieldPolicy.strict(\n    paths={\"file_path\": PathGuard(root=\"./workspace\", read=True, write=False)},\n    urls={\"url\": URLGuard(allowed_schemes=[\"https\"], allowed_hosts=[\"api.github.com\"])},\n    strings={\n        \"query\": StringGuard(\n            max_len=5000,\n            deny_substrings=[\"ignore previous instructions\"],\n        )\n    },\n    output_filters=[SecretRedactor(), PromptInjectionFilter()],\n)\n\n@shield(policy)\ndef read_file(file_path: str) -> str:\n    with open(file_path, encoding=\"utf-8\") as handle:\n        return handle.read()\n```\n\n## FastMCP Example\n\nUse `@shield(policy)` closest to the function so FastMCP sees the preserved signature and\nmetadata after the wrapper is applied:\n\n```python\nfrom fastmcp import FastMCP\nfrom mcp_server_shield import ShieldPolicy, shield\nfrom mcp_server_shield.validators import PathGuard\n\nmcp = FastMCP(\"secure-files\")\n\npolicy = ShieldPolicy.strict(\n    paths={\"file_path\": PathGuard(root=\"./workspace\", read=True, write=False)},\n)\n\n@mcp.tool()\n@shield(policy)\ndef read_file(file_path: str) -> str:\n    with open(file_path, encod…","publisher":{"name":"mcp-server-shield contributors","url":null},"homepage":"https://github.com/Trihedron1240/mcp-server-shield","repository":"https://github.com/Trihedron1240/mcp-server-shield","version":"0.1.0","license":"Apache-2.0","protocols":["mcp"],"tags":["fastmcp","hardening","mcp","model-context-protocol","security"],"pricing":null,"endpoints":[{"url":"pypi:mcp-server-shield","type":"package_pypi","auth":null,"probeable":false}],"skills":null,"tools":null,"extra":null,"attribution":{"kind":"pypi","name":"pypi","license":"pypi","repoUrl":"pypi","summary":"pypi","version":"pypi","description":"pypi","homepageUrl":"pypi","publisherName":"pypi"}},"derived":{"capabilities":[{"slug":"dev.filesystem","name":"Filesystem","confidence":0.802,"provenance":"derived"}],"categories":["dev"],"language":"en"},"observed":{"status":"unknown","statusReason":"Distributed as a package to run locally; no network endpoint to check.","lastOkAt":null,"lastProbedAt":null,"statusComputedAt":null,"reliability30d":null,"latestObservations":[],"tools":null,"package":{"name":"mcp-server-shield","registry":"pypi","observedAt":"2026-11-03T16:25:51.250Z","publishedAt":"2026-04-25T13:34:57.737701Z","latestVersion":"0.1.0"},"toolSurface":null,"endpointFacts":[]},"verification":{"claimed":false,"claimedAt":null,"proofs":[]},"provenance":{"sources":[{"source":"pypi","key":"mcp-server-shield","url":"https://pypi.org/project/mcp-server-shield/","firstSeenAt":"2026-09-10T04:22:22.773Z","fetchedAt":"2026-11-03T16:23:31.466Z","normalizedAt":"2026-11-03T16:23:31.466Z"}]},"firstSeenAt":"2026-09-10T04:22:22.773Z","updatedAt":"2026-11-03T16:25:51.250Z"}