mirror of
https://github.com/blazickjp/arxiv-mcp-server.git
synced 2025-07-25 20:38:49 +03:00
Merge pull request #9 from smithery-ai/smithery/config-vqpd
Deployment: Dockerfile and Smithery config
This commit is contained in:
37
Dockerfile
Normal file
37
Dockerfile
Normal file
@@ -0,0 +1,37 @@
|
||||
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
|
||||
# Use a Python base image with uv pre-installed
|
||||
FROM ghcr.io/astral-sh/uv:python3.11-slim AS uv
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /app
|
||||
|
||||
# Enable bytecode compilation for better performance
|
||||
ENV UV_COMPILE_BYTECODE=1
|
||||
|
||||
# Use copy mode for mounting cache to avoid linking issues
|
||||
ENV UV_LINK_MODE=copy
|
||||
|
||||
# Install project dependencies using uv
|
||||
RUN --mount=type=cache,target=/root/.cache/uv --mount=type=bind,source=pyproject.toml,target=pyproject.toml --mount=type=bind,source=uv.lock,target=uv.lock uv sync --frozen --no-install-project --no-dev --no-editable
|
||||
|
||||
# Copy the rest of the application code
|
||||
ADD . /app
|
||||
|
||||
# Install the application
|
||||
RUN --mount=type=cache,target=/root/.cache/uv uv sync --frozen --no-dev --no-editable
|
||||
|
||||
# Create a minimal Python environment
|
||||
FROM python:3.11-slim-bookworm
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the installed dependencies and the virtual environment
|
||||
COPY --from=uv /root/.local /root/.local
|
||||
COPY --from=uv --chown=app:app /app/.venv /app/.venv
|
||||
|
||||
# Set the PATH to include the virtual environment
|
||||
ENV PATH="/app/.venv/bin:$PATH"
|
||||
|
||||
# Set the default entrypoint
|
||||
ENTRYPOINT ["python", "-m", "arxiv_mcp_server"]
|
||||
@@ -165,4 +165,4 @@ Released under the MIT License. See the LICENSE file for details.
|
||||
Made with ❤️ by the Pear Labs Team
|
||||
|
||||
<a href="https://glama.ai/mcp/servers/04dtxi5i5n"><img width="380" height="200" src="https://glama.ai/mcp/servers/04dtxi5i5n/badge" alt="ArXiv Server MCP server" /></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
17
smithery.yaml
Normal file
17
smithery.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
# 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:
|
||||
- arxivStoragePath
|
||||
properties:
|
||||
arxivStoragePath:
|
||||
type: string
|
||||
description: The path to store downloaded papers.
|
||||
commandFunction:
|
||||
# A function that produces the CLI command to start the MCP on stdio.
|
||||
|-
|
||||
(config) => ({ command: 'python', args: ['-m', 'arxiv_mcp_server'], env: { ARXIV_STORAGE_PATH: config.arxivStoragePath } })
|
||||
Reference in New Issue
Block a user