vpn-bypass-mcp
AGENTS.md1 starsChanged 5 days agoMITView on GitHub
MCP server (Go, stdio only, macOS only) for VPN Bypass. Each tool sends one request to the app's control socket and returns the app's result object unchanged. The app owns the contract. Its source of truth is in the VPN-Bypass repo: Sources/VPNBypassCore/CommandRouter.swift (Custom-mode verbs: status, mode, default, route.*, rule.*), ClassicControl.swift (the 4.9.0 domain.*, service.*, routes.*, refresh, dns.refresh and logs verbs; both hold their arguments and error codes), ControlSocketServer.swift (framing: one JSON line each way, 64 KiB per request line, 30…
- Commits and pushes
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,843 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
17 rules. About 0 are common, 4 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Every args value is a string.
- Very specific: line 12
Read verbs are listed in client.IsMutating.
- Very specific: line 20
Keep them apart in every description and doc.
- Very specific: line 25
Every tool has a row in cases in internal/tools/tools_test.go pinning the exact request line it sends.
- Very specific: line 49
Use bd for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists
- Very specific: line 50
Run bd prime for detailed command reference and session close protocol
- Very specific: line 51
Use bd remember for persistent knowledge — do NOT use MEMORY.md files
- Very specific: line 59
Conservative (default): Use bd for task tracking. Do not run git commits, git pushes, or Dolt remote sync unless explicitly asked.
- Very specific: line 60
Minimal: Keep tool instruction files as pointers to bd prime.
- Distinctive: line 61
Team-maintainer: Only when the repository explicitly opts in, agents may close beads, run quality gates, commit, and push as part of …
- Distinctive: line 67
File issues for remaining work: - Create beads for anything that needs follow-up
- Distinctive: line 85
Do not commit or push without clear authority from the active profile or the current user request.
- Distinctive: line 86
If a required sync or push is blocked, stop and report the exact command and error.
- Very specific: line 96
Use Beads (bd) for durable task tracking in repositories that include it.
- Very specific: line 110
Use bd for all task tracking.
- Very specific: line 111
Run bd prime when Beads context is missing or stale.
- Very specific: line 112
Keep persistent project memory in Beads via bd remember.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
vpn-bypass-mcp
MCP server (Go, stdio only, macOS only) for VPN Bypass. Each tool sends one request to the app's control socket and returns the app's result object unchanged.
The wire contract
The app owns the contract. Its source of truth is in the VPN-Bypass repo: Sources/VPNBypassCore/CommandRouter.swift (Custom-mode verbs: status, mode, default, route.*, rule.*), ClassicControl.swift (the 4.9.0 domain.*, service.*, routes.*, refresh, dns.refresh and logs verbs; both hold their arguments and error codes), ControlSocketServer.swift (framing: one JSON line each way, 64 KiB per request line, 30 s server timeout on reads, no timeout on mutations) and ControlSurface.swift. Read them before adding or changing a tool.
- Every
argsvalue is a string. Tools convert numbers and booleans ininternal/tools/args.go. - A proxy password travels in
secrets.passonly. It never appears in a result, an error message or a log line. - The result stays raw JSON (
json.RawMessage), so a field the app adds later reaches the agent with no change here. - Read verbs are listed in
client.IsMutating; every other verb counts as mutating, the same default the app uses. A new read verb goes into that list and into the tool'sReadOnlyflag, or read-only mode hides it. set_modesendsstatusfirst and sendsmodeonly when the app is in another mode (sameModeininternal/tools/status.go), matching what the app itself does from 4.9.0.- A tool that changes where traffic goes is
destructiveHint: true, adds included; onlyrefresh_dnsis a non-destructive write.TestDestructiveToolspins the list. A tool whose arguments name an outside host (a proxy) is alsoopenWorldHint: true. - Tool results are the app's JSON as text and as
structuredContent. An argument a tool does not declare is refused before anything is sent. - The domain, service,
routes.active,routes.clear,refresh,dns.refreshandlogsverbs exist from VPN Bypass 4.9.0. Older apps answerunknown_command, whichinternal/tools/tools.goturns into the 4.9.0 message.
Two meanings of "route"
Keep them apart in every description and doc. A kernel route is an entry the app installed in the macOS routing table (routes.active, routes.clear, refresh). A Custom-mode route is a named egress that rules point at (route.*, the custom_* tools).
Tests
go test -race ./...runs everything againstinternal/fakeapp, an in-process fake socket that records each request line.- Every tool has a row in
casesininternal/tools/tools_test.gopinning the exact request line it sends.TestEveryToolSendsTheContractRequestfails for a tool without a row. TestLiveReadOnlyruns against the real app when its socket exists on this Mac. It sends read verbs only. A test that talks to the real socket stays read-only: a mutating verb changes the live routing of the machine.- A new test earns trust by going red once: break the line it covers, watch it fail, restore the line by hand.
Releases
A v*.*.* tag runs .github/workflows/release.yml: GoReleaser builds darwin amd64 and arm64 binaries, signs them with a Developer ID certificate and notarizes them with Apple (secrets MACOS_SIGN_P12, MACOS_SIGN_PASSWORD, MACOS_NOTARY_ISSUER_ID, MACOS_NOTARY_KEY_ID, MACOS_NOTARY_KEY; a tag build missing any of them stops before GoReleaser), archives them, then npm publishes the wrapper (run.js, postinstall.js) with trusted publishing. postinstall.js downloads vpn-bypass-mcp_<version>_darwin_<arch>.tar.gz, so the archive name in .goreleaser.yaml and that script change together. package.json and server.json carry the version too, and the check-version job refuses a tag they disagree with. The MCP Registry job (.github/workflows/mcp-registry.yml) waits for npm to serve the new version before it publishes, through .github/scripts/wait-for-npm.sh; CI runs .github/scripts/wait-for-npm_test.sh against a fake curl.
<!-- BEGIN BEADS INTEGRATION v:1 profile:minimal hash:970c3bf2 -->Beads Issue Tracker
This project uses bd (beads) for issue tracking. Run bd prime to see full workflow context and commands.
Quick Reference
bd ready # Find available work
bd show <id> # View issue details
bd update <id> --claim # Claim work
bd close <id> # Complete workRules
- Use
bdfor ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists - Run
bd primefor detailed command reference and session close protocol - Use
bd rememberfor persistent knowledge — do NOT use MEMORY.md files
Architecture in one line: issues live in a local Dolt DB; sync uses refs/dolt/data on your git remote; .beads/issues.jsonl is a passive export. See https://github.com/gastownhall/beads/blob/main/docs/SYNC_CONCEPTS.md for details and anti-patterns.
Agent Context Profiles
The managed Beads block is task-tracking guidance, not permission to override repository, user, or orchestrator instructions.
- Conservative (default): Use
bdfor task tracking. Do not run git commits, git pushes, or Dolt remote sync unless explicitly asked. At handoff, report changed files, validation, and suggested next commands. - Minimal: Keep tool instruction files as pointers to
bd prime; use the same conservative git policy unless active instructions say otherwise. - Team-maintainer: Only when the repository explicitly opts in, agents may close beads, run quality gates, commit, and push as part of session close. A current "do not commit" or "do not push" instruction still wins.
Session Completion
This protocol applies when ending a Beads implementation workflow. It is subordinate to explicit user, repository, and orchestrator instructions.
- File issues for remaining work - Create beads for anything that needs follow-up
- Run quality gates (if code changed) - Tests, linters, builds
- Update issue status - Close finished work, update in-progress items
- Handle git/sync by active profile:
# Conservative/minimal/default: report status and proposed commands; wait for approval. git status # Team-maintainer opt-in only, unless current instructions forbid it: git pull --rebase bd dolt push git push git status - Hand off - Summarize changes, validation, issue status, and any blocked sync/commit/push step
Critical rules:
- Explicit user or orchestrator instructions override this Beads block.
- Do not commit or push without clear authority from the active profile or the current user request.
- If a required sync or push is blocked, stop and report the exact command and error.
<!-- END BEADS INTEGRATION -->Where the tracker syncs
This repo is public, so its tracker syncs only to the private remote named by sync.remote in .beads/config.yaml. The block above says sync uses "your git remote". Here that never means this GitHub repo. Don't add it as a Dolt remote and don't push refs/dolt/* to it.
<!-- BEGIN BEADS CODEX SETUP: generated by bd setup codex -->Beads Issue Tracker
Use Beads (bd) for durable task tracking in repositories that include it. Use the beads skill at .agents/skills/beads/SKILL.md (project install) or ~/.agents/skills/beads/SKILL.md (global install) for Beads workflow guidance, then use the bd CLI for issue operations.
Quick Reference
bd ready # Find available work
bd show <id> # View issue details
bd update <id> --claim # Claim work
bd close <id> # Complete work
bd prime # Refresh Beads contextRules
- Use
bdfor all task tracking; do not create markdown TODO lists. - Run
bd primewhen Beads context is missing or stale. Codex 0.129.0+ can load Beads context automatically through native hooks; use/hooksto inspect or toggle them. - Keep persistent project memory in Beads via
bd remember; do not create ad hoc memory files.
Architecture in one line: issues live in a local Dolt DB; sync uses refs/dolt/data on your git remote; .beads/issues.jsonl is a passive export. See https://github.com/gastownhall/beads/blob/main/docs/SYNC_CONCEPTS.md for details and anti-patterns.
<!-- END BEADS CODEX SETUP -->Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

