project-notes MCP Server
Lets AI clients store, search, and summarize short notes about a codebase during a coding session.
README
project-notes MCP Server
A custom Model Context Protocol (MCP) server written in TypeScript. It lets AI clients store, search, and summarize short notes about a codebase during a coding session.
Overview
This server exposes project notes through MCP tools (for actions) and a resource (for read-only context). It uses stdio transport, which makes it compatible with local AI clients like Cursor and Claude Desktop.
Notes are kept in memory for the lifetime of the server process. They are useful as a session scratchpad, not as permanent project documentation.
Features
| Capability | Type | Description |
|---|---|---|
add_note |
Tool | Add a note with a title and content |
search_notes |
Tool | Search notes by keyword in title or content |
notes://summary |
Resource | Return note count and a list of all note titles |
Tech Stack
- Runtime: Node.js (ESM)
- Language: TypeScript
- MCP SDK:
@modelcontextprotocol/sdk - Validation: Zod (auto-generates JSON Schema for tool inputs)
- Transport: stdio
Project Structure
mcp1/
├── src/
│ └── index.ts # Server entry point
├── dist/
│ └── index.js # Compiled output
├── .cursor/
│ └── mcp.json # Cursor MCP configuration
├── package.json
├── tsconfig.json
└── README.md
Requirements
- Node.js 18+
- npm
Installation
npm install
Build
npm run build
This compiles TypeScript from src/ into dist/.
Run
npm start
The server communicates over stdio and waits for MCP client messages. Debug output is written to stderr only — never use console.log, as stdout must remain reserved for JSON-RPC.
On startup you should see:
[project-notes] Server started
Client Configuration
Cursor
Add or update .cursor/mcp.json in your project root:
{
"mcpServers": {
"project-notes": {
"command": "node",
"args": ["/absolute/path/to/mcp1/dist/index.js"]
}
}
}
Replace the path with the absolute path to your built dist/index.js. Reload MCP servers in Cursor settings after building.
Claude Desktop
Add to your Claude Desktop config:
| Platform | Config path |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
{
"mcpServers": {
"project-notes": {
"command": "node",
"args": ["/absolute/path/to/mcp1/dist/index.js"]
}
}
}
Restart Claude Desktop after saving.
Testing
Use the official MCP Inspector for interactive testing:
npm run build
npx @modelcontextprotocol/inspector node dist/index.js
From the inspector UI you can:
- Call
add_notewithtitleandcontent - Call
search_noteswith aquery - Read the
notes://summaryresource
Usage Examples
Once connected to a client, you can ask the AI to:
- Add a note: “Add a note: auth module was refactored to use JWT”
- Search notes: “Search notes for auth”
- List notes: “What project notes do we have?”
Example tool inputs:
{
"title": "Auth refactor",
"content": "JWT tokens now replace session cookies in src/auth/"
}
{
"query": "auth"
}
Implementation Details
Tools vs Resources
- Tools are for actions the model can invoke (
add_note,search_notes). - Resources provide context the host can read without a tool call (
notes://summary).
Using a resource for summaries avoids adding extra tools and helps keep the tool list small.
Input Validation
Tool parameters are defined with Zod schemas. The MCP SDK converts these into JSON Schema so clients know what inputs each tool accepts.
Error Handling
The add_note tool wraps logic in a try/catch and returns isError: true on failure. This tells the model the call failed instead of treating the response as a successful result.
Response Format
All tool handlers return MCP content blocks:
{
content: [{ type: "text", text: "..." }]
}
In-Memory Storage
Notes are stored in a simple array inside the running process:
const notes: { title: string; content: string; ts: string }[] = [];
Notes are cleared when the server process restarts or the MCP client reloads the server.
Scripts
| Command | Description |
|---|---|
npm run build |
Compile TypeScript to dist/ |
npm start |
Run the compiled server |
npm run dev |
Build and run in one step |
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。