Notes MCP server (TypeScript template)
A minimal, complete MCP server built with the official TypeScript SDK v2 (@modelcontextprotocol/server) and Zod v4 schemas.
- Tools:
add_note,search_notes,delete_note(input and output schemas, annotations,isErrorresults) - Resources:
notes://indexand the templatenotes://{note_id}(with alistcallback) - Prompt:
summarize_notes - Transport: stdio (
src/index.ts);createServer()is a factory, ready for HTTP hosting
Run
npm install
npm test # 9 tests: in-memory client, schema validation, tsc, and a real stdio subprocess
npm run build # compiles to dist/
npm start # runs dist/index.js over stdio
npm run inspect # opens the MCP Inspector against the built server
Connect
claude mcp add notes -- node /absolute/path/to/this/folder/dist/index.js
Make it yours
- Rename the package in
package.jsonand the server name increateServer(). - Replace
store.tswith your real logic (no MCP imports there). - Replace the tools in
server.ts. Use.describe()on every input field: descriptions are what the model reads.