mcp-template
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-template add a note: Remember to buy milk"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-template
A template for building MCP servers in TypeScript that a model uses correctly on the first try — whether it runs in an agent harness that fetches tool schemas on demand or in a small local model that carries every schema on every turn.
It was extracted from a production MCP server and stripped of its domain. What is left is the machinery that made that server reliable, with an in-memory notes store standing in for a real backend so that every pattern has a working, tested example.
What you get
One-file tools. A tool is a definition plus a
run(args)that returns plain data. Dispatch, timing, the MCP envelope and error mapping live in one base class; the router,tools/listand the contract tests are all derived from the definitions, so a listed tool is always callable and tested.Honest annotations. All four MCP hints on every tool, held there by tests — including on the wire, which is what directories such as OpenAI's check.
Profiles.
MCP_PROFILEpicks which tools are listed and routable, so a small client carries a small menu andreadonlygenuinely cannot write.A response budget. An over-sized answer is replaced by valid JSON that names the next step, never by a fragment a model will retry.
A capability gate. Tools the backend cannot serve are withheld before
tools/listanswers, and every failure path fails open.Self-documentation. The guides in
docs/and the skills inskills/are served as MCP resources and throughreadServerGuide/readSkill, so an agent can look things up by itself.Session recovery. Connect on demand, reconnect and retry once after a dropped session, and never retry a refused credential — retries lock accounts.
Two transports. stdio, and Streamable HTTP with one backend session per caller's bearer token, sessions bound to their token, origin and host allow-lists, and a per-session rate limit.
Docs that cannot drift. The tool reference is generated and a test compares it;
server.jsonis checked against every environment variable the code reads.A container. A two-stage Dockerfile that ships the docs and skills the server reads at runtime.
Related MCP server: notes-box
Quick start
git clone --recurse-submodules <this repository> my-server
cd my-server
npm install
npm run build
npm test
npm run smoke # drives the built server over stdio
npm run dev # the MCP Inspector, against the buildRegister it with a client:
{
"mcpServers": {
"notes": {
"command": "node",
"args": ["C:/path/to/my-server/dist/index.js"]
}
}
}Making it yours
AGENTS.md has the step-by-step list. In short:
rename it in package.json and server.json, replace the backend in src/backend/ and the tools in
src/handlers/, rewrite the domain parts of the docs, and swap the example skill. Every place that
needs a decision is marked TEMPLATE::
grep -rn "TEMPLATE" --exclude-dir=node_modules --exclude-dir=dist .Asking an agent to do it? Point it at AGENTS.md first — it was written for exactly that.
Configuration
Everything is optional; the example runs with no configuration. See .env.example.
Variable | Default | Effect |
|
|
|
| per profile | Ceiling on one answer; |
| on |
|
|
|
|
|
| Where HTTP mode listens |
| none | Browser origins allowed; |
| any |
|
|
| Requests per minute per session |
| none | Example backend: bearer tokens HTTP callers may present |
Running it for a team, over HTTP or in Docker: docs/Hosting.md.
Documentation
Document | For |
Working on this code — conventions, layout, how to test, how to start a new server | |
How the server behaves: architecture, profiles, budget, gate, errors, troubleshooting | |
Which tool does what, in the words people use | |
Every tool and argument — generated, never edited by hand | |
stdio, Streamable HTTP, Docker | |
The bundled engineering skills | |
Vocabulary and design decisions |
The guides are served to clients too: ask the running server with readServerGuide.
Development
npm run build # tsc -> dist/
npm test # vitest, fully offline
npx tsc --noEmit # type check only
npm run docs:tools # regenerate docs/Tool-Reference.md after changing a tool (needs a build)
npm run smoke # the built server over real stdioLicense
MIT — see LICENSE.
Available Tools
9 toolscreateNoteA
Create a note and return it with its new id. Calling it twice creates two notes — search first if the note might already exist.
Inputs: title (required), body, tags.
deleteNoteADestructiveIdempotent
Delete a note permanently. Answers deleted:false rather than failing when the note does not exist, so a repeated call is harmless.
Inputs: id (required).
healthcheckARead-onlyIdempotent
What this server is bound to, whether the backend answers, and per-handler call metrics. Call it to find out whether this is the right server for a request that names a target — a server cannot switch target at runtime — or when calls start failing. It never connects to the backend, so it answers when everything else fails. Also reports the active tool profile, the response budget, and anything withheld because the backend does not support it.
Inputs: no named parameters.
listTagsARead-onlyIdempotent
Every tag in use and how many notes carry it, most used first. Use it to find the tag to pass to searchNotes.
Inputs: no named parameters.
readNoteARead-onlyIdempotent
One note in full — title, body, tags and when it last changed — by its id.
Inputs: id (required).
readServerGuideARead-onlyIdempotent
This server's own documentation. Call with no arguments for an index of the available guides and their sections, then request one section by number or title. Use it when you are unsure which tool to use, what an argument means, how a workflow fits together, or why a call is failing.
Inputs: guide, section.
readSkillARead-onlyIdempotent
Bundled agent skills — reusable procedures for working with this server and for general engineering (TDD, code review, diagnosing bugs, domain modelling…). Call with no arguments to see which exist, then pass collection for their descriptions and skill to read one. Consult a skill's SKILL.md before starting a task it covers: they carry the conventions and checklists the tool descriptions alone do not.
Inputs: file, skill, collection.
searchNotesARead-onlyIdempotent
Find notes by text and/or tag, newest first. Returns summaries with a short preview — not the full body; read one with readNote. total is the number of matches before the limit, so a smaller notes list means there is more to page through.
Inputs: tag, text, limit, offset.
updateNoteADestructiveIdempotent
Replace the title, body and/or tags of an existing note. Fields you omit are kept; tags replaces the whole list. Returns the note as it now is, and changed:false when the note already had these values.
Inputs: id (required), body, tags, title.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
The note tools are cleanly separated by action and resource: readNote, searchNotes, createNote, updateNote, deleteNote, and listTags have clear boundaries. The meta tools readServerGuide, readSkill, and healthcheck all serve help/troubleshooting purposes and could be mildly confused, though their descriptions distinguish them.
Most tools follow a consistent camelCase verb_noun pattern: readNote, searchNotes, createNote, updateNote, deleteNote, listTags, readServerGuide, readSkill. healthcheck is the lone noun-style outlier, but it remains readable and understandable.
Nine tools is well-scoped for a notes server with built-in documentation: six core note/tag operations plus three meta/help tools. Each tool has a clear reason to exist, and the set does not feel padded or thin.
The server covers full note CRUD plus search and tag listing, which handles the main lifecycle. Minor gaps remain—no tag rename/delete, no batch operations, and no explicit list-all-notes tool—but agents can work around these using searchNotes and updateNote.
Maintenance
Related MCP Connectors
Agent-native notes, tasks, dev-docs, vaults, sync & handoffs. MCP + OpenAPI dual surface.
Linked markdown notes as memory for AI apps: search, read, save and link notes over MCP.
Google Keep-style notes app with an MCP server for AI agents to read/write notes.
Host any HTTP API as MCP tools with a tamper-evident cross-agent settlement ledger.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables users to create, retrieve, update, delete, and list notes through an MCP server, with persistent JSON storage and atomic writes.MIT
- AlicenseNot gradedqualityCmaintenanceEnables creating, retrieving, updating, deleting, and listing notes through a simple MCP interface, with configurable note storage.MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP-compatible clients to create, list, search, and delete notes, read all notes as markdown, and use prompts to summarize or clean up notes.MIT
- AlicenseNot gradedqualityBmaintenanceProvides a TypeScript MCP server scaffold that exposes tested, one-file tools to models with profile-scoped listings, honest annotations, response budgets, capability gating, and self-served guides and skills. Ships an in-memory notes backend as a working example and runs over stdio or Streamable HTTP.3GPL 3.0