Compare commits

...

8 Commits

Author SHA1 Message Date
github-actions[bot] 847a69e2ba bump: version 0.2.3 → 0.2.4 2025-05-25 10:33:45 +00:00
Chris Coutinho 186d2c1d94 Merge pull request #34 from cbcoutinho/feature/logging
fix: Configure logging
2025-05-25 12:33:20 +02:00
Chris Coutinho 96d5789200 fix: Do not update dependencies when running in Dockerfile 2025-05-25 12:26:01 +02:00
Chris Coutinho b332c54330 ci: Setup uv using action, make sure uv runs tests without updating 2025-05-25 12:02:57 +02:00
Chris Coutinho 9a05b171ae ci: Install uv using curl 2025-05-25 11:55:21 +02:00
Chris Coutinho e93eb9d302 fix: Configure logging 2025-05-25 11:46:41 +02:00
Chris Coutinho 5af7c25dab Merge branch 'master' of github.com:cbcoutinho/nextcloud-mcp-server 2025-05-25 10:59:26 +02:00
Chris Coutinho a0b9482915 build: Only build on tags 2025-05-25 10:59:14 +02:00
9 changed files with 18 additions and 30 deletions
@@ -2,7 +2,6 @@ name: Build and Publish Docker Image
on:
push:
branches: [ "master" ]
tags: ["*"]
jobs:
+3 -9
View File
@@ -16,14 +16,8 @@ jobs:
uses: hoverkraft-tech/compose-action@8be2d741e891ac9b8ac20825e6f3904149599925 # v2.2.0
with:
compose-file: "./docker-compose.yml"
- name: Install dependencies
run: |
sudo apt update -y && sudo apt install -y pipx
pipx install uv
uv sync --locked
env:
DEBIAN_FRONTEND: "noninteractive"
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
- name: Wait for service to be ready
run: |
@@ -48,4 +42,4 @@ jobs:
NEXTCLOUD_USERNAME: "admin"
NEXTCLOUD_PASSWORD: "admin"
run: |
uv run python -m pytest
uv run --frozen python -m pytest
+7
View File
@@ -1,3 +1,10 @@
## v0.2.4 (2025-05-25)
### Fix
- Do not update dependencies when running in Dockerfile
- Configure logging
## v0.2.3 (2025-05-25)
### Fix
+1 -5
View File
@@ -6,8 +6,4 @@ COPY . .
RUN uv sync --locked
ENV VIRTUAL_ENV=/app/.venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
ENV FASTMCP_LOG_LEVEL=DEBUG
CMD ["mcp", "run", "--transport", "sse", "nextcloud_mcp_server/server.py:mcp"]
CMD ["uv", "run", "--locked", "mcp", "run", "--transport", "sse", "nextcloud_mcp_server/server.py:mcp"]
-3
View File
@@ -1,12 +1,9 @@
import os
import time # Import time for sleep
import mimetypes
from io import BytesIO
from httpx import (
Client,
Auth,
BasicAuth,
Headers,
Request,
Response,
HTTPStatusError,
+1 -4
View File
@@ -4,11 +4,8 @@ LOGGING_CONFIG = {
"version": 1,
"handlers": {
"default": {
"class": "logging.FileHandler",
"class": "logging.StreamHandler",
"formatter": "http",
# "stream": "ext://sys.stderr"
"filename": "/tmp/nextcloud-mcp-server.log",
"mode": "a",
}
},
"formatters": {
+4 -6
View File
@@ -11,8 +11,6 @@ import asyncio # Import asyncio
setup_logging()
logger = logging.getLogger(__name__)
@dataclass
class AppContext:
@@ -23,11 +21,9 @@ class AppContext:
async def app_lifespan(server: FastMCP) -> AsyncIterator[AppContext]:
"""Manage application lifecycle with type-safe context"""
# Initialize on startup
logger.info("Creating Nextcloud client")
logging.info("Creating Nextcloud client")
client = NextcloudClient.from_env()
# Add a small delay to allow client initialization to complete
logger.info("Waiting 2 seconds for client initialization...")
logger.info("Client initialization wait complete.")
logging.info("Client initialization wait complete.")
try:
yield AppContext(client=client)
finally:
@@ -38,6 +34,8 @@ async def app_lifespan(server: FastMCP) -> AsyncIterator[AppContext]:
# Create an MCP server
mcp = FastMCP("Nextcloud MCP", lifespan=app_lifespan)
logger = logging.getLogger(__name__)
@mcp.resource("nc://capabilities")
def nc_get_capabilities():
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "nextcloud-mcp-server"
version = "0.2.3"
version = "0.2.4"
description = ""
authors = [
{name = "Chris Coutinho",email = "chris@coutinho.io"}
Generated
+1 -1
View File
@@ -492,7 +492,7 @@ wheels = [
[[package]]
name = "nextcloud-mcp-server"
version = "0.2.3"
version = "0.2.4"
source = { editable = "." }
dependencies = [
{ name = "httpx" },