Manages connections to Logseq graphs via HTTP API, CLI, or MCP Server. Auto-invokes when users mention connecting to Logseq, API tokens, graph paths, connection issues, or backend configuration. Handles backend detection, environment setup, and connectivity troubleshooting.
Manages connections to Logseq graphs via HTTP API, CLI, or MCP Server.
npx claudepluginhub c0ntr0lledcha0s/claude-code-plugin-automationsThis skill is limited to using the following tools:
assets/env.example.jsonreferences/cli-guide.mdreferences/http-api-guide.mdreferences/troubleshooting.mdThis skill auto-invokes when:
Setup Scripts: See {baseDir}/scripts/ for initialization utilities.
| 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 |
In Logseq:
export LOGSEQ_API_TOKEN="your-token-here"
Run the setup wizard:
python {baseDir}/scripts/init-environment.py
Or use the command: /logseq:init
URL: http://127.0.0.1:12315/api
Request Format:
POST /api
Content-Type: application/json
Authorization: Bearer YOUR_TOKEN
{
"method": "logseq.Editor.getPage",
"args": ["PageName"]
}
Common Methods:
logseq.App.getCurrentGraph - Get current graph infologseq.Editor.getPage - Get page by namelogseq.Editor.getBlock - Get block by UUIDlogseq.DB.datascriptQuery - Execute Datalog querylogseq.Editor.insertBlock - Create new blockInstallation:
npm install -g @logseq/cli
Usage:
# Query local graph
logseq query "[:find ?title :where [?p :block/title ?title]]" --graph ~/logseq/my-graph
# With running Logseq (in-app mode)
logseq query "..." --in-app -a YOUR_TOKEN
The plugin includes a custom MCP server that exposes Logseq operations as Claude tools.
Location: servers/logseq-mcp/
Build:
cd servers/logseq-mcp
npm install
npm run build
Location: .claude/logseq-expert/env.json
{
"backend": "auto",
"http": {
"url": "http://127.0.0.1:12315",
"token": "${LOGSEQ_API_TOKEN}"
},
"cli": {
"graphPath": "/path/to/graph",
"inApp": false
},
"mcp": {
"enabled": true
},
"preferences": {
"defaultGraph": null,
"confirmWrites": false,
"backupBeforeWrite": false
}
}
curl -X POST http://127.0.0.1:12315/api \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"method":"logseq.App.getCurrentGraph"}'
echo $LOGSEQ_API_TOKENnpm install -g @logseq/clinpx @logseq/cli --helpcd servers/logseq-mcp && npm run build| Script | Purpose |
|---|---|
init-environment.py | Interactive setup wizard |
detect-backend.py | Auto-detect available backends |
test-connection.py | Test connectivity |
preflight-checks.sh | Validate environment |
Run scripts from plugin root:
python logseq-expert/scripts/init-environment.py
${VAR} syntax for env varsActivates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.