A Model Context Protocol (MCP) server that integrates with Slite's API to search and retrieve notes.
- 🔍 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
# 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- Log in to your Slite workspace
- Go to Settings → API
- Generate a new API key
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"
}
}
}
}Once configured, the following tools are available:
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
}
}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"
}
}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
}
}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]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
npm run build- Node.js 16+
- TypeScript 5.0+
- A valid Slite API key
The Slite API returns data in specific formats:
- Results are in the
hitsarray - Each hit contains:
id,title,highlight,updatedAt,type,parentNotes
- Full markdown or HTML content
- Includes metadata:
id,title,url,updatedAt,parentNoteId
- Results in the
notesarray - Pagination info:
total,hasNextPage,nextCursor
- Verify your API key is correct
- Check if the key has the necessary permissions
- Try different search terms
- Ensure the notes exist in your workspace
- Check if you have access to the notes
If you encounter errors, the Slite API might have changed. Check:
- Response format in the test scripts
- Endpoint URLs
- Required parameters
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details
For issues or questions:
- Create an issue on GitHub
- Check Slite's API documentation
- Review the test scripts for examples