notes-mcp

notes-mcp

A note-taking MCP server that lets you add, delete, and view dated notes, with an HTML view and REST API. Supports SQLite or Postgres and can run as a local stdio server or hosted HTTP service.

Category
访问服务器

README

notes-mcp

A note-taking MCP server. Notes are dated, and the same process also exposes a plain REST API and an HTML view — so it can run locally as a stdio MCP server, or be hosted as a normal web service.

Storage

SQLite by default (NOTES_DB_PATH, defaults to ./data/notes.db) — fine for local/stdio use and for hosts with a persistent disk.

Set DATABASE_URL to a Postgres connection string instead, and the server switches to Postgres automatically — needed on platforms with no persistent disk for the app container itself (e.g. Render's free web services, see below). Same schema, same behavior, just a different backend.

MCP tools

  • add_note(content, date?) — add a note; date defaults to today (YYYY-MM-DD)
  • delete_note(note_id) — delete a note by id
  • get_notes_for_date(date?) — notes for a given date, defaults to today
  • list_all_notes() — every note, most recent date first
  • view_notes_html(date?) — returns an HTML page of all notes, grouped by date, with the given/today's date highlighted

Auth (HTTP mode)

When running with MCP_TRANSPORT=http, every request — the REST API and the /mcp endpoint alike — requires Authorization: Bearer <NOTES_API_TOKEN>. /healthz is the only unauthenticated route (for container health checks). The server refuses to start over HTTP if NOTES_API_TOKEN isn't set.

Generate a token and keep it secret, e.g.:

python -c "import secrets; print(secrets.token_urlsafe(32))"

Stdio mode (local Claude Desktop/Code) has no auth — the client already trusts it by spawning the process directly, and there's no network exposure.

REST API

Available when running with MCP_TRANSPORT=http (always on in the Docker image). All requests below need the Authorization: Bearer <token> header.

Method Path Body / Query Description
POST /api/notes {"content", "date"?} Create a note
GET /api/notes ?date=YYYY-MM-DD List all notes, or by date
GET /api/notes/today — Today's notes
GET /api/notes/{id} — Get one note
DELETE /api/notes/{id} — Delete a note
GET /notes ?date=YYYY-MM-DD HTML view (highlights that date)
GET /healthz — Health check

The MCP endpoint (streamable-http) is mounted at /mcp on the same port.

Local setup (stdio, for Claude Desktop/Code)

python -m venv .venv
.venv\Scripts\pip install -r requirements.txt
.venv\Scripts\python server.py

Register with Claude Code

claude mcp add notes -- "C:\Users\srjnm\git\notes-mcp\.venv\Scripts\python.exe" "C:\Users\srjnm\git\notes-mcp\server.py"

Register with Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "notes": {
      "command": "C:\\Users\\srjnm\\git\\notes-mcp\\.venv\\Scripts\\python.exe",
      "args": ["C:\\Users\\srjnm\\git\\notes-mcp\\server.py"]
    }
  }
}

Run locally over HTTP (MCP + REST, no Docker)

NOTES_API_TOKEN=devtoken MCP_TRANSPORT=http PORT=8000 .venv\Scripts\python server.py

Docker (hosted deployment)

docker build -t notes-mcp .
docker run -d --name notes-mcp -p 8000:8000 \
  -e NOTES_API_TOKEN=<your-token> \
  -v notes-data:/data \
  notes-mcp

The notes-data named volume keeps notes.db across container restarts and upgrades. Point an MCP client at http://<host>:8000/mcp (streamable-http) with an Authorization: Bearer <your-token> header, or call the REST API directly at http://<host>:8000/api/notes with the same header.

Claude Code, as a remote MCP client:

claude mcp add --transport http notes http://<host>:8000/mcp \
  --header "Authorization: Bearer <your-token>"

Deploying to Render

Render's free web services have no persistent disk, so this repo talks to Postgres there instead of the local SQLite file.

  1. Push this repo to GitHub (Render deploys from a git repo).
  2. Create a Postgres database in the Render dashboard (New → PostgreSQL). Free instances expire after 30 days — fine to start with, upgrade to a paid instance whenever you want the data to stick around longer.
  3. Create a Web Service from the same repo (New → Web Service → pick this repo). Render detects the Dockerfile automatically.
  4. Set env vars on the web service (Environment tab):
    • DATABASE_URL → copy the Postgres instance's Internal Database URL from its dashboard page and paste it here.
    • NOTES_API_TOKEN → your generated token.
    • Leave PORT unset — Render injects its own and the app already reads PORT from the environment.
  5. Deploy. Render terminates HTTPS for you at https://<your-service>.onrender.com, so there's no Caddy/reverse-proxy step needed (unlike a bare VPS).

Then point clients at https://<your-service>.onrender.com/mcp (MCP) or .../api/notes (REST), both with the Authorization: Bearer <token> header.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选