humane-proxy — Claude Code MCP server: safety checks
Screens messages for self-harm and criminal intent before they reach an LLM. Use it to flag risky prompts and alert an operator.
claude mcp add humane-proxy -e OPENAI_API_KEY=<OPENAI_API_KEY> -e GROQ_API_KEY=<GROQ_API_KEY> -- uvx humane-proxyWhat humane-proxy does
humane-proxy checks each message before forwarding it to an upstream language model. A self-harm signal can trigger a block and a response with crisis contacts; suspected criminal intent is blocked or flagged. Safe messages continue to the model. In MCP mode, an agent can call check_message_safety, get_session_risk, and list_recent_escalations.
The checks can run through a cascade of heuristics, semantic embeddings, and an LLM reasoning stage. Embeddings require the onnx or ml extra, while the reasoning stage needs an API key. The base setup uses heuristics and SQLite storage, so those later stages are optional. For Claude Code, the setup command passes OPENAI_API_KEY and GROQ_API_KEY; checks that call those APIs depend on the corresponding keys being available.
What it helps with
- screen a prompt for self-harm before forwarding it to an LLM
- flag suspected criminal intent and notify an operator
- check an individual message with an MCP tool
- inspect session risk and recent escalations
Example prompts for the agent
- Check this message for safety with
check_message_safety. - Get the risk level for this session using
get_session_risk. - List recent escalations with
list_recent_escalations.
How to install humane-proxy
Platform CLI
claude mcp add humane-proxy -e OPENAI_API_KEY=<OPENAI_API_KEY> -e GROQ_API_KEY=<GROQ_API_KEY> -- uvx humane-proxyReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from humane-proxy <command>
Platform CLI
codex mcp add humane-proxy --env OPENAI_API_KEY=<OPENAI_API_KEY> --env GROQ_API_KEY=<GROQ_API_KEY> -- uvx humane-proxyReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from humane-proxy <command>
Config file
{
"mcpServers": {
"humane-proxy": {
"command": "uvx",
"args": [
"humane-proxy"
],
"env": {
"OPENAI_API_KEY": "<OPENAI_API_KEY>",
"GROQ_API_KEY": "<GROQ_API_KEY>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from humane-proxy <command>
Config file
{
"servers": {
"humane-proxy": {
"type": "stdio",
"command": "uvx",
"args": [
"humane-proxy"
],
"env": {
"OPENAI_API_KEY": "<OPENAI_API_KEY>",
"GROQ_API_KEY": "<GROQ_API_KEY>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from humane-proxy <command>
Platform CLI
gemini mcp add -e OPENAI_API_KEY=<OPENAI_API_KEY> -e GROQ_API_KEY=<GROQ_API_KEY> humane-proxy uvx humane-proxyReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from humane-proxy <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about humane-proxy
How do I install humane-proxy in Claude Code?
Run claude mcp add humane-proxy -e OPENAI_API_KEY=<OPENAI_API_KEY> -e GROQ_API_KEY=<GROQ_API_KEY> -- uvx humane-proxy. This registers the MCP server with the API-key variables.
What does humane-proxy do?
It screens messages for self-harm and criminal intent before forwarding them to an LLM. Risky messages are blocked or flagged, while safe ones pass through.
Which tools does the MCP server expose?
Agents can use check_message_safety, get_session_risk, and list_recent_escalations.