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.5.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.5-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: logseq_2_mcp-0.5.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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.5.tar.gz
Algorithm Hash digest
SHA256 b83c70ecd42310ca82bff67cd0a0584b864d38076ff6de8f4a5e42cc4c8adf93
MD5 e19ff28bdc84b9552a737c2e0bc1cd88
BLAKE2b-256 5910ec6934aa440f47c6fbfa52102f348dab5f92ca3ba75739ece628d6efc5f9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: logseq_2_mcp-0.5-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 282538535ed3d1886b83af47950a38f5f60946f88859722692dccc7bbe810fb8
MD5 aba34f180b9f5eae5cb8a7f82ae2b496
BLAKE2b-256 7f4a31b8411b9a0c4964575e455889e379c9dee0d05d725bdd219d13a3a8e01c

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