GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - 0xheycat/Purr-Verify-MCP: Self-hosted MCP verification and VPS operator runtime for AI agents, with durable jobs, isolated builds, browser QA, deployment, and redacted evidence.

BranchesTags
Open more actions menu

Latest commit

 

History

134 Commits
134 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
assets
assets
 
 
db
db
 
 
docs
docs
 
 
prisma
prisma
 
 
public
public
 
 
scripts
scripts
 
 
src
src
 
 
.env.example
.env.example
 
 
.env.local.example
.env.local.example
 
 
.gitignore
.gitignore
 
 
AGENTS.md
AGENTS.md
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
SKILL.md
SKILL.md
 
 
SPEC.md
SPEC.md
 
 
bun.lock
bun.lock
 
 
components.json
components.json
 
 
eslint.config.mjs
eslint.config.mjs
 
 
next.config.ts
next.config.ts
 
 
package.json
package.json
 
 
postcss.config.mjs
postcss.config.mjs
 
 
render.yaml
render.yaml
 
 
tailwind.config.ts
tailwind.config.ts
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

Purr Verify MCP

Purr Verify MCP

Private verification and operator control plane for coding agents.

runtime framework language transport mode stars project license

Purr Verify MCP gives agents a real runtime: fresh GitHub clone verification, exact local working-tree verification, private VPS project inspection, server-owned environment profiles, durable logs, and deployment-oriented operator jobs.

It is built for a private single-owner setup where the tool should remove friction, not create ceremony. Secrets stay server-side, logs stay redacted, and long-running verification is a first-class workflow.


Current Capabilities

  • ChatGPT-compatible MCP endpoint at /mcp.
  • OAuth metadata and resource-bound access tokens for connector use.
  • REST API for health, job creation, job status, streaming, sharing, and cancellation.
  • Fresh repository verification from https://github.com/<owner>/<repo>.git.
  • Exact local project inspection and verification on the VPS.
  • Opaque binary connector-file upload to absolute server paths with streaming SHA-256 verification and atomic replacement.
  • Managed npm run dev-style work sessions paired with persistent Pursr browser state.
  • Browser snapshots, actions, direct-to-model PNG evidence, element inspection, diagnostics, and optional WebM recording.
  • Project discovery across common private VPS roots.
  • Runtime inspection for PM2, systemd, Docker Compose, and matching processes.
  • Environment inventory from dotenv, PM2, systemd, Compose, and process env.
  • Server-side environment aliases with @server:<alias>.
  • Server-owned environment profiles selected by public label.
  • Durable job history with SQLite WAL.
  • Async routing for heavy work and long-running fork/soak/smoke verification.
  • Private-friendly timeout defaults with configurable caps.
  • Redacted logs, redacted job records, and temporary share links.

Architecture

flowchart LR
  Agent[ChatGPT / Codex / Agent] --> MCP[POST /mcp]
  Agent --> REST[REST API]
  MCP --> Auth[Server token or OAuth JWT]
  REST --> Auth
  Auth --> Router[Execution router]
  Router --> Clone[Fresh GitHub clone]
  Router --> Local[Local VPS project]
  Clone --> Runner[Command runner]
  Local --> Operator[Operator jobs]
  Agent --> Upload[Connector file upload]
  Upload --> Local
  Local --> Work[Managed dev server]
  Work --> Pursr[Pursr browser session]
  Pursr --> Artifacts[PNG / WebM / diagnostics]
  Runner --> History[Redacted durable history]
  Operator --> History
  Profiles[Server env aliases and profiles] --> Runner
  Profiles --> Operator
Loading

Core principle: the client sends intent and safe public selectors; the server owns credentials, runtime paths, timeout policy, and durable evidence.


Quickstart

git clone https://github.com/0xheycat/Purr-Verify-MCP.git
cd Purr-Verify-MCP
cp .env.example .env
bun install --frozen-lockfile
bun run dev

Health:

curl http://localhost:3000/api/health

MCP endpoint:

http://localhost:3000/mcp

Production endpoint:

https://verify.yourdomain.com/mcp

Production Environment

Minimum single-owner production shape:

NODE_ENV=production
PUBLIC_BASE_URL=https://verify.yourdomain.com

AUTH_MODE=server_token
VERIFY_TOKEN=
GITHUB_TOKEN=
ALLOW_ALL_REPOS=true

