Leanote Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Leanote Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Cursor、ClaudeCode、Copliot可用的 MCP 服务,对接自建 Leanote 笔记。多人共用同一 MCP 服务,各用户使用自己的 Leanote 账号。
| 工具 | 说明 |
|---|---|
leanote_list_notebooks | 列出笔记本,获取 NotebookId |
leanote_create_note | 在指定笔记本中新建笔记 |
支持 Docker 与 npm 两种方式,环境变量含义相同。
| 变量 | 说明 |
|---|---|
MCP_HOST / MCP_PORT | HTTP 监听地址与端口,默认 0.0.0.0:3100 |
LEANOTE_BASE_URL | Leanote 服务地址 |
不要写入用户凭据,凭据由 Cursor 请求头传入。
服务器需安装 Docker 与 Docker Compose。
git clone <repo-url> /opt/leanote-mcp
cd /opt/leanote-mcp编辑 docker-compose.yml 中的环境变量:
environment:
MCP_HOST: ${MCP_HOST:-0.0.0.0}
MCP_PORT: ${MCP_PORT:-3100}
LEANOTE_BASE_URL: ${LEANOTE_BASE_URL:-http://your-leanote-host:9002}docker compose up -d --build
# 或
./deploy-docker.sh服务器需安装 Node.js >= 18。
git clone <repo-url> /opt/leanote-mcp
cd /opt/leanote-mcp
cp env.example .env
# 编辑 .env,设置 LEANOTE_BASE_URL
npm install
npm run build
npm start.env 示例(见 env.example):
MCP_HOST=0.0.0.0
MCP_PORT=3100
LEANOTE_BASE_URL=http://your-leanote-host:9002生产环境推荐使用 systemd 一键部署:
./deploy-npm.sh首次运行会创建 .env 并提示编辑;再次执行将安装/重启 leanote-mcp 服务。也可手动安装:
sudo cp leanote-mcp.service.example /etc/systemd/system/leanote-mcp.service
# 修改 WorkingDirectory、EnvironmentFile 为实际路径
sudo systemctl daemon-reload
sudo systemctl enable --now leanote-mcp从 Windows 本机上传并部署(需配置 SSH):
# Docker(默认)
.\deploy-remote.ps1 -Server your-server
# npm
.\deploy-remote.ps1 -Server your-server -DeployMode npmcurl http://your-mcp-host:3100/health
# {"status":"ok","service":"leanote-mcp"}各用户在自己的 %USERPROFILE%\.cursor\mcp.json 中连接 MCP 地址,并通过请求头传入自己的 Leanote 凭据。
API Token(推荐)
{
"mcpServers": {
"leanote": {
"type": "http",
"url": "http://your-mcp-host:3100/mcp",
"headers": {
"Authorization": "Bearer ${env:LEANOTE_TOKEN}"
}
}
}
}在系统环境变量中设置 LEANOTE_TOKEN(不要写进代码仓库)。
邮箱 + 密码
{
"mcpServers": {
"leanote": {
"type": "http",
"url": "http://your-mcp-host:3100/mcp",
"headers": {
"X-Leanote-Email": "${env:LEANOTE_EMAIL}",
"X-Leanote-Password": "${env:LEANOTE_PASSWORD}"
}
}
}
}也可使用 X-Leanote-Token 代替 Authorization: Bearer。
完整示例见 mcp.example/cursor-mcp.example.json。重启 Cursor 后即可在 Agent 对话中使用上述工具。
见 mcp.example
| 请求头 | 说明 |
|---|---|
Authorization: Bearer <token> | Leanote API Token |
X-Leanote-Token | 同上 |
X-Leanote-Email + X-Leanote-Password | 邮箱密码登录 |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.