slite-mcp
Integrates with Slite's API to search, retrieve, create, and edit notes via the MCP protocol.
README
⚠️ DEPRECATED — Use the Official Slite MCP Instead
This project is no longer maintained.
Slite now provides an official MCP server with native support for all block types including mermaid diagrams, tables, callouts, and more.
To migrate, update your MCP config:
{ "mcpServers": { "slite-official": { "type": "http", "url": "https://api.slite.com/mcp", "headers": { "Authorization": "Bearer YOUR_SLITE_API_KEY" } } } }Key improvements in the official MCP over this repo:
- ✅ Mermaid/diagram blocks work correctly
- ✅ Block-level editing via
modify-block(no more full-document rewrites)- ✅ Callouts, tables, collapsibles, and all native Slite blocks
- ✅ Maintained by Slite directly
Slite MCP Server (Deprecated)
A Model Context Protocol (MCP) server that integrates with Slite's API to search, retrieve, create, and edit notes.
Features
- 🔍 Search Notes: Search through your Slite workspace
- 📄 Get Note Content: Retrieve specific notes by ID in markdown or HTML format
- 🌳 Browse Hierarchy: Get child notes of any parent note
- 🤖 Ask Questions: Natural language question answering across your workspace
- ✏️ Edit Notes: Search-and-replace editing with validation and dry-run support
- 📝 Create Notes: Create new notes with markdown content
- 🔄 Update Notes: Full content replacement for major rewrites
Installation
# Clone the repository
git clone https://github.com/fajarmf/slite-mcp.git
cd slite-mcp
# Install dependencies
npm install
# Build the project
npm run build
Configuration
Getting your Slite API Key
- Log in to your Slite workspace
- Go to Settings → API
- Generate a new API key
Setting up the MCP Server
Add the server to your MCP configuration file (~/.mcp.json):
{
"mcpServers": {
"slite": {
"command": "node",
"args": ["/path/to/slite-mcp/build/index.js"],
"env": {
"SLITE_API_KEY": "your-api-key-here"
}
}
}
}
Usage
Once configured, the following tools are available:
slite_search
Search for notes in your Slite workspace.
Parameters:
query(required): Search query stringhitsPerPage(optional): Results per page (default: 10)
Example:
{
"tool": "slite_search",
"arguments": {
"query": "project documentation",
"hitsPerPage": 5
}
}
slite_get_note
Retrieve a specific note by its ID.
Parameters:
noteId(required): The ID of the note to retrieveformat(optional): Format to return - "md" or "html" (default: "md")
Example:
{
"tool": "slite_get_note",
"arguments": {
"noteId": "BoptqNi4pm0lcV",
"format": "md"
}
}
slite_get_note_children
Get all child notes of a parent note.
Parameters:
noteId(required): The ID of the parent notecursor(optional): Pagination cursor for next page
Example:
{
"tool": "slite_get_note_children",
"arguments": {
"noteId": "5i6k33yrVu7eMy"
}
}
slite_ask
Ask natural language questions and get AI-powered answers from your Slite workspace.
Parameters:
question(required): The question to askparentNoteId(optional): Limit search to notes under this parent
Example:
{
"tool": "slite_ask",
"arguments": {
"question": "What is our deployment process?"
}
}
slite_create_note
Create a new note in your Slite workspace.
Parameters:
title(required): Note titlemarkdown(optional): Note content in markdown formatparentNoteId(optional): Parent note ID (creates in personal channel if not specified)
Example:
{
"tool": "slite_create_note",
"arguments": {
"title": "Meeting Notes",
"markdown": "# Meeting Notes\n\n- Discussed project timeline\n- Assigned tasks",
"parentNoteId": "5i6k33yrVu7eMy"
}
}
slite_edit_note
Edit a note using search-and-replace. Preferred for targeted edits - faster and safer than full rewrite.
Parameters:
noteId(required): The ID of the note to editedits(required): Array of search-and-replace operationsoldText: Exact text to find (must be unique in document)newText: Text to replace it with
dryRun(optional): If true, validate edits without applying them
Example:
{
"tool": "slite_edit_note",
"arguments": {
"noteId": "BoptqNi4pm0lcV",
"edits": [
{ "oldText": "Draft", "newText": "Final" },
{ "oldText": "TODO: add details", "newText": "Implementation complete" }
],
"dryRun": false
}
}
slite_update_note
Replace entire note content. Use slite_edit_note for small changes.
Parameters:
noteId(required): The ID of the note to updatemarkdown(required): New markdown content (replaces entire note)title(optional): New title (keeps existing if not provided)
Example:
{
"tool": "slite_update_note",
"arguments": {
"noteId": "BoptqNi4pm0lcV",
"markdown": "# New Content\n\nThis replaces everything.",
"title": "Updated Title"
}
}
Testing
Quick Start
# Copy environment config and add your API key
cp .env.example .env
# Edit .env with your SLITE_API_KEY
# Setup test data (creates test documents in Slite)
npm run test:setup
# Run all tests
npm test
Test Setup
The test:setup command creates test documents in your Slite workspace:
- A parent note with 55 child notes (for cursor pagination testing)
- A "Test Data for MCP Server" child with searchable keywords
The script is idempotent - it won't create duplicates if test data already exists.
# Setup with a new parent note
npm run test:setup
# Or use an existing note as parent
npm run test:setup -- --parent=<note-id>
# Force recreation even if data exists
npm run test:setup -- --force
Test Suite
The test suite includes:
- API Tests: Search, get note, get children, ask endpoint
- Error Handling: Invalid IDs, unauthorized access
- Pagination: hitsPerPage for search, cursor for children (requires 55+ children)
- Content Formats: Markdown and HTML output
- MCP Server Integration: All tools via stdio transport
- Write Operations: Create, edit, update - with content verification after each operation
Development
Project Structure
slite-mcp/
├── src/
│ └── index.ts # Main MCP server (7 tools: 4 read, 3 write)
├── build/ # Compiled JavaScript files
├── tests/
│ ├── index.test.js # Consolidated test suite
│ └── setup-test-data.js # Idempotent test data setup
├── examples/ # Example configurations
├── package.json
├── tsconfig.json
└── README.md
Building
npm run build
Requirements
- Node.js 16+
- TypeScript 5.0+
- A valid Slite API key
API Response Formats
The Slite API returns data in specific formats:
Search Results
- Results are in the
hitsarray - Each hit contains:
id,title,highlight,updatedAt,type,parentNotes
Note Content
- Full markdown or HTML content
- Includes metadata:
id,title,url,updatedAt,parentNoteId
Child Notes
- Results in the
notesarray - Pagination info:
total,hasNextPage,nextCursor
Troubleshooting
Authentication Failed
- Verify your API key is correct
- Check if the key has the necessary permissions
No Results Found
- Try different search terms
- Ensure the notes exist in your workspace
- Check if you have access to the notes
API Changes
If you encounter errors, the Slite API might have changed. Check:
- Response format in the test scripts
- Endpoint URLs
- Required parameters
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
MIT License - see LICENSE file for details
Support
For issues or questions:
- Create an issue on GitHub
- Check Slite's API documentation
- Review the test scripts for examples
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。