Leanote MCP
Click on "Install 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., "@Leanote MCPlist my notebooks"
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.
Leanote MCP
Cursor、ClaudeCode、Copliot可用的 MCP 服务,对接自建 Leanote 笔记。多人共用同一 MCP 服务,各用户使用自己的 Leanote 账号。
工具 | 说明 |
| 列出笔记本,获取 |
| 在指定笔记本中新建笔记 |
部署 MCP 服务
支持 Docker 与 npm 两种方式,环境变量含义相同。
变量 | 说明 |
| HTTP 监听地址与端口,默认 |
| Leanote 服务地址 |
不要写入用户凭据,凭据由 Cursor 请求头传入。
Docker
服务器需安装 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.shnpm
服务器需安装 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 npm验证
curl http://your-mcp-host:3100/health
# {"status":"ok","service":"leanote-mcp"}Related MCP server: note.com MCP Server
配置 Cursor
各用户在自己的 %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 对话中使用上述工具。
配置 Claude Code或者Copilot
见 mcp.example
配置参考
HTTP 请求头
请求头 | 说明 |
| Leanote API Token |
| 同上 |
| 邮箱密码登录 |
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/hottersquash/leanote-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server