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

Uploaded Python 3

File details

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

File metadata

  • Download URL: logseq_2_mcp-0.6.tar.gz
  • Upload date:
  • Size: 14.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.6.tar.gz
Algorithm Hash digest
SHA256 f5efc1cb258d3abd1fbd5c2b2fc847579b12a2cd2d91316974ba932e5f4abcee
MD5 8eb7a8d8ebe7f5c276c4bd424f3a445f
BLAKE2b-256 013c099bd765008acc4bcc40793b39f71a762684c879484bc40572543c40e3ce

See more details on using hashes here.

File details

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

File metadata

  • Download URL: logseq_2_mcp-0.6-py3-none-any.whl
  • Upload date:
  • Size: 17.9 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ba845a9de33821c3927312e01cb3f24a7c909d66fbe6948220517557f40e4e9d
MD5 3f8849d58a1cd470eac448f9459f2c37
BLAKE2b-256 7855b5a405bdec818243301f42cfa97dfe7d89b2f5124c704d848ef6f49f6300

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