fajarmf/slite-mcp
If you are the rightful owner of slite-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Slite MCP Server is a Model Context Protocol server that integrates with Slite's API to facilitate searching and retrieving notes from a Slite workspace.
Slite MCP Server
A Model Context Protocol (MCP) server that integrates with Slite's API to search and retrieve 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
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 stringlimit(optional): Maximum number of results (default: 10)
Example:
{
"tool": "slite_search",
"arguments": {
"query": "project documentation",
"limit": 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 notelimit(optional): Maximum number of results (default: 20)
Example:
{
"tool": "slite_get_note_children",
"arguments": {
"noteId": "5i6k33yrVu7eMy",
"limit": 10
}
}
Testing
Run the test scripts to verify your API connection:
# Test API connection with default search
node tests/test-slite-api.js
# Test with custom search query
node tests/test-slite-api.js "your search term"
# Test specific note retrieval
node tests/test-specific-note.js [noteId]
Development
Project Structure
slite-mcp/
├── src/
│ └── index.ts # Main MCP server implementation
├── build/ # Compiled JavaScript files
├── tests/ # Test scripts
├── 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