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"] 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. 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