simplenote-mcp-server
AGENTS.md21 starsChanged 24 days agoMITView on GitHub
MCP server connecting Simplenote to Claude Desktop and other MCP clients. Python ≥3.10, package root simplenote_mcp/. Always invoke .venv/bin/pytest / .venv/bin/ruff / .venv/bin/mypy / .venv/bin/bandit explicitly, or prefix with source .venv/bin/activate && in the same shell call — each Bash invocation is a fresh shell, so a prior activate does not persist and bare commands silently resolve through the pyenv shim to the global environment instead of .venv.
- Installs packages
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,700 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 repository16 other files it gives its agents.
- .claude/skills/AGENTS.mdAGENTS.md
- .github/workflows/AGENTS.mdAGENTS.md
- helm/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- tests/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- dependabotSkill
- docs-sync-auditSkill
- github-actions-hardeningSkill
- mcp-implementation-security-reviewSkill
- mcp-release-qaSkill
- mcp-security-auditSkill
- pytest-coverageSkill
- security-reviewSkill
- test-gap-auditSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
23 rules. About 0 are common, 21 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈21
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 66
Read the nearest child AGENTS.md for the folder you're editing before making changes.
- Distinctive: line 68
Update the owning AGENTS.md (and any Child DOX Index) whenever you change structure, contracts, or workflow — see the DOX framework block …
- Distinctive: line 92
Read the root AGENTS.md
- Distinctive: line 95
Read every AGENTS.md found along each route
- Distinctive: line 96
If a parent AGENTS.md lists a child AGENTS.md whose scope contains the path, read that child and continue from there
- Distinctive: line 97
Use the nearest AGENTS.md as the local contract and parent docs for repo-wide rules
- Distinctive: line 98
If docs conflict, the closer doc controls local work details, but no child doc may weaken DOX
- Distinctive: line 100
Do not rely on memory. Re-read the applicable DOX chain in the current session before editing.
- Distinctive: line 104
Every meaningful change requires a DOX pass before the task is done.
- Distinctive: line 106
Update the closest owning AGENTS.md when a change affects:
- Distinctive: line 125
Create a child AGENTS.md when a folder becomes a durable boundary with its own purpose, rules, responsibilities, workflow, materials, or …
- Distinctive: line 140
Keep docs concise, current, and operational
- Distinctive: line 141
Document stable contracts, not diary entries
- Distinctive: line 142
Put broad rules in parent docs and concrete details in child docs
- Distinctive: line 143
Prefer direct bullets with explicit names
- Distinctive: line 144
Do not duplicate rules across many files unless each scope needs a local version
- Distinctive: line 145
Delete stale notes instead of explaining history
- Distinctive: line 151
Update nearest owning docs and any affected parents or children
- Distinctive: line 153
Remove stale or contradictory text
- Distinctive: line 154
Run existing verification when relevant
- Very specific: line 159
Never bump versions manually.
- Very specific: line 160
Never include [skip ci] in commits.
- Distinctive: line 161
Always run the full test suite (both trees) after source changes.
≈ “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
simplenote-mcp-server
MCP server connecting Simplenote to Claude Desktop and other MCP clients. Python ≥3.10, package root simplenote_mcp/.
Commands
# Setup
pip install -e ".[dev,test,all]"
pre-commit install
# Tests — two independent trees, run separately (see tests/AGENTS.md and simplenote_mcp/tests/AGENTS.md for why)
make test-fast # SIMPLENOTE_OFFLINE_MODE=true .venv/bin/pytest tests/ -x -q --timeout=30
make test-legacy # SIMPLENOTE_OFFLINE_MODE=true .venv/bin/pytest simplenote_mcp/tests/ -q --timeout=30 --no-cov
make test # both, via .venv/bin/pytest -q (root testpaths = tests/ only; legacy run separately in CI)
# Quality
ruff check .
ruff format .
mypy simplenote_mcp
bandit -c pyproject.toml -r simplenote_mcp # always pass -c; bare invocation misapplies exclude_dirs
# Evaluations (npm devDependency tree, never shipped — see package.json)
npm install && npm run eval:smoke # eval:basic, eval:comprehensive, eval:all also availableAlways invoke .venv/bin/pytest / .venv/bin/ruff / .venv/bin/mypy / .venv/bin/bandit explicitly, or prefix with source .venv/bin/activate && in the same shell call — each Bash invocation is a fresh shell, so a prior activate does not persist and bare commands silently resolve through the pyenv shim to the global environment instead of .venv.
Architecture
simplenote_mcp/
├── server/ # MCP protocol handlers, tool registry, cache, security — see server/AGENTS.md
│ ├── tool_handlers/ # One handler class per MCP tool, grouped by domain — see server/tool_handlers/AGENTS.md
│ ├── search/ # Query parser + boolean/fuzzy/date search engine — see server/search/AGENTS.md
│ └── monitoring/ # Metrics collection + alerting thresholds — see server/monitoring/AGENTS.md
├── scripts/ # Runtime diagnostics shipped with the package — see simplenote_mcp/scripts/AGENTS.md
├── tests/ # Legacy pytest tree, separate invocation — see simplenote_mcp/tests/AGENTS.md
└── __main__.py # Entry point (module execution)
tests/ # Primary CI-wired pytest tree — see tests/AGENTS.md
scripts/ # CI/quality/release tooling — see scripts/AGENTS.md
helm/ # Helm chart — see helm/AGENTS.md
.github/workflows/ # CI/CD pipelines — see .github/workflows/AGENTS.md
docs/, evals/ # Reference docs and mcp-evals suites; no durable local contracts of their ownDesign patterns
- Tool Handler Registry: each tool (
create_note,search_notes, etc.) is aToolHandlerBasesubclass registered inToolHandlerRegistry(server/tool_handlers/, one module per domain). - Middleware chain: security validation, input validation, and rate limiting applied via decorators (
server/decorators.py,server/middleware.py) before a handler runs. - Background sync:
NoteCache(server/cache.py) syncs from Simplenote in a background thread so tool calls stay responsive. - Error hierarchy: custom exceptions in
server/errors.py/server/error_taxonomy.pycarry MCP-appropriate error codes and user-facing messages.
Local Contracts
- Version consistency: four files must carry the same version —
VERSION,pyproject.toml,simplenote_mcp/__init__.py,helm/simplenote-mcp-server/Chart.yaml(appVersion).setup.pyalso has a version string, now checked as a legacy fallback byscripts/quality/check_version_consistency.py. Never bump manually outside the release workflow. - Release process is manual, not automatic:
.github/workflows/release.ymlruns only onworkflow_dispatch(explicit bump-type input). No workflow triggers a release from a conventional-commit push tomain— merging adocs:/feat:/fix:PR never cuts a release by itself. - Write-mode gate: any tool that mutates Simplenote data must be added to the
WRITE_TOOLSfrozenset inserver/server.pyor it bypasses the write-mode/write-budget gate — seeserver/AGENTS.md. - Bandit config:
[tool.bandit]inpyproject.tomlis the only bandit config (the unread.banditYAML was removed 2026-10-21). Always run with-c pyproject.toml: bandit doesn't read[tool.bandit]on its own, and a bare run reports ~455 LOW findings, almost all in the legacy test tree. - The runtime Docker image has no pip, setuptools or wheel: the
Dockerfilefinal stage uninstalls them after copying the builder'ssite-packages. Install every runtime dependency in the builder stage (viarequirements-runtime-lock.txt). Don't addpip installsteps after the uninstall, and don't add anything that needs pip, setuptools orpkg_resourcesat runtime. Re-adding these tools brings back the Trivy findings from pip'spip/_vendor/vendor.txtandsetuptools/_vendor(#937). Check any Dockerfile change with a locallinux/amd64build andtrivy image. - Both lock files target Python 3.13, not the
requires-pythonfloor: CI, Dependabot and the Docker image'sPYTHON_VERSIONdefault all use 3.13. Since #1013, several pins (starlette 1.9, httpx2 2.16, rpds-py 2026.x, pre-commit 4.7, …) need Python ≥3.11, sopip install -r requirements*-lock.txtand a Docker build withPYTHON_VERSION=3.10fail on 3.10. Installs on 3.10–3.12 go throughpyproject.toml, where the resolver picks compatible versions. Don't hold lock pins back for 3.10; if 3.10 support itself goes, raiserequires-pythonin its own PR. - No credentials, tokens, or Simplenote account data in any AGENTS.md, doc, script output, or committed fixture, ever.
Work Guidance
- Read the nearest child
AGENTS.mdfor the folder you're editing before making changes; this root file covers only repo-wide rules. - Extract conventions from existing code — do not invent patterns not already present.
- Update the owning
AGENTS.md(and any Child DOX Index) whenever you change structure, contracts, or workflow — see the DOX framework block below.
Verification
make test-fastandmake test-legacy(both must pass; do not merge into one invocation — seetests/AGENTS.md)ruff check . && ruff format --check .mypy simplenote_mcpbandit -c pyproject.toml -r simplenote_mcppython scripts/quality/check_version_consistency.py
DOX framework
- DOX is highly performant AGENTS.md hierarchy installed here
- Agent must follow DOX instructions across any edits
Core Contract
- AGENTS.md files are binding work contracts for their subtrees
- Work products, source materials, instructions, records, assets, and durable docs must stay understandable from the nearest applicable AGENTS.md plus every parent AGENTS.md above it
Read Before Editing
- Read the root AGENTS.md
- Identify every file or folder you expect to touch
- Walk from the repository root to each target path
- Read every AGENTS.md found along each route
- If a parent AGENTS.md lists a child AGENTS.md whose scope contains the path, read that child and continue from there
- Use the nearest AGENTS.md as the local contract and parent docs for repo-wide rules
- If docs conflict, the closer doc controls local work details, but no child doc may weaken DOX
Do not rely on memory. Re-read the applicable DOX chain in the current session before editing.
Update After Editing
Every meaningful change requires a DOX pass before the task is done.
Update the closest owning AGENTS.md when a change affects:
- purpose, scope, ownership, or responsibilities
- durable structure, contracts, workflows, or operating rules
- required inputs, outputs, permissions, constraints, side effects, or artifacts
- user preferences about behavior, communication, process, organization, or quality
- AGENTS.md creation, deletion, move, rename, or index contents
Update parent docs when parent-level structure, ownership, workflow, or child index changes. Update child docs when parent changes alter local rules. Remove stale or contradictory text immediately. Small edits that do not change behavior or contracts may leave docs unchanged, but the DOX pass still must happen.
Hierarchy
- Root AGENTS.md is the DOX rail: project-wide instructions, global preferences, durable workflow rules, and the top-level Child DOX Index
- Child AGENTS.md files own domain-specific instructions and their own Child DOX Index
- Each parent explains what its direct children cover and what stays owned by the parent
- The closer a doc is to the work, the more specific and practical it must be
Child Doc Shape
- Create a child AGENTS.md when a folder becomes a durable boundary with its own purpose, rules, responsibilities, workflow, materials, or quality standards
- Work Guidance must reflect the current standards of the project or user instructions; if there are no specific standards or instructions yet, leave it empty
- Verification must reflect an existing check; if no verification framework exists yet, leave it empty and update it when one exists
Default section order:
- Purpose
- Ownership
- Local Contracts
- Work Guidance
- Verification
- Child DOX Index
Style
- Keep docs concise, current, and operational
- Document stable contracts, not diary entries
- Put broad rules in parent docs and concrete details in child docs
- Prefer direct bullets with explicit names
- Do not duplicate rules across many files unless each scope needs a local version
- Delete stale notes instead of explaining history
- Trim obvious statements, repeated rules, misplaced detail, and warnings for risks that no longer exist
Closeout
- Re-check changed paths against the DOX chain
- Update nearest owning docs and any affected parents or children
- Refresh every affected Child DOX Index
- Remove stale or contradictory text
- Run existing verification when relevant
- Report any docs intentionally left unchanged and why
User Preferences
- Never bump versions manually; the release workflow (
workflow_dispatchonly) owns version bumps across all four version-source files. - Never include
[skip ci]in commits. - Always run the full test suite (both trees) after source changes; do not mark work done with failing tests.
Child DOX Index
simplenote_mcp/server/AGENTS.md— core server package: protocol handlers, tool registry, cache, security, credentials, vault encryptionsimplenote_mcp/server/tool_handlers/AGENTS.md— per-tool handler classes, grouped by domain, and the dispatch registrysimplenote_mcp/server/search/AGENTS.md— query parser and boolean/fuzzy/date search enginesimplenote_mcp/server/monitoring/AGENTS.md— metrics collection and alerting thresholdssimplenote_mcp/scripts/AGENTS.md— runtime diagnostics scripts shipped inside the packagesimplenote_mcp/tests/AGENTS.md— legacy pytest tree (112 tests, separate invocation)tests/AGENTS.md— primary CI-wired pytest treescripts/AGENTS.md— CI/quality/release tooling (not shipped)helm/AGENTS.md— Helm chart for Kubernetes deployment.github/workflows/AGENTS.md— CI/CD pipeline definitions.claude/skills/AGENTS.md— vendored agent skills (Claude Code + Copilot); edit via upstream, not in place
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.

