Skip to main content

MCP server for semantic search over Logseq journal entries

Project description

Bestie MCP

MCP server for semantic search over Logseq journal entries, backed by PGVector and Amazon Bedrock embeddings.

Requirements

  • Python 3.11+
  • PostgreSQL with the pgvector extension
  • AWS credentials with Bedrock access (Titan Embed v2 + Claude)

Setup

pip install -e .
cp .env.example .env  # edit with your values

Environment variables:

Variable Default Description
PGVECTOR_DB_URL postgresql+psycopg://postgres:postgres@localhost:5432/postgres Postgres connection string
BEDROCK_AWS_PROFILE AWS profile name (takes precedence over key/secret)
BEDROCK_IAM_ACCESS_KEY AWS access key ID
BEDROCK_IAM_SECRET_KEY AWS secret access key

Transports

Streamable HTTP (recommended — for LibreChat, Claude Code, remote use)

The server runs on port 9999 by default and exposes the MCP endpoint at /mcp.

# direct
python -m logseq_mcp.main

# with options
python -m logseq_mcp.main --host 0.0.0.0 --port 9999

# via env var
MCP_TRANSPORT=http python -m logseq_mcp.main

Claude Code — add to .mcp.json in your project root:

{
  "mcpServers": {
    "logseq": {
      "type": "http",
      "url": "http://localhost:9999/mcp"
    }
  }
}

LibreChat — add to librechat.yaml:

mcpServers:
  logseq:
    type: streamable-http
    url: http://localhost:9999/mcp

stdio (for local Claude Desktop / CLI use)

python -m logseq_mcp.main --transport stdio

# via env var
MCP_TRANSPORT=stdio python -m logseq_mcp.main

Claude Code — add to .mcp.json:

{
  "mcpServers": {
    "logseq": {
      "type": "stdio",
      "command": "python",
      "args": ["-m", "logseq_mcp.main", "--transport", "stdio"],
      "env": {
        "PGVECTOR_DB_URL": "postgresql+psycopg://postgres:postgres@localhost:5432/postgres",
        "BEDROCK_AWS_PROFILE": "your-profile"
      }
    }
  }
}

Docker

Runs streamable HTTP on port 9999 via gunicorn + UvicornWorker (4 workers by default).

docker build -t logseq-mcp .
docker run -p 9999:9999 \
  -e PGVECTOR_DB_URL=postgresql+psycopg://user:pass@host:5432/db \
  -e BEDROCK_IAM_ACCESS_KEY=... \
  -e BEDROCK_IAM_SECRET_KEY=... \
  logseq-mcp

To tune the worker count:

docker run -p 9999:9999 ... logseq-mcp \
  gunicorn logseq_mcp.main:app \
  --worker-class uvicorn.workers.UvicornWorker \
  --workers 2 \
  --bind 0.0.0.0:9999

Health check: GET /health

Tools

search_journal_entries

Semantic search over Logseq journal entries using vector similarity.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

logseq_2_mcp-0.3.1.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

logseq_2_mcp-0.3.1-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file logseq_2_mcp-0.3.1.tar.gz.

File metadata

  • Download URL: logseq_2_mcp-0.3.1.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for logseq_2_mcp-0.3.1.tar.gz
Algorithm Hash digest
SHA256 414db8e78b9614a360d5d20262d6680145818713979011b6c003268bee9afdb7
MD5 09d0a40dd6b957aceb8d5223baf714a6
BLAKE2b-256 6507fdc9b67c503bfbc7060eae1257958b0771bf6ab6d30e32f4b83f1898c22c

See more details on using hashes here.

File details

Details for the file logseq_2_mcp-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: logseq_2_mcp-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for logseq_2_mcp-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ce4fb65a9fc77030f36d14248efcc525935ac383a6d737734706d861e0064e0b
MD5 92dcf70207e4371581047947fca17825
BLAKE2b-256 7445cabfa402997f7e49d142f57f0f1ae156409b6899542a311cf1efddd3e3bb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page