# Zoho Timeline MCP Server
An MCP (Model Context Protocol) server that enables Claude Desktop to interactively capture and analyze Zoho CRM timeline screenshots.
## Features
- **Interactive Screenshot Capture**: Click on Zoho CRM windows and let Claude capture them
- **Automatic OCR & Parsing**: Extracts timeline events, workflows, and functions
- **Chronological Analysis**: Orders events and identifies patterns
- **Export to Multiple Formats**: JSON and Markdown reports
## Prerequisites
1. **Python 3.10+**
2. **Claude Desktop** (with MCP support)
3. **Anthropic API Key**
4. **Tesseract OCR** (for text extraction)
- Windows: Download from https://github.com/UB-Mannheim/tesseract/wiki
- Add to PATH: `C:\Program Files\Tesseract-OCR`
## Installation
### 1. Install Tesseract OCR
Download and install Tesseract from:
https://github.com/UB-Mannheim/tesseract/wiki
Make sure to add it to your PATH during installation.
### 2. Clone or Download This Project
```bash
cd %USERPROFILE%\Documents
# If you received this as a zip, extract it here
# Or if in a git repo: git clone <repo-url> zoho-timeline-mcp
cd zoho-timeline-mcp
```
### 3. Create Virtual Environment
```bash
python -m venv venv
venv\Scripts\activate
```
### 4. Install Dependencies
```bash
pip install -e .
```
### 5. Install Windows-Specific Dependencies
For active window capture on Windows:
```bash
pip install pywin32
```
### 6. Set Up Anthropic API Key
Create a `.env` file in the project root:
```
ANTHROPIC_API_KEY=your_api_key_here
```
Or set it as an environment variable:
```bash
setx ANTHROPIC_API_KEY "your_api_key_here"
```
## Configuration for Claude Desktop
Add this to your Claude Desktop configuration file:
**Location:** `%APPDATA%\Claude\claude_desktop_config.json`
```json
{
"mcpServers": {
"zoho-timeline": {
"command": "python",
"args": [
"-m",
"zoho_timeline_mcp.server"
],
"cwd": "C:\\Users\\YourUsername\\Documents\\zoho-timeline-mcp",
"env": {
"ANTHROPIC_API_KEY": "your_api_key_here"
}
}
}
}
```
**Important:** Replace `YourUsername` and `your_api_key_here` with your actual values.
## Usage
### 1. Start Claude Desktop
After configuring, restart Claude Desktop. The MCP server will start automatically.
### 2. Capture Screenshots
In Claude Desktop, say:
```
Capture a screenshot of the Zoho timeline
```
Claude will:
1. Capture the active window
2. Save it temporarily
3. Ask if you want to capture more
### 3. Capture Multiple Screenshots
Keep capturing:
```
Capture another screenshot
```
Or click on the next part of the timeline and say:
```
Capture this screen too
```
### 4. Process Timeline
When done capturing:
```
Process the timeline screenshots
```
Claude will:
1. Analyze all screenshots using vision API
2. Extract timeline events chronologically
3. Identify workflows and functions
4. Return comprehensive JSON and report
### 5. Export Results
```
Export the results to files
```
Files are saved to: `%USERPROFILE%\Documents\ZohoTimelineAnalysis\`
## Available Tools
The MCP server provides these tools to Claude:
### `capture_screenshot`
Captures a screenshot of the active window or full screen.
**Parameters:**
- `capture_type`: "active_window" or "full_screen" (default: "active_window")
### `list_screenshots`
Lists all captured screenshots with IDs and timestamps.
### `process_timeline`
Processes all captured screenshots and extracts timeline data.
**Parameters:**
- `api_key`: Optional Anthropic API key (uses env var if not provided)
### `clear_screenshots`
Clears all captured screenshots to start fresh.
### `export_results`
Exports timeline analysis to JSON and Markdown files.
**Parameters:**
- `output_dir`: Optional output directory (default: Documents/ZohoTimelineAnalysis)
## Output Format
### Timeline JSON
```json
{
"lead_timeline": {
"date": "Nov 25, 2025",
"events": [
{
"timestamp": "02:30 PM",
"event_type": "Lead Created",
"action": "Lead Created",
"triggered_by": "Function",
"function_name": "Leads CR Process Power Almanac Files"
},
...
]
}
}
```
### Workflows & Functions JSON
```json
{
"workflow_rules": {
"count": 13,
"list": [
"Leads - Cr - Format Phone",
...
]
},
"functions": {
"count": 9,
"list": [
"Lead_VerifyEmailHunterIO",
...
]
}
}
```
## Troubleshooting
### Screenshots Not Capturing
1. Make sure the Zoho window is active and visible
2. Try full screen mode: `capture_type: "full_screen"`
3. Check that mss library is installed: `pip install mss`
### pywin32 Errors
If you get errors about pywin32:
```bash
python venv\Scripts\pywin32_postinstall.py -install
```
### API Key Issues
Verify your API key is set:
```bash
echo %ANTHROPIC_API_KEY%
```
### Tesseract Not Found
Make sure Tesseract is installed and in your PATH:
```bash
tesseract --version
```
If not found, add to PATH:
```
C:\Program Files\Tesseract-OCR
```
### MCP Server Not Starting
1. Check Claude Desktop logs: `%APPDATA%\Claude\logs`
2. Test the server manually:
```bash
python -m zoho_timeline_mcp.server
```
3. Verify configuration file syntax (must be valid JSON)
## Example Workflow
```
User: "Capture the current Zoho timeline window"
Claude: [captures screenshot] ✓ Screenshot 1 captured. Ready for another?
User: "Scroll down and capture the next section"
Claude: [captures screenshot] ✓ Screenshot 2 captured. Continue?
User: "One more"
Claude: [captures screenshot] ✓ Screenshot 3 captured. Ready to process?
User: "Process all the screenshots"
Claude: [processes with vision API] ✓ Timeline analyzed!
Found 13 workflow rules and 9 functions...
[displays full report]
User: "Export these results"
Claude: ✓ Saved to Documents\ZohoTimelineAnalysis\
```
## Development
### Running Tests
```bash
pytest
```
### Code Formatting
```bash
black src/
```
## License
MIT License - feel free to modify and use as needed.
## Support
For issues or questions:
1. Check the troubleshooting section
2. Review Claude Desktop MCP logs
3. Test the server in standalone mode
## Roadmap
- [ ] Support for multiple monitors
- [ ] Automatic scroll detection
- [ ] Batch processing of saved screenshots
- [ ] Export to Excel format
- [ ] Template-based report generation
- [ ] Integration with Zoho API for validation