OAUTH_ISSUER=https://verify.yourdomain.com
OAUTH_RESOURCE_URL=https://verify.yourdomain.com/mcp
OAUTH_OWNER_CODE=
OAUTH_PRIVATE_KEY=
OAUTH_ACTIVE_KEY_ID=prod-ed25519-2026-07
OAUTH_CLIENT_ID=chatgpt-purr-verify
OAUTH_SCOPES_SUPPORTED=verify:read verify:run verify:share
OAUTH_TOKEN_TTL_SECONDS=6048000
OAUTH_REFRESH_TOKEN_TTL_SECONDS=2592000
OAUTH_SUBJECT=0xheycat
OAUTH_STORAGE_MODE=json

VERIFY_DATA_DIR=/var/lib/purr-verify/data
WORKDIR_BASE=/var/lib/purr-verify/workspaces
TOOLCHAIN_CACHE_DIR=/var/lib/purr-verify/toolchains

MAX_CONCURRENT_JOBS=1
COMMAND_TIMEOUT_MS=600000
JOB_TIMEOUT_MS=1800000
MAX_LONG_RUN_TIMEOUT_MS=31536000000
MAX_LOG_BYTES=500000
CLEANUP_AFTER_MS=3600000

Private operator defaults are intentionally broad. You can still narrow them with env if you want stricter behavior later.


Server Environment Aliases

Use aliases when a job needs a secret or private runtime value but the client should not send the value.

# Format: <alias>=<server environment key>, comma-separated
VERIFY_SERVER_ENV_REF_ALLOWLIST=runtime_credential=VERIFY_RUNTIME_CREDENTIAL,runtime_rpc_url=VERIFY_RUNTIME_RPC_URL
VERIFY_RUNTIME_CREDENTIAL=
VERIFY_RUNTIME_RPC_URL=

Client request:

{
  "env": {
    "RUNTIME_API_KEY": "@server:runtime_api_key"
  }
}

The resolved value exists only in runtime memory. Alias source keys and resolved values are not returned by discovery, job records, logs, snapshots, or share links.


Server Environment Profiles

Profiles group runtime configuration behind one public label. This is the preferred workflow for repeatable private verification.

VERIFY_SERVER_ENV_PROFILES='{
  "shared_node_ci": {
    "NODE_ENV": "test",
    "CI": "true"
  },
  "purrliquid_fork_smoke": {
    "PURR_ENV": "fork",
    "PURR_LLM_ENABLED": "true",
    "PURR_LLM_PROVIDER": "custom",
    "PURR_RUNTIME_API_KEY": "@server:runtime_api_key",
    "SOLANA_FORK_RPC": "@server:runtime_rpc_url"
  }
}'

Client request:

{
  "env": {
    "VERIFY_SERVER_ENV_PROFILE": "shared_node_ci"
  }
}

The profile selector is consumed before execution and does not reach the child process. Explicit env values can be supplied beside a profile as long as they do not conflict with profile-owned keys.

Discovery tool:

purr_list_server_env_profiles

It returns only profile labels and safe diagnostics. Environment keys and values are omitted.


MCP Tools

High-level groups:

Group Tools
Operating guide read_operating_guide, health_check, list_allowed_commands
Repository verification create_verification_job, get_verification_job, list_verification_jobs, cancel_verification_job
History and logs search_verification_history, get_latest_verification, get_verification_summary, compare_verification_jobs, get_job_log_chunk, search_job_logs
Sharing create_share_link, list_share_links, revoke_share_links
Private project inspection purr_discover_projects, purr_inspect_project, purr_inspect_runtime, purr_inspect_environment, purr_plan_deployment
Private operator jobs purr_run_command, purr_verify_project, purr_create_deploy_snapshot, purr_deploy_project, purr_restart_service, purr_check_health, purr_rollback_deployment, purr_get_job_status, purr_get_job_logs, purr_cancel_job
Binary file transfer purr_upload_file
Pursr browser work purr_browser_doctor, purr_work_session_start, purr_work_sessions, purr_work_session_status, purr_work_session_snapshot, purr_work_session_act, purr_work_session_screenshot, purr_work_session_inspect, purr_work_session_diagnostics, purr_work_session_close
Server env discovery purr_list_server_env_aliases, purr_list_server_env_profiles

Example: Fresh Clone Verification

{
  "repo": "0xheycat/Purr-Verify-MCP",
  "ref": "main",
  "expected_head": "8fd9e81108affba094a0bdadfd86287f97b0372c",
  "mode": "async",
  "commands": [
    "bun install --frozen-lockfile",
    "bun test --isolate --timeout 20000",
    "bun run typecheck",
    "bun run lint",
    "bun run build"
  ],
  "env": {
    "VERIFY_SERVER_ENV_PROFILE": "shared_node_ci"
  }
}

Example: Local VPS Project Verification

