aki-mcp-sv: Instructions file for Claude Code

CLAUDE.md

aki-mcp-sv CLAUDE.md is an instructions file for Claude Code from lacvietanh/aki-mcp-sv. It costs 2,577 tokens per session, scanned A, original, MIT.

Repository guidance for Aki MCP Server, a local server that gives Claude and ChatGPT access to files, search, shell commands, and other agent functions over a secured connection. It also documents its OAuth login flow and Tailscale networking.

In plain words
What is it for?
Use it when starting the server, troubleshooting client connections, checking OAuth requests, resetting Tailscale exposure, or working on the bridge and rule-loading code.
Why use it?
It separates connection failures caused by the public network setup from failures in the server code and records the expected process lifecycle.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is lacvietanh/aki-mcp-sv's own configuration. It tells Claude Code how to work on aki-mcp-sv itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything aki-mcp-sv configures →

Reuse

Borrowing it

Nothing to install: this file belongs to lacvietanh/aki-mcp-sv. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/lacvietanh/aki-mcp-sv/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/lacvietanh/aki-mcp-sv

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for aki-mcp-sv CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/lacvietanh/aki-mcp-sv/claude-md/github.svg)](https://agentmods.dev/instructions/lacvietanh/aki-mcp-sv/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/lacvietanh/aki-mcp-sv/claude-md"><img src="https://agentmods.dev/badge/instructions/lacvietanh/aki-mcp-sv/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for aki-mcp-sv CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/lacvietanh/aki-mcp-sv/claude-md"><img src="https://agentmods.dev/badge/instructions/lacvietanh/aki-mcp-sv/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,577 This file is loaded in full into every session.
When invoked 2,577 The same file — it is already loaded in full.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02577 $0.02577
Opus 5.5 $0.01031 $0.01031
Sonnet 5.5 $0.00515 $0.00515
Haiku 4.5 $0.00258 $0.00258

Measured 6d ago against content hash 3f0efaa80535, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

aki-mcp-sv CLAUDE.md scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **Do not trust local `curl https://$HOST`** — macOS WireGuard mesh (`100.100.100.100`) returns a false 200. Always probe the public IP via `--resolve`:
CLAUDE.md · 78 lines

How it starts

The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.

aki-mcp-sv — project guidance

Local MCP server (filesystem, search, shell, agy) for claude.ai & ChatGPT over Tailscale Funnel + OAuth 2.1. Entry: npm start → scripts/start.js (foreground, manual stop/start). Rule loader: akirule skill.

RECURRING #1 — "Couldn't connect" / no POST /token: Tailscale Funnel desync, NOT the code

Signature: npm start is healthy, funnel status says "on", but client reports "Couldn't connect" and gatekeeper stops at POST /authorize -> 302 with no POST /token. The local serve-config did not sync to Tailscale's public edge; external calls fail at the TLS layer.

  • Do not debug scripts/oauth.js or scripts/gatekeeper.js — OAuth & bridge code are correct.
  • Do not trust local curl https://$HOST — macOS WireGuard mesh (100.100.100.100) returns a false 200. Always probe the public IP via --resolve:
    HOST=$(tailscale status --json | jq -r .Self.DNSName | sed 's/\.$//'); PUB=$(dig @8.8.8.8 $HOST +short | head -1)
    curl --resolve $HOST:443:$PUB https://$HOST/.well-known/oauth-authorization-server   # exit 35 / 000 = desync
    
  • Reset cycle:
    tailscale funnel --https=443 off && tailscale serve reset && tailscale funnel --bg 9999
    
  • Bypass / Ingress precedence: --tunnel <cred.json> (Cloudflare) > PUBLIC_ORIGIN > Tailscale Funnel.

Two client paths, one OAuth server

scripts/oauth.js serves both without handler-level branching:

  • Claude, ChatGPT, Grok, Gemini, Notion, ClickUp: URL + passphrase only; they self-register via RFC 7591 DCR (POST /register), PKCE only, stored in oauth-dcr-clients.json.
  • Pre-issued confidential client in oauth-client.json (client_secret_post): any client that wants a static client; scripts/start.js prints its ID/secret.
  • Bearer clients (Buda): no DCR, so they send the shared access token as Authorization: Bearer; no OAuth code involved, and Roll token breaks them until the new token is set again.
  • Invariants: resolveClient() is the single SSoT lookup for both. Redirect URIs are strictly allowlisted in isAllowedRedirect (claude.ai, chatgpt.com, oauth-redirect*.googleusercontent.com, grok.com, Notion hosts, the ClickUp callback). Auth codes and refresh tokens are bound to their issuing client ID.

Read the full file on GitHub · 78 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago Changed · +9 tokens per session 3f0efaa80535
  2. 12d ago Changed · +9 lines · +525 tokens per session 636e1bb041be
  3. 1mo ago Changed · +17 lines · +621 tokens per session 97bcc929ce52
  4. 1mo ago Changed · +1 lines · +47 tokens per session 124df955190d
  5. 1mo ago Changed · -8 tokens per session 240a985e6829
  6. 1mo ago Changed 6d290fa6a789
  7. 1mo ago Changed · +68 tokens per session b4c50daf35ca
  8. 2mo ago Changed · +144 tokens per session 91efc9e744d3
  9. 2mo ago First seen · 51 lines · 1,171 tokens per session scan A 067690024f78

Subscribe to this mod's changes

aki-mcp-sv CLAUDE.md is an instructions file published in the GitHub repository lacvietanh/aki-mcp-sv (145 stars, last pushed 3d ago), licensed MIT. It adds 2,577 tokens to every session, about $0.0103 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

aki-mcp-sv CLAUDE.md compared with instructions from other repositories

aki-mcp-sv CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
aki-mcp-sv CLAUDE.mdlacvietanh/aki-mcp-svInstructions file1453d agoMITA2,577Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode