From ba08bb19106125153f6feb8fdb08edeb73edf2fb Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Wed, 29 Jan 2025 01:02:49 +0800 Subject: [PATCH 1/3] Add Dockerfile --- Dockerfile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..da48222 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile +# Start with a Python image that includes hatchling +FROM python:3.11-slim + +# Set working directory +WORKDIR /app + +# Copy the necessary files +COPY pyproject.toml README.md /app/ + +# Install the project's dependencies +RUN pip install hatchling + +# Use hatchling to build the project +RUN hatch build + +# Install the built project +RUN pip install . + +# Expose necessary environment variables for LogSeq API +ENV LOGSEQ_API_TOKEN=your_token_here +ENV LOGSEQ_API_URL=http://localhost:12315 + +# Set the entrypoint to the MCP server script +ENTRYPOINT ["mcp-logseq"] From 514c8f68a8dae67937cc987d569675e905aba8d8 Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Wed, 29 Jan 2025 01:02:50 +0800 Subject: [PATCH 2/3] Add Smithery configuration --- smithery.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 smithery.yaml diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..f26837d --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,21 @@ +# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml + +startCommand: + type: stdio + configSchema: + # JSON Schema defining the configuration options for the MCP. + type: object + required: + - logseqApiToken + properties: + logseqApiToken: + type: string + description: The API token for the LogSeq server. + logseqApiUrl: + type: string + default: http://localhost:12315 + description: The URL for the LogSeq server. + commandFunction: + # A function that produces the CLI command to start the MCP on stdio. + |- + (config) => ({command: 'mcp-logseq', args: [], env: {LOGSEQ_API_TOKEN: config.logseqApiToken, LOGSEQ_API_URL: config.logseqApiUrl}}) \ No newline at end of file From 41ae4d3516eba9b9cd60dcee20279971650799ce Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Wed, 29 Jan 2025 01:02:51 +0800 Subject: [PATCH 3/3] Update README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9bffe4a..f990e15 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # MCP server for LogSeq +[![smithery badge](https://smithery.ai/badge/mcp-logseq)](https://smithery.ai/server/mcp-logseq) MCP server to interact with LogSeq via its API.