| icon | robot | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| layout |
|
Almanac exposes an MCP (Model Context Protocol) server that allows AI clients like Claude Desktop, Cline, and ChatGPT to directly access your indexed data. This enables your AI assistant to search and retrieve information from all your connected data sources.
The Model Context Protocol (MCP) is an open standard that allows AI applications to securely connect to external data sources and tools. When you connect Almanac via MCP, your AI client can:
- 🔍 Search across all your indexed data sources
- 🧠 Use LightRAG's intelligent retrieval modes
- 📊 Access both vector and graph-based search
- 🔒 Maintain security through local connections
Claude Desktop supports MCP servers through its configuration file.
- Almanac running locally (
pnpm start) - Claude Desktop installed
- Server accessible at
http://localhost:3000
-
Locate your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
-
Add Almanac to your MCP servers:
Open the config file and add the following to the
mcpServerssection:{ "mcpServers": { "almanac": { "url": "http://127.0.0.1:3000/mcp", "type": "streamableHttp", "disabled": false } } } -
Restart Claude Desktop
-
Verify the connection:
In Claude Desktop, you should see Almanac listed in the MCP servers section. Try asking:
"Search my Almanac data for discussions about API refactoring"
Here's a complete example with multiple MCP servers:
{
"mcpServers": {
"almanac": {
"url": "http://127.0.0.1:3000/mcp",
"type": "streamableHttp",
"disabled": false
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/files"]
}
}
}Cline is a VS Code extension that supports MCP servers for enhanced AI assistance.
- Almanac running locally (
pnpm start) - Cline extension installed in VS Code
- Server accessible at
http://localhost:3000
-
Open Cline settings in VS Code:
- Open Command Palette (
Cmd/Ctrl + Shift + P) - Search for "Cline: Open MCP Settings"
- Open Command Palette (
-
Add Almanac to your MCP servers:
Add the following configuration:
{ "mcpServers": { "almanac": { "url": "http://localhost:3000/mcp", "type": "streamableHttp", "disabled": false } } } -
Restart VS Code or reload the Cline extension
-
Verify the connection:
In Cline, you should see Almanac tools available. Try asking:
"Use Almanac to search for information about our authentication system"
ChatGPT supports MCP servers through its Developer Mode feature.
ChatGPT requires your Almanac server to be publicly accessible on the internet. This means:
- ❌
localhostconnections are NOT supported ⚠️ Your data will be accessible over the internet- 🔒 You MUST implement proper security measures:
- Authentication/API keys
- HTTPS/TLS encryption
- Firewall rules
- Rate limiting
We strongly advise only exposing Almanac publicly if you have the expertise to secure it properly.
- Almanac deployed on a publicly accessible server with HTTPS
- ChatGPT Plus or Enterprise subscription
- Developer Mode enabled in ChatGPT
-
Deploy Almanac to a public server:
# Example using a cloud provider # Ensure HTTPS is configured # Set up authentication
-
Enable Developer Mode in ChatGPT:
Follow OpenAI's official guide: Developer Mode and MCP Apps in ChatGPT
-
Add Almanac as an MCP server:
In ChatGPT's Developer Mode settings, add:
{ "url": "https://your-domain.com/mcp", "type": "streamableHttp" } -
Verify the connection:
In ChatGPT, try asking:
"Search my Almanac data for recent project updates"
Before exposing Almanac publicly:
- HTTPS/TLS configured with valid certificate
- Authentication mechanism implemented
- API rate limiting enabled
- Firewall rules configured
- Monitoring and logging enabled
- Regular security updates applied
- Backup strategy in place
Once connected, your AI client will have access to these Almanac tools:
Search your indexed data using LightRAG's intelligent retrieval.
Parameters:
query(string, required): Your search querymode(string, optional): Query mode -naive,local,global,hybrid, ormix(default:mix)top_k(number, optional): Number of results to return (default: 5)
Example usage in Claude:
"Use lightrag_query to search for 'API authentication' in hybrid mode"
- naive: Fast keyword search
- local: Entity-focused search (people, projects, concepts)
- global: Relationship-focused search (connections, workflows)
- hybrid: Balanced combination of local and global
- mix: Best results (combines all modes with reranking)
Problem: AI client can't connect to Almanac
Solutions:
- Verify Almanac is running:
curl http://localhost:3000/health - Check the URL in your config (use
127.0.0.1instead oflocalhostif needed) - Ensure no firewall is blocking the connection
- Restart your AI client after config changes
Problem: MCP server connected but no tools appear
Solutions:
- Check Almanac logs for errors
- Verify you have data sources connected and synced
- Ensure indexing has completed
- Restart both Almanac and your AI client
Problem: Queries take a long time to return results
Solutions:
- Try a simpler query mode (
naiveorlocal) - Reduce
top_kparameter - Check if indexing is still in progress
- Review Almanac performance settings in
.env
- Query Modes Guide - Learn when to use each mode
- API Reference - Direct API usage
- Best Practices - Optimize your queries
Need help? Open an issue on GitHub