
AsItIs
io.github.Katta041由 GitHub 帳號 Katta041 發布v0.3.0更新於 Oct 27, 2026
Read-only MCP server for markdown and agent steering files: read, outline, lint, context budget.
概覽
唯讀 MCP 伺服器,讓助理讀取、產生大綱、檢查並估算 markdown 與 AI 代理引導檔(如 CLAUDE.md、AGENTS.md、SKILL.md)的上下文預算。
- 可以做什麼
- 依原始位元組讀取 markdown 檔,提供編碼、換行、空白與雜湊資訊,大檔可分頁
- 擷取標題大綱並標出行號,略過 frontmatter 與程式碼區塊
- 檢查引導檔:frontmatter、長度上限、失效連結、不可見字元、隱藏指令、重複與跨檔漂移
- 估算各代理每次工作階段載入的上下文 token 數,依檔案與依工具統計
- 依載入時機列出引導檔,並以 diff 形式提出機械性修正建議,標示安全或需複核
- 適用情境
- 適合維護代理指令檔的人,讓助理在不改動檔案的前提下檢查臃腫、矛盾、隱藏或不可見文字以及廠商長度限制。也適合透過隨附的命令列工具在 CI 或 pre-commit 中檢查同類檔案。
- 執行需求
- 以 npx 從 npm 套件啟動的本機程序,需要 Node 22.13 或更新版本。啟動時須提供可讀取的絕對路徑 --root(可重複,或用 ASITIS_MCP_ROOT)。不需帳號、API 金鑰或網路。建議固定版本號,不要使用 latest。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 AsItIs,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
@asitis/mcp
Read-only MCP server for markdown and AI agent steering files. From AsItIs, the markdown editor that never rewrites your file. MIT licensed. Source, issues and the Claude Code plugin: github.com/Katta041/asitis-agent-tools.
It gives your coding agent six tools to read, outline, lint, budget and suggest fixes for CLAUDE.md, AGENTS.md, GEMINI.md, SKILL.md, subagents, commands, rules, Cursor .mdc rules, Copilot instructions and memory files, without being able to change any of them. The same package has an asitis command for CI and pre-commit.
- No writes. There is no write, patch or delete tool, and no write code in the package.
- No network. No telemetry, no update check, no remote calls. It speaks MCP over stdio only.
- Your folder only. It reads only markdown files under the folder (or folders) you start it with, plus its own
.asitisrc.jsonand the root.gitmodules, unless a call asks for the opt-in skill or config scan.
Install
Requires Node 22.13 or later. Always pin the version; never use @latest in an agent config. MCP clients start servers outside your project, so give --root as an absolute path.
Check that it runs:
Claude Code
Run this in your project folder:
Or install the Claude Code plugin, which adds a byte-clean editing skill, /asitis:md-lint, /asitis:md-budget and an optional guard hook, and runs this server under Node's permission model:
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows:
Cursor
.cursor/mcp.json in the project (or ~/.cursor/mcp.json):
If your Cursor version does not expand ${workspaceFolder}, use an absolute path. The server refuses a root that still contains ${...} rather than guessing.
VS Code
.vscode/mcp.json in the project (Copilot agent mode). VS Code uses the servers key, not mcpServers:
Codex (CLI, IDE and desktop)
~/.codex/config.toml:
Gemini CLI
.gemini/settings.json in the project (or ~/.gemini/settings.json):
Hardened: Node's permission model
Run the file directly under Node's permission model so Node itself denies writes and child processes (and network access on Node 25 and later):
In a client config, command is node and every other word goes in args, in the same order. Replace $(npm root -g) with the folder that command prints, because configs do not run shell commands.
If a desktop app cannot find npx or node, use its full path (run which npx, or where npx on Windows) as the command.
CLI and CI
The package also has an asitis command for scripts, CI and pre-commit. It lints the same way as lint_steering and exits 0 (clean), 1 (findings at or above --fail-on, default error), 2 (something you can fix, one line on stderr) or 3 (a bug in asitis).
Formats: text, json, sarif (the standard report format GitHub code scanning reads) and github (pull request annotations). With github, only errors and warnings become annotations; add --annotate-notes to annotate notes as well. It never writes a file; --fix-preview prints a diff and you decide whether to apply it. asitis lint --help and asitis budget --help list each command's options.
That run exits 0: with the default --fail-on error only errors fail the build. Planted invisible or bidirectional characters, and hidden comments that tell the agent to ignore instructions, hide something, run a command or reach for secrets, are errors, so they fail the build by default. Pass --fail-on warning to fail on warnings too.
GitHub Action. Runs the bundled CLI with no npm install and puts findings on the pull request:
pre-commit. Lints only the staged steering files:
docs/ci.md covers the Action's inputs and SARIF upload, lefthook, husky and GitLab CI. Every flag and exit code is in docs/cli-contract.md.
Config
Put an .asitisrc.json at the project root. Everything is optional:
A typo stops the run with the file, line and a suggestion (.asitisrc.json line 2: unknown key "rulez" (did you mean "rules"?)).
To silence one finding, put a comment above it with the rule id: <!-- asitis-disable-next-line duplicate-rule -- the two sections are alternatives -->, or asitis-disable-file for the whole file. The reason after -- is optional; when you give one it is carried into the JSON and SARIF output. The rule id is the word after the severity in each finding, and docs/rules/ lists them all. Security rules (hidden instructions, invisible characters, the sec-* rules) cannot be silenced by a comment, since a comment is exactly what an attacker would add; turn them off in .asitisrc.json or a baseline, where it shows in review. For an existing repo, asitis lint --format json --write-baseline > .asitis-baseline.json and then --baseline .asitis-baseline.json reports only new findings.
Every rule has a page with examples: docs/rules/.
Tools
Every tool is annotated readOnlyHint: true, destructiveHint: false, openWorldHint: false. Tool results carry no link to asitis.app unless you ask for one: with --footer (or ASITIS_MCP_FOOTER=1) the first result of each session ends with one line, Edit these files without rewriting them: https://asitis.app/?ref=mcp, and later results and errors do not repeat it. --no-footer is still accepted and changes nothing. Results are text only. Pass --structured (or set ASITIS_MCP_STRUCTURED=1) to also get each result as JSON in structuredContent, for scripts. It is off by default because Claude Code 2.1 gives the model the JSON instead of the text when both are present, which drops the untrusted-content notice and, for read_markdown, the file text.
Vendor limits checked, with sources in src/limits.ts:
Privacy
- The server and the CLI make no network connections and have no network code. They collect nothing and send nothing.
- They never write, rename or delete a file, and create no temp files. Fixes come back as a diff; applying one is up to you or your assistant.
- By default only markdown steering files,
.asitisrc.jsonand, when a relative link is missing, the root.gitmodules(to tell a submodule that is not checked out from a broken link) are read. Skill scripts are read only when you passinclude: ["skills"](or--include skills), and.claude/settings.json,.mcp.json,.cursor/mcp.json,.vscode/mcp.jsonand.gemini/settings.jsononly withinclude: ["config"], which also reads thename,homepageandrepositoryof the rootpackage.jsonandpyproject.tomlso the project's own MCP server and install script are recognised..claude/settings.local.jsonneedsconfig-local.~/.claude.jsonis never read. Values from settings files are never echoed: findings name the key, and anything shaped like a secret is redacted. - It logs one start-up line to stderr (version and root folder), never file content.
- What your assistant does with results is up to your assistant. Tool results go into the model's context, so they reach whichever AI provider your assistant uses. That is your assistant's network traffic, not ours.
Security model
- Root confinement. Every path is resolved with
realpathand must stay inside a root given at start-up.../traversal, absolute paths outside the root and symlinks (file or folder) that resolve outside are refused. Symlinks that resolve inside a root are followed, so a CLAUDE.md that links to AGENTS.md or a linked.claude/skillsfolder is checked where the agent sees it. The filesystem root and your home folder are refused as roots unless you pass--allow-broad-root. - Markdown only, unless you opt in. By default only
.md,.mdc,.markdown,.mdx,.cursorrules,.windsurfrulesand.clinerulesare read, plus.asitisrc.json(at most 64 KB).include: ["skills"]adds the scripts inside skill folders (up to 1 MB each; other files there are read for their first 4 bytes only, to spot binaries), andinclude: ["config"]adds the agent settings and MCP config files listed under Privacy..env*, anything in.git/ornode_modules/,~/.claude.jsonand every other file are always refused, including through a symlink that points at them. A repo's.asitisrc.jsoncannot turn these scans on in the MCP server; only the call (or the CLI flag) can.@importsof other files are counted from their size, never read. Nothing that is read is ever run. - Bounded work. Files over 16 MB are refused (
--max-file-mb), results are capped, every tool call has a 20 s budget, and every scanner is linear time. The test suite runs 32 adversarial 10 MB inputs (unclosed comments, bracket and backtick storms, 2,000-character import tokens, invalid UTF-8 and more) through every tool under a 3 s per-call budget. - Untrusted content.
read_markdownlabels file content as data, not instructions, and reports hidden instructions and invisible characters up front. This does not stop a model from obeying text it reads; it makes the text visible. - Stronger sandbox, optional. Run the server under Node's permission model so the runtime itself forbids writes and child processes (and network access on Node 25 and later). The Hardened setup under Install shows how; the Claude Code plugin does this by default.
Known limits
- Token counts are local approximations (about 4 characters per token for English), not any vendor's tokenizer.
- A hardlink inside the root to a file elsewhere is read like any other file (reads only).
- A symlink swapped into a parent folder between the check and the open is a narrow race; the final path component is opened with
O_NOFOLLOWand checked by inode. - On Windows, junctions, case-folded paths, 8.3 short names,
\\?\and\\.\device prefixes, UNC paths and trailing dots or spaces are judged on the real path and tested. Alternate data streams (notes.md:stream) and reserved device names (CON,NUL.md) are refused outright.
Options
ASITIS_MCP_ROOT (folders separated by :, or ; on Windows) ASITIS_MCP_FOOTER=1 and ASITIS_MCP_STRUCTURED=1 work as environment variables. Add a second --root for a memory folder that lives outside the project, for example ~/.claude/projects/<project>/memory.
Mistakes print one line and exit with code 2, for example:
Package
The package is two files, the server dist/asitis-mcp.mjs and the CLI dist/asitis.mjs (built with esbuild, minified), with zero runtime dependencies and no install scripts. The MCP SDK (pinned to 1.31.0), zod and yaml are bundled in; their licences are in dist/THIRD_PARTY_NOTICES.md. The release workflow in this repository (.github/workflows/release.yml) publishes with npm provenance, so a version it publishes shows a provenance attestation on npmjs.com and can be checked with npm audit signatures. Versions up to 0.2.4 were published by hand, without provenance.
License
MIT. Changes are listed in the changelog. Report vulnerabilities privately through GitHub security advisories.
來源:packages/mcp/README.md,提交 0923dc1
工具
0版本歷史
4- v0.3.0最新Oct 15, 2026
- v0.2.5Oct 14, 2026
- v0.2.4Oct 14, 2026
- v0.2.3Oct 14, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