{
  "cwd": "/root/purr-verify",
  "verifyCommands": [
    "bun test --isolate --timeout 20000",
    "bun run build"
  ],
  "environmentOverrides": {
    "VERIFY_SERVER_ENV_PROFILE": "shared_node_ci"
  }
}

For generic local commands, prefer argv:

{
  "cwd": "/root/purr-verify",
  "argv": ["bun", "test", "--isolate", "--timeout", "20000"],
  "timeoutMs": 7200000
}

Timeout overrides automatically opt into long-run handling. You do not need to remember a separate flag.


Example: Binary Connector File Upload

Attach any file in ChatGPT, calculate or provide its expected SHA-256, then call:

{
  "file": "<local connector file>",
  "destination": "/opt/example/artifacts/model.bin",
  "sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
  "mode": "auto"
}

purr_upload_file treats the input as opaque bytes. It does not restrict extension, MIME type, or file size at the application layer. With mode: "auto", both ChatGPT connector downloads and mounted server-local files return immediately with a durable jobId; poll purr_get_job_status, inspect bounded progress with purr_get_job_logs, or stop the transfer with purr_cancel_job. Use mode: "sync" only for a deliberately short transfer.

Identical retries for the same normalized destination and SHA-256 reuse one active upload job instead of starting duplicate streams. Destination ownership is protected by an on-disk lock as well as the in-process map, so concurrent server processes cannot write the same path. A different hash is rejected while that destination is owned. Interrupted ownership is reclaimed as soon as the recorded process is gone or its durable job is terminal, without waiting for a fixed multi-hour timeout.

When the destination already contains the expected bytes, the tool verifies and reuses it without downloading again. Transfers use one-megabyte backpressure windows, request identity encoding, keep memory bounded, create parent directories, remove stale same-destination upload temporaries only while holding destination ownership, flush file data before rename, and atomically replace the destination only after the complete SHA-256 matches. A mismatch or cancellation removes the temporary file and leaves the previous destination unchanged.

The actual maximum transferable size is therefore determined by available disk space, filesystem support, connector availability, and surrounding network or platform infrastructure rather than a Verify MCP byte cap. Uploads no longer depend on the MCP request remaining open for the full transfer.


Example: Browser Work Session

First inspect browser readiness:

purr_browser_doctor

Then start the project's real dev command and attach Pursr:

{
  "cwd": "/opt/Heycatlab",
  "sessionId": "heycatlab-ui",
  "argv": ["npm", "run", "dev"],
  "port": 3000,
  "browserMode": "headless",
  "browserRequired": false
}

Use the returned sessionId with snapshot, act, screenshot, inspect, and diagnostics tools. purr_work_session_screenshot returns PNG image content directly to the model and retains the server-side artifact path. Close the session when finished:

{ "sessionId": "heycatlab-ui" }

Pursr owns browser discovery and the browser-agent implementation. Verify MCP only manages the project process, lifecycle, evidence routing, and ChatGPT-facing tools. When Chrome is missing, the default is a usable dev-server-only session with an actionable warning; set browserRequired=true only when the workflow cannot proceed without browser attachment.

Server setup:

# Optional when automatic discovery does not find the preferred browser.
PURSR_BROWSER_PATH=/usr/bin/chromium
PURR_WORK_SESSION_STARTUP_TIMEOUT_MS=120000

Private Operator Defaults

Current private-friendly defaults:

MAX_LONG_RUN_TIMEOUT_MS default: 365 days
VERIFY_ENV_MAX_KEYS default: 500
VERIFY_ENV_MAX_VALUE_LENGTH default: 65536
Project discovery depth default/max: 5 / 16
Project discovery cap default/max: 250 / 2000

Project discovery defaults include:

/opt /srv /var/www /home /root /mnt /data /var/lib /usr/local /workspace /tmp

You can override discovery roots with:

PURR_OPERATOR_ROOTS=/root,/srv,/opt,/data

Security Boundaries

The private mode removes needless friction, not the core safety contract.

