Metadata-Version: 2.4
Name: guard-core-mcp
Version: 0.1.3
Summary: MCP server for the Guard ecosystem — config validation, docs search and live threat detection for fastapi-guard, guard-core and guard-agent.
Project-URL: Homepage, https://github.com/rennf93/guard-core-mcp
Author-email: Renzo Franceschini <rennf93@users.noreply.github.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Security
Requires-Python: <3.15,>=3.10
Requires-Dist: mcp
Requires-Dist: pydantic
Provides-Extra: dev
Requires-Dist: bandit[toml]; extra == 'dev'
Requires-Dist: deptry; extra == 'dev'
Requires-Dist: fastapi-guard; extra == 'dev'
Requires-Dist: guard-agent; extra == 'dev'
Requires-Dist: guard-core; extra == 'dev'
Requires-Dist: mkdocs; extra == 'dev'
Requires-Dist: mkdocs-material; extra == 'dev'
Requires-Dist: mkdocstrings; extra == 'dev'
Requires-Dist: mkdocstrings-python; extra == 'dev'
Requires-Dist: mypy; extra == 'dev'
Requires-Dist: pip-audit; extra == 'dev'
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: pymarkdownlnt; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-asyncio; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: radon; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Requires-Dist: safety; extra == 'dev'
Requires-Dist: semgrep; extra == 'dev'
Requires-Dist: vulture; extra == 'dev'
Requires-Dist: xenon; extra == 'dev'
Description-Content-Type: text/markdown

# Guard Core MCP

An [MCP](https://modelcontextprotocol.io) server that lets AI coding agents answer questions
about the Guard security ecosystem from the libraries themselves, instead of from memory.

Covers [`fastapi-guard`](https://github.com/rennf93/fastapi-guard),
[`guard-core`](https://github.com/rennf93/guard-core) and
[`guard-agent`](https://github.com/rennf93/guard-agent).

## Why

Your agent can already read the docs. What it cannot do is tell you that the `redis_failopen`
in your config is silently doing nothing because the real field is `redis_fail_open`, or that
the flag you are reaching for did not exist until guard-core 3.5.0, or whether a given request
would actually be blocked and by which pattern.

This server answers those from the installed package: real pydantic validation, real field
metadata, and the real detection engine.

## Install

Install it **into your project's environment**, not as an isolated tool:

```bash
uv add --dev guard-core-mcp
claude mcp add guard-core -- uv run guard-core-mcp
```

`uvx guard-core-mcp` will start, but an isolated environment contains no `guard-core` or
`fastapi-guard` for it to introspect, so it can only answer from bundled documentation. Running
it inside your own environment is what makes the answers match the versions you actually ship.

## Tools

| Tool | Answers |
|---|---|
| `versions` | Which Guard libraries are installed here, and at what version |
| `validate_config` | Is this config valid — including typo'd keys pydantic silently ignores |
| `config_fields` | What is this setting, what does it default to, does a setting for X exist |
| `search_docs` | Where do the docs cover this |
| `get_doc` | The full text of one documentation page |
| `check_payload` | Would this request be blocked, and by which pattern |

## Licence

MIT
