# Laterless MCP Server

Access your [Laterless](https://laterless.com) bookmarks knowledge base from AI tools like OpenClaw, Claude Desktop, and Cursor.

## Features

| Tool | Description |
|------|-------------|
| `search_bookmarks` | Semantic search — find bookmarks by meaning |
| `list_bookmarks` | Browse recent bookmarks |
| `get_bookmark` | Read full bookmark content |
| `add_bookmark` | Save a URL as a bookmark |
| `add_brain_dump` | Record a thought or idea |
| `get_profile` | View your profile and stats |

## Setup

### 1. Get an API Key

Go to your Laterless profile → API Keys → Generate a new key.

### 2. Install

```bash
# Option A: Run directly with uvx (no install needed)
uvx mcp-server-laterless

# Option B: Install with pip
pip install mcp-server-laterless
```

### 3. Configure Your AI Tool

#### OpenClaw

Add to `~/.config/openclaw/openclaw.json`:

```json
{
  "mcpServers": {
    "laterless": {
      "command": "uvx",
      "args": ["mcp-server-laterless"],
      "env": {
        "LATERLESS_API_KEY": "ltls_your_key_here"
      }
    }
  }
}
```

#### Claude Desktop

Add to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "laterless": {
      "command": "uvx",
      "args": ["mcp-server-laterless"],
      "env": {
        "LATERLESS_API_KEY": "ltls_your_key_here"
      }
    }
  }
}
```

#### Cursor

Add to `.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "laterless": {
      "command": "uvx",
      "args": ["mcp-server-laterless"],
      "env": {
        "LATERLESS_API_KEY": "ltls_your_key_here"
      }
    }
  }
}
```

## Environment Variables

| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| `LATERLESS_API_KEY` | Yes | — | Your API key (`ltls_...`) |
| `LATERLESS_API_URL` | No | `https://gate.laterless.com` | API base URL (for self-hosting) |

## Development

```bash
cd integrations/mcp-server

# Install dependencies
uv sync

# Run locally
LATERLESS_API_KEY=ltls_xxx uv run mcp-server-laterless

# Test with MCP Inspector
npx @modelcontextprotocol/inspector uv run mcp-server-laterless
```

## License

MIT