Still enforced:

  • Secret values are redacted from logs and durable evidence.
  • Git remotes returned by project inspection are sanitized before output.
  • Profile contents, source env keys, and resolved values are not exposed by discovery.
  • Loader-sensitive env keys are reserved: PATH, NODE_PATH, NODE_OPTIONS, LD_PRELOAD, LD_LIBRARY_PATH, DYLD_INSERT_LIBRARIES.
  • Destructive command classes require explicit confirmation.
  • Auto-mode uploads always use durable async jobs, deduplicate identical destination+SHA retries across process boundaries, reclaim interrupted ownership safely, reject conflicting active hashes, and never persist signed download URLs.
  • Binary upload requires a caller-supplied SHA-256 and uses a same-directory temporary file plus atomic rename; checksum failure never replaces the destination.
  • Binary upload does not apply extension, MIME, or application-level byte caps; practical limits remain disk, filesystem, connector, and network capacity.
  • Self-hosted systemd restart uses an external delayed handoff so the durable job journal and project lock finish before the Verify MCP process is replaced; post-restart health is verified in a follow-up call.
  • Browser actions remain explicit MCP calls and are marked as potentially side-effecting; current state can be read back through snapshot, screenshot, and diagnostics.
  • Browser absence degrades gracefully by default instead of stopping a usable dev server.
  • Workspaces and job caches are disposable after terminal execution.
  • OAuth refresh credentials are stored as hashes and rotate on use.

REST API

curl https://verify.yourdomain.com/api/health

Create a job:

curl -X POST https://verify.yourdomain.com/api/verify \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "repo":"0xheycat/Purr-Verify-MCP",
    "ref":"main",
    "mode":"async",
    "commands":["bun install --frozen-lockfile","bun run build"]
  }'

Poll a job:

curl -H "Authorization: Bearer <token>" \
  https://verify.yourdomain.com/api/verify/<jobId>

Deployment

Recommended single-instance deployment:

Caddy or reverse proxy -> Next standalone app -> SQLite WAL history -> local workspaces

Build and restart flow:

bun install --frozen-lockfile
bun test --isolate --timeout 20000
bun run typecheck
bun run lint
bun run build
systemctl restart purr-verify

Use a persistent data directory:

VERIFY_DATA_DIR=/var/lib/purr-verify/data
WORKDIR_BASE=/var/lib/purr-verify/workspaces

Troubleshooting

Tool schema is stale in ChatGPT

Deploy latest main, restart the service, then refresh the connector schema in ChatGPT. OAuth reconnect is usually not required when scopes are unchanged.

Alias is listed but unavailable

The public alias exists but the backing server env key is missing or empty. Provision the backing key in the service environment, restart the service, then retry.

Profile list is empty

Set VERIFY_SERVER_ENV_PROFILES on the server and restart. The discovery tool intentionally returns labels only, never profile contents.

Job times out too early

Use explicit timeout overrides. They automatically opt into long-run handling:

{
  "command_timeout_ms": 7200000,
  "job_timeout_ms": 7200000
}

Build fails only in production checkout

Run the full suite with isolation and a realistic timeout:

bun test --isolate --timeout 20000

Some Prisma-backed tests can be sensitive to production .env if run without isolation.


Project Map

src/lib/verify/mcp.ts                      MCP tool surface and verification jobs
src/lib/verify/operator-mcp.ts             Private project inspection tools
src/lib/verify/operator-mutation-mcp.ts    Private operator mutation tools
src/lib/verify/server-env-ref.ts           Server env aliases and profiles
src/lib/verify/executor.ts                 Fresh clone verification runner
src/lib/verify/operator-executor.ts        Local VPS operator job runner
src/lib/verify/browser-work.ts             Managed dev server + Pursr session lifecycle
src/lib/verify/browser-work-mcp.ts         ChatGPT-facing browser work tools and image results
src/lib/verify/file-upload-mcp.ts          Streaming connector-file upload and atomic SHA-256-verified replacement
src/lib/verify/history-db.ts               SQLite WAL durable history
src/lib/verify/oauth-server.ts             OAuth authorization and token exchange
src/lib/verify/oauth-state.ts              JSON / Prisma OAuth state backends
src/lib/verify/operating-guide.ts          Agent-facing operating guide

License

MIT


Contributing

PRs welcome good first issues

Contributions are welcome and appreciated! 🐾

  • 📖 Read the Contributing guide and Code of Conduct.
  • 🌱 New here? Look for good first issue.
  • 💬 Ideas & questions → Discussions.

Keywords

purr-verify-mcp · mcp · model-context-protocol · mcp-server · verification · ci-cd · ai-agents · coding-agents · chatgpt-connector · codex · vps · devops · deployment · browser-qa · playwright · bun · nextjs · typescript · oauth · self-hosted · automation

About

Self-hosted MCP verification and VPS operator runtime for AI agents, with durable jobs, isolated builds, browser QA, deployment, and redacted evidence.

0xheycat.xyz/work/purr-verify

Topics

ai-agentsautomationbrowser-qabunchatgpt-connectorci-cdcodexcoding-agentsdeploymentdevopsmcpmcp-servermodel-context-protocolnextjsoauthplaywrightself-hostedtypescriptverificationvps

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.