Skip to content

Commit 823b50c

Browse files
committed
feat(mcp server): add mcp server
1 parent 91b5f4e commit 823b50c

File tree

4 files changed

+372
-0
lines changed

4 files changed

+372
-0
lines changed

backend/mcp/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM ghcr.io/astral-sh/uv:python3.13-bookworm
2+
3+
WORKDIR /app
4+
COPY ./backend/mcp/uv.lock ./backend/mcp/pyproject.toml .
5+
RUN uv sync --frozen
6+
RUN apt-get update && apt-get install -y --no-install-recommends \
7+
curl && \
8+
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
9+
apt-get install -y --no-install-recommends nodejs
10+
COPY ./backend/mcp ./mcp
11+
COPY ./backend/shared_mcp ./shared_mcp
12+
ENV PYTHONPATH /app:$PYTHONPATH

backend/mcp/main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from shared_mcp.tools import mcp
2+
3+
if __name__ == "__main__":
4+
mcp.run(transport="sse")

backend/mcp/pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[project]
2+
name = "mcp-server"
3+
version = "0.1.0"
4+
description = "Add your description here"
5+
readme = "README.md"
6+
requires-python = ">=3.13"
7+
dependencies = [
8+
"mcp[cli]>=1.6.0",
9+
]

0 commit comments

Comments
 (0)