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 可用的 MCP 服务,用于对接自建 Leanote 笔记服务。
支持两种运行模式:
stdio:本机 Cursor 直接启动子进程
HTTP:部署到远程服务器(如
192.168.2.150),Cursor 通过 URL 连接
功能
工具 | 说明 |
| 列出所有笔记本,获取 |
| 在指定笔记本中新建笔记 |
Related MCP server: note.com MCP Server
远程部署(推荐:192.168.2.150)
1. 在服务器上准备环境
服务器需已安装 Docker 和 Docker Compose。
将项目上传到服务器 /opt/leanote-mcp,或在本机执行(需 SSH 账号密码):
cd C:\Users\abc\Projects\leanote-mcp
.\deploy-remote.ps1 -Server 192.168.2.150 -User <你的SSH用户名>也可手动在服务器上:
cd /opt/leanote-mcp
cp .env.example .env
# 编辑 .env,填写 Leanote 地址和账号
nano .env
chmod +x deploy.sh
./deploy.sh2. 配置 Leanote 凭据(配置文件,推荐)
Leanote 地址和账号不要写在 .env 或 docker-compose.yml 中,统一放在配置文件:
cd ~/leanote-mcp
cp config/leanote.example.json config/leanote.json
nano config/leanote.json
chmod 600 config/leanote.jsonconfig/leanote.json 示例:
{
"baseUrl": "http://192.168.2.150:9002",
"email": "admin",
"password": "your-password"
}也可使用 token 字段代替邮箱密码(二选一):
{
"baseUrl": "http://192.168.2.150:9002",
"token": "your-api-token"
}该文件已加入 .gitignore,Docker 以只读方式挂载进容器。
3. 验证部署
curl http://192.168.2.150:3100/health
# 应返回 {"status":"ok","service":"leanote-mcp"}4. 配置 Cursor(HTTP 模式)
编辑 %USERPROFILE%\.cursor\mcp.json:
{
"mcpServers": {
"leanote": {
"type": "http",
"url": "http://192.168.2.150:3100/mcp"
}
}
}重启 Cursor 后在 Agent 对话中即可使用 leanote_list_notebooks 和 leanote_create_note。
本机 stdio 模式
npm install
npm run build{
"mcpServers": {
"leanote": {
"type": "stdio",
"command": "node",
"args": ["C:/Users/abc/Projects/leanote-mcp/dist/index.js"],
"env": {
"LEANOTE_BASE_URL": "http://你的leanote地址",
"LEANOTE_EMAIL": "your@email.com",
"LEANOTE_PASSWORD": "your-password"
}
}
}
}环境变量
变量 | 必填 | 说明 |
| 否 | Leanote 配置文件路径,默认 |
| 否 | HTTP 监听地址,默认 |
| 否 | HTTP 端口,默认 |
Leanote 凭据优先从配置文件读取。仅当配置文件不存在时,才回退到以下环境变量(不推荐用于生产):
变量 | 说明 |
| Leanote 服务地址 |
| 登录凭据 |
| API Token |
Leanote API 说明
登录:
GET /api/auth/login?email=...&pwd=...列笔记本:
GET /api/notebook/getNotebooks?token=...新建笔记:
POST /api/note/addNote?token=...
详见 Leanote API Wiki。
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
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