Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Lint

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
lint:
name: Lint & Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"

- name: Ruff check
run: ruff check .

- name: Ruff format check
run: ruff format --check .

- name: isort check
run: isort --check .

- name: Pyright
run: pyright
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Integration Tests

on:
push:
Expand All @@ -7,56 +7,8 @@ on:
branches: [main]

jobs:
lint:
name: Lint & Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"

- name: Ruff check
run: ruff check .

- name: Ruff format check
run: ruff format --check .

- name: isort check
run: isort --check .

- name: Pyright
run: pyright

test-unit:
name: Unit Tests (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12", "3.13"]
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"

- name: Run unit tests
run: pytest tests/ -v --ignore=tests/integration/

test-integration:
name: Integration Tests (NC ${{ matrix.nextcloud-version }})
name: NC ${{ matrix.nextcloud-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -115,7 +67,14 @@ jobs:
NEXTCLOUD_URL: http://localhost:8080
NEXTCLOUD_USER: admin
NEXTCLOUD_PASSWORD: admin
run: pytest tests/integration/ -v -m integration
run: pytest tests/integration/ -v -m integration --cov=nextcloud_mcp --cov-report=xml:coverage-integration.xml

- name: Upload coverage
uses: codecov/codecov-action@v5
with:
files: coverage-integration.xml
flags: integration,nc${{ matrix.nextcloud-version }}
fail_ci_if_error: false

- name: Dump Nextcloud logs on failure
if: failure()
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/tests-unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Unit Tests

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test-unit:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12", "3.13"]
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"

- name: Run unit tests
run: pytest tests/ -v --ignore=tests/integration/ --cov=nextcloud_mcp --cov-report=xml:coverage-unit.xml

- name: Upload coverage
uses: codecov/codecov-action@v5
with:
files: coverage-unit.xml
flags: unit,py${{ matrix.python-version }}
fail_ci_if_error: false
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Nextcloud MCP Server

[![Lint](https://github.com/cloud-py-api/nextcloud-mcp-server/actions/workflows/lint.yml/badge.svg)](https://github.com/cloud-py-api/nextcloud-mcp-server/actions/workflows/lint.yml)
[![Unit Tests](https://github.com/cloud-py-api/nextcloud-mcp-server/actions/workflows/tests-unit.yml/badge.svg)](https://github.com/cloud-py-api/nextcloud-mcp-server/actions/workflows/tests-unit.yml)
[![Integration Tests](https://github.com/cloud-py-api/nextcloud-mcp-server/actions/workflows/tests-integration.yml/badge.svg)](https://github.com/cloud-py-api/nextcloud-mcp-server/actions/workflows/tests-integration.yml)
[![codecov](https://codecov.io/gh/cloud-py-api/nextcloud-mcp-server/graph/badge.svg)](https://codecov.io/gh/cloud-py-api/nextcloud-mcp-server)

> **Experimental** — This repository is fully maintained by AI (Claude). It serves as an experiment in autonomous AI-driven open-source development.

An [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) server that exposes Nextcloud APIs as tools for AI assistants. Connect any MCP-compatible client (Claude Desktop, Claude Code, etc.) to your Nextcloud instance and let AI manage files, read notifications, interact with Talk, and more.
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ optional-dependencies.dev = [
"pyright>=1.1",
"pytest>=8",
"pytest-asyncio>=0.24",
"pytest-cov>=6",
"ruff>=0.8",
]
scripts.nextcloud-mcp = "nextcloud_mcp.__main__:main"
Expand Down
Loading