Chatlog MCP Server
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., "@Chatlog MCP Serversearch the 'Marketing' chatroom for messages containing 'budget' from last week"
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.
Chatlog MCP Server
A Model Context Protocol (MCP) server for analyzing chat logs from various platforms. This server provides convenient access to chat data through MCP-compatible clients like Claude Code.
✨ Features
🔍 4 Core Tools: List chatrooms, contacts, sessions, and chatlogs
📊 Advanced Analytics: Message statistics, active members, keyword analysis
🔎 Flexible Search: Time range, keyword, and sender filtering
📈 Data Export: JSON, Text, and CSV formats
🌐 Multi-Client Support: Claude Code, Cursor, VS Code, and more
🛠️ Easy Installation: pip install and go
Related MCP server: imessage-mcp
📦 Installation
Option 1: Install from PyPI (Recommended)
pip install chatlog-mcp-serverOption 2: Install from Source
git clone https://github.com/anthropics/chatlog-mcp-server.git
cd chatlog-mcp-server
pip install -e .Option 3: Install with Development Dependencies
pip install -e ".[dev]"🚀 Quick Start
1. Install the Package
pip install chatlog-mcp-server2. Configure MCP Client
Create a mcp-servers.json file:
{
"mcpServers": {
"chatlog": {
"command": "chatlog-mcp",
"args": [],
"env": {
"PYTHONIOENCODING": "utf-8"
}
}
}
}3. Start Using
In Claude Code, simply say:
Use the chatlog tool to list chatrooms🛠️ Configuration
Environment Variables
You can configure the server using environment variables:
Variable | Description | Default |
| HTTP API server URL |
|
| Logging level |
|
Command Line Options
chatlog-mcp --helpOptions:
--api-url URL: Set custom API URL--log-level LEVEL: Set logging level (debug, info, warning, error)--version: Show version and exit
Example Configuration
{
"mcpServers": {
"chatlog": {
"command": "chatlog-mcp",
"args": ["--api-url", "http://localhost:5030", "--log-level", "debug"],
"env": {
"PYTHONIOENCODING": "utf-8"
}
}
}
}📚 Tools
The Chatlog MCP Server provides 4 core tools:
1. list_chatrooms
Get a list of chatrooms with optional keyword search.
Parameters:
keyword(optional): Search keywordformat(optional): Output format (json/text)
Example:
Use chatlog to list chatrooms with keyword "AI"2. list_contacts
Get a list of contacts with optional keyword search.
Parameters:
keyword(optional): Search keywordformat(optional): Output format (json/text)
Example:
Use chatlog to list contacts with keyword "John"3. get_recent_sessions
Get a list of recent sessions.
Parameters:
format(optional): Output format (json/text)
Example:
Use chatlog to get recent sessions4. get_chatlog
Get chat logs for a specific time range and chatroom.
Parameters:
time(required): Time range (e.g., "2026-01-13" or "2026-01-10~2026-01-13")talker(required): Chatroom or contact IDsender(optional): Filter by senderkeyword(optional): Search keywordlimit(optional): Limit number of resultsoffset(optional): Offset for paginationformat(optional): Output format (json/text/csv)
Example:
Use chatlog to get chatlogs with these parameters:
{
"time": "2026-01-13",
"talker": "123456789@chatroom",
"format": "json"
}📊 Use Cases
Case 1: Analyze Chatroom Activity
# Get chat logs for the last 7 days
curl "http://127.0.0.1:5030/api/v1/chatlog?time=2026-01-07~2026-01-13&talker=44156635321@chatroom&format=json"Case 2: Search for Specific Keywords
# Find messages containing "AI"
curl "http://127.0.0.1:5030/api/v1/chatlog?time=2026-01-13&talker=44156635321@chatroom&keyword=AI&format=json"Case 3: Get Top Active Members
# Export data and analyze with Python
curl "http://127.0.0.1:5030/api/v1/chatlog?time=2026-01-10~2026-01-13&talker=44156635321@chatroom&format=json" > chatlog.jsonThen use the provided analysis scripts:
python -m chatlog_mcp.examples.analyze chatlog.json🔧 Development
Setup Development Environment
git clone https://github.com/anthropics/chatlog-mcp-server.git
cd chatlog-mcp-server
pip install -e ".[dev]"Run Tests
pytestCode Formatting
black chatlog_mcp/
flake8 chatlog_mcp/
mypy chatlog_mcp/📖 Examples
See the examples/ directory for:
Sample configurations
Analysis scripts
Data export examples
Integration guides
🤝 Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Development Workflow
Fork the repository
Create a feature branch:
git checkout -b feature/amazing-featureMake your changes
Run tests:
pytestCommit changes:
git commit -m 'Add amazing feature'Push to branch:
git push origin feature/amazing-featureOpen a Pull Request
📋 Requirements
Python 3.10 or higher
HTTP API server running on specified URL
MCP-compatible client (Claude Code, Cursor, etc.)
🐛 Troubleshooting
Common Issues
Issue: "Unknown skill: chatlog"
Ensure the MCP server is running
Check that the configuration is correct
Verify the command path is accessible
Issue: "Connection refused"
Ensure the HTTP API server is running
Check the API URL in configuration
Verify network connectivity
Issue: Chinese characters not displaying correctly
Ensure
PYTHONIOENCODING=utf-8is setUse UTF-8 encoding for all files
Check terminal encoding settings
For more help, see TROUBLESHOOTING.md or open an issue.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
Model Context Protocol for the amazing protocol
Claude Code for the MCP client
Anthropic for the support
📞 Support
📧 Email: support@anthropic.com
🐛 Issues: GitHub Issues
📖 Docs: Full Documentation
🗺️ Roadmap
Add support for more chat platforms
Real-time message streaming
Advanced analytics and visualization
Webhook support
Plugin system for custom analysis
RESTful API for external integrations
Made with ❤️ by the Claude Code team
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.
Related MCP Servers
- FlicenseBqualityCmaintenanceEnables AI-assisted analysis of log files through advanced searching, filtering, and test execution capabilities. Supports time-based queries, pattern matching, test summarization, and code coverage reporting directly within compatible MCP clients.12
- Alicense-qualityCmaintenanceA read-only MCP server for macOS that enables users to search through iMessage history and analyze conversation patterns using AI-powered tools. It provides detailed statistics on messaging habits, streaks, and contact analytics while keeping all data private and local.971
- Flicense-qualityDmaintenanceEnables users to read, search, and manage Telegram messages in channels, groups, and private chats through MCP tools.
- AlicenseAqualityCmaintenanceEnables AI agents to securely access and search enterprise WeChat (WeCom) chat records with full decryption and auditing, supporting message retrieval, decryption, local storage, and querying via MCP tools.92MIT
Related MCP Connectors
A paid remote MCP for AI SDK data query MCP, built to return verdicts, receipts, usage logs, and aud
Social media analytics, video analysis, and competitor intel for any MCP-compatible AI agent.
A paid remote MCP for AI SDK eval dashboard, built to return verdicts, receipts, usage logs, and aud
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/yhai3596/MCP-chatlog'
If you have feedback or need assistance with the MCP directory API, please join our Discord server