Cornea, deterministic visual inspection
mcpotherio.github.AbduljabbarBXR/cornea · v0.2.2
Deterministic visual inspection for AI agents. Overlap, overflow, contrast, quality.
run it
on your own machines, one way per deploy methodgenerated from the record, not tested yet
# once, as root:
cargo install --locked cornea --version 0.2.2 --root /usr/local
# as_mcp DIR COMMAND...: runs COMMAND as the mcp user in DIR, its home, sandboxed as the
# units are: a package's install scripts can write to DIR only, as the server later can
as_mcp() {
local dir="$1"; shift
systemd-run --quiet --wait --pipe --collect --uid=mcp --gid=mcp \
-p WorkingDirectory="$dir" -p Environment=HOME="$dir" -p ReadWritePaths="$dir" \
-p NoNewPrivileges=true -p ProtectSystem=strict -p ProtectHome=true -p PrivateTmp=true \
-- "$@" </dev/null
}
install -d -m 0750 -o mcp -g mcp /var/lib/mcp/cornea
# cornea: its packages, installed whole before its unit starts (no session installs)
systemctl stop mcp-my-agent-cornea.service 2>/dev/null || true
as_mcp /var/lib/mcp/cornea uv tool install mcp-proxy
#!/usr/bin/env bash
# cornea (io.github.AbduljabbarBXR/cornea), recipe baremetal (generated).
# Generated by Hub for toolset "my-agent"; started by mcp-my-agent-cornea.service.
set -euo pipefail
export HOST=127.0.0.1 PORT=8101
exec uvx mcp-proxy --host 127.0.0.1 --port 8101 --pass-environment -- cornea
[Unit]
Description=MCP server cornea (toolset my-agent), generated by Hub
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=mcp
Group=mcp
EnvironmentFile=/etc/mcp/my-agent.env
Environment=HOME=/var/lib/mcp/cornea
WorkingDirectory=/var/lib/mcp/cornea
ExecStart=/opt/mcp/my-agent/bin/cornea.sh
Restart=on-failure
RestartSec=5
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
PrivateTmp=true
ReadWritePaths=/var/lib/mcp/cornea
[Install]
WantedBy=multi-user.target
connect to it
copy what your client needscornea
{
"mcpServers": {
"cornea": {
"command": "cornea",
"args": []
}
}
}
#!/usr/bin/env bash # Registers every server with Claude Code (run once; `claude mcp list` to check). set -euo pipefail set -a; [ -f .env ] && source .env; set +a claude mcp add cornea -- cornea
{
"mcpServers": {
"cornea": {
"command": "cornea",
"args": []
}
}
}
{
"servers": {
"cornea": {
"type": "stdio",
"command": "cornea",
"args": []
}
}
}
name: my-agent target: local servers: - hub: io.github.AbduljabbarBXR/cornea
- not probed yet: tools unpinned, ingest lists them
tools
Not probed yetThe tools appear once the hub or its worker has listed this entry. Running it still works: your client lists them on first start.