# kivv Workers - Which One Do I Use?
You have **TWO workers** deployed to Cloudflare:
---
## π kivv-mcp (MCP Server)
**URL:** https://kivv-mcp.jeffbarron.workers.dev
**Purpose:** This is your **user-facing API** - what you interact with directly.
**What it does:**
- β
Handles MCP (Model Context Protocol) requests from Claude Desktop
- β
Serves RSS/Atom feeds
- β
Provides REST API for listing, searching, and managing papers
- β
Authenticates with your API key
- β
Returns paper data, summaries, and metadata
**When you use it:**
- π₯οΈ **Claude Desktop integration** - This is the URL in your `claude_desktop_config.json`
- π° **RSS feeds** - `/feeds/jeff/rss.xml` endpoint
- π **Direct API calls** - `/mcp/list-library`, `/mcp/search-papers`, etc.
- π₯ **Health checks** - `/health` endpoint
**Example usage:**
```bash
# Health check
curl https://kivv-mcp.jeffbarron.workers.dev/health
# List papers (requires API key)
curl -X POST https://kivv-mcp.jeffbarron.workers.dev/mcp/list-library \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"limit": 10}'
# RSS feed (no auth required)
curl https://kivv-mcp.jeffbarron.workers.dev/feeds/jeff/rss.xml
```
**Claude Desktop config:**
```json
{
"mcpServers": {
"kivv": {
"url": "https://kivv-mcp.jeffbarron.workers.dev/mcp",
"headers": {
"x-api-key": "YOUR_API_KEY"
}
}
}
}
```
---
## βοΈ kivv-automation (Background Worker)
**URL:** https://kivv-automation.jeffbarron.workers.dev
**Purpose:** This is your **background automation** - runs automatically, you don't interact with it.
**What it does:**
- β° Runs automatically every day at **6:00 AM UTC** (cron trigger)
- π Searches arXiv for new papers matching your topics
- π€ Uses Claude Haiku to score paper relevance (0.0-1.0)
- βοΈ Uses Claude Sonnet to generate summaries (for papers scoring β₯0.7)
- πΎ Stores papers and summaries in database
- π Creates checkpoints for resumable execution
- π° Enforces $1/day budget cap
**When it runs:**
- π
Automatically daily at 6 AM UTC
- π§ Manually via `/run` endpoint (requires CRON_SECRET)
**You typically DON'T interact with this directly**, but you can:
**Manual trigger (optional):**
```bash
# Requires CRON_SECRET from Cloudflare Dashboard
curl -X POST https://kivv-automation.jeffbarron.workers.dev/run \
-H "Authorization: Bearer YOUR_CRON_SECRET"
```
**Health check:**
```bash
curl https://kivv-automation.jeffbarron.workers.dev/health
```
**Monitor execution:**
```bash
# View logs
npx wrangler tail kivv-automation
# Check last run in Cloudflare Dashboard:
# Workers β kivv-automation β Metrics
```
---
## π― Quick Summary
| Aspect | kivv-mcp | kivv-automation |
|--------|----------|-----------------|
| **You interact with it** | β
YES | β NO |
| **Purpose** | Serve data to you | Collect papers from arXiv |
| **When it runs** | On-demand (when you query) | Daily at 6 AM UTC |
| **Endpoints** | `/mcp/*`, `/feeds/*`, `/health` | `/run`, `/health` |
| **Authentication** | Your API key (x-api-key header) | CRON_SECRET (for manual trigger) |
| **What you use it for** | Claude Desktop, RSS, API calls | Nothing (runs automatically) |
| **Can manually trigger** | N/A (always available) | Yes (via `/run` endpoint) |
---
## π How They Work Together
```
1. kivv-automation runs at 6 AM UTC
ββ Fetches your enabled topics from database
ββ Searches arXiv for new papers
ββ AI scores relevance (Haiku)
ββ AI generates summaries (Sonnet, if relevant)
ββ Stores papers in database
2. You query kivv-mcp
ββ Via Claude Desktop: "List my research papers"
ββ Via RSS reader: Fetches /feeds/jeff/rss.xml
ββ Via API: curl /mcp/list-library
3. kivv-mcp returns papers
ββ Queries database for your papers
ββ Filters by user_id (data isolation)
ββ Returns papers with summaries
```
---
## π Which URL Do You Use?
**For Claude Desktop config:** `https://kivv-mcp.jeffbarron.workers.dev/mcp`
**For RSS feed:** `https://kivv-mcp.jeffbarron.workers.dev/feeds/jeff/rss.xml`
**For API calls:** `https://kivv-mcp.jeffbarron.workers.dev/mcp/*`
**For automation:** Nothing (it runs automatically) or `https://kivv-automation.jeffbarron.workers.dev/run` (manual trigger)
---
## π₯ Health Check Both Workers
```bash
# MCP server (should return healthy)
curl https://kivv-mcp.jeffbarron.workers.dev/health
# Automation worker (should return healthy)
curl https://kivv-automation.jeffbarron.workers.dev/health
```
Both should return:
```json
{
"status": "healthy",
"timestamp": "2025-12-01T00:00:00.000Z",
"services": {
"database": "connected",
"cache": "connected",
"storage": "connected"
},
"version": "1.0.0"
}
```
---
## π Getting Started
**Step 1:** Use **kivv-mcp** for everything you interact with:
```bash
# Configure Claude Desktop
nano ~/.config/claude/claude_desktop_config.json
# Add kivv-mcp URL
{
"mcpServers": {
"kivv": {
"url": "https://kivv-mcp.jeffbarron.workers.dev/mcp",
"headers": {
"x-api-key": "YOUR_NEW_KEY"
}
}
}
}
```
**Step 2:** Let **kivv-automation** run automatically:
- Runs daily at 6 AM UTC
- No configuration needed
- Check Cloudflare Dashboard β Workers β kivv-automation β Metrics to see last run
**Step 3:** Optionally monitor automation:
```bash
# View live logs
npx wrangler tail kivv-automation
```
---
## π‘ Pro Tips
**If no papers showing up:**
- Automation hasn't run yet (runs at 6 AM UTC)
- Manually trigger: `curl -X POST https://kivv-automation.jeffbarron.workers.dev/run -H "Authorization: Bearer CRON_SECRET"`
- Check topics are enabled: `SELECT * FROM topics WHERE enabled = 1`
**To check automation status:**
- Cloudflare Dashboard β Workers β kivv-automation β Metrics
- Look for "Cron Invocations"
- Check "Errors" count (should be 0)
**To view collected papers:**
- Claude Desktop: "List my research papers"
- RSS feed: https://kivv-mcp.jeffbarron.workers.dev/feeds/jeff/rss.xml
- API: `curl -X POST https://kivv-mcp.jeffbarron.workers.dev/mcp/list-library -H "x-api-key: KEY" -H "Content-Type: application/json" -d '{"limit":10}'`
---
**Bottom line:** Use **kivv-mcp** for everything. **kivv-automation** works in the background automatically.