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

Uploaded Python 3

File details

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

File metadata

  • Download URL: logseq_2_mcp-0.2.1.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","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.2.1.tar.gz
Algorithm Hash digest
SHA256 38dec6fcbb8e5adda77d885b07e0bb0a18b2ec62199b2694228cb347f54537ab
MD5 251be46fe341e366dcadf58c9279b79a
BLAKE2b-256 c7f2913fe0e5763e3563d1a989841424b660aceae8d3bcae82fbc88572d2eb7d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: logseq_2_mcp-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 61e56d8ea1d5759494b796c20b883e3a90e040e950a51015cd413d47c9fd681f
MD5 5a540d849e76d8e259712e39237b30b6
BLAKE2b-256 e245ab40b1817ffdd83a884d8c9f9c62e4cf8ec0be5f43b892d738f42920214b

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