connecting-to-logseqlisted
Install: claude install-skill aiskillstore/marketplace
# Connecting to Logseq
## When to Use This Skill
This skill auto-invokes when:
- User wants to connect Claude to their Logseq graph
- Setting up Logseq integration or API tokens
- Troubleshooting connection issues
- Configuring graph paths or backends
- User mentions "connect to logseq", "logseq api", "logseq token"
- Questions about HTTP API, CLI, or MCP server setup
**Setup Scripts**: See `{baseDir}/scripts/` for initialization utilities.
## Available Backends
| Backend | Requires Logseq Running | Read | Write | Best For |
|---------|------------------------|------|-------|----------|
| HTTP API | Yes | Full | Full | Real-time, interactive |
| CLI | No | Full | Limited | Offline, batch, CI/CD |
| MCP Server | Yes (via HTTP) | Full | Full | Claude-native tools |
## Quick Start
### 1. Enable Logseq HTTP API
In Logseq:
1. **Settings** → **Advanced** → **Developer mode**: ON
2. **Settings** → **Advanced** → **HTTP APIs server**: ON
3. **Settings** → **Advanced** → **Authorization tokens** → Create token
### 2. Set Environment Variable
```bash
export LOGSEQ_API_TOKEN="your-token-here"
```
### 3. Initialize Plugin
Run the setup wizard:
```bash
python {baseDir}/scripts/init-environment.py
```
Or use the command: `/logseq:init`
## Backend Details
### HTTP API (Primary)
**URL**: `http://127.0.0.1:12315/api`
**Request Format**:
```json
POST /api
Content-Type: application/json
Authorization: Bearer YOUR_TOKEN
{
"method": "logseq.Editor.getPage",
"args": ["PageNam