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.7.tar.gz (16.7 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.7-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: logseq_2_mcp-0.7.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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.7.tar.gz
Algorithm Hash digest
SHA256 0483c4fdc22b37a36d69c2875363458b4af46866432b87ed8950bd5497bab6fb
MD5 d05bf732a9aa8320c2af873b91b8568e
BLAKE2b-256 a624937d98c044f3e620d3fa797147ce4b5f67294be13f681ddb69b2f60ee53d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: logseq_2_mcp-0.7-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 027fd7d6a7d3f725782f06d5d7c6fd9947486072061641594b59280b419c265f
MD5 2acfbdfff10048fea04a494d2b0b3f9d
BLAKE2b-256 f1e9f911e05917104b689b0f9701b770f33c2d62e6d5b8b0f740eafa1245bb41

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