feat(contacts): Initialize Contacts App

This commit is contained in:
Chris Coutinho
2025-08-03 14:15:37 +02:00
parent ad95140416
commit 37b1057d2a
5 changed files with 19 additions and 1 deletions
+2
View File
@@ -12,6 +12,7 @@ from nextcloud_mcp_server.server import (
configure_notes_tools, configure_notes_tools,
configure_tables_tools, configure_tables_tools,
configure_webdav_tools, configure_webdav_tools,
configure_contacts_tools,
) )
setup_logging() setup_logging()
@@ -56,6 +57,7 @@ configure_notes_tools(mcp)
configure_tables_tools(mcp) configure_tables_tools(mcp)
configure_webdav_tools(mcp) configure_webdav_tools(mcp)
configure_calendar_tools(mcp) configure_calendar_tools(mcp)
configure_contacts_tools(mcp)
def run(): def run():
+2
View File
@@ -5,6 +5,7 @@ from httpx import AsyncClient, Auth, BasicAuth, Request, Response
from ..controllers.notes_search import NotesSearchController from ..controllers.notes_search import NotesSearchController
from .calendar import CalendarClient from .calendar import CalendarClient
from .contacts import ContactsClient
from .notes import NotesClient from .notes import NotesClient
from .tables import TablesClient from .tables import TablesClient
from .webdav import WebDAVClient from .webdav import WebDAVClient
@@ -43,6 +44,7 @@ class NextcloudClient:
self.webdav = WebDAVClient(self._client, username) self.webdav = WebDAVClient(self._client, username)
self.tables = TablesClient(self._client, username) self.tables = TablesClient(self._client, username)
self.calendar = CalendarClient(self._client, username) self.calendar = CalendarClient(self._client, username)
self.contacts = ContactsClient(self._client, username)
# Initialize controllers # Initialize controllers
self._notes_search = NotesSearchController() self._notes_search = NotesSearchController()
+2
View File
@@ -2,10 +2,12 @@ from .calendar import configure_calendar_tools
from .notes import configure_notes_tools from .notes import configure_notes_tools
from .tables import configure_tables_tools from .tables import configure_tables_tools
from .webdav import configure_webdav_tools from .webdav import configure_webdav_tools
from .contacts import configure_contacts_tools
__all__ = [ __all__ = [
"configure_calendar_tools", "configure_calendar_tools",
"configure_notes_tools", "configure_notes_tools",
"configure_tables_tools", "configure_tables_tools",
"configure_webdav_tools", "configure_webdav_tools",
"configure_contacts_tools",
] ]
+2 -1
View File
@@ -11,7 +11,8 @@ dependencies = [
"mcp[cli] (>=1.10,<1.11)", "mcp[cli] (>=1.10,<1.11)",
"httpx (>=0.28.1,<0.29.0)", "httpx (>=0.28.1,<0.29.0)",
"pillow (>=11.2.1,<12.0.0)", "pillow (>=11.2.1,<12.0.0)",
"icalendar (>=6.0.0,<7.0.0)" "icalendar (>=6.0.0,<7.0.0)",
"pythonvcard4>=0.2.0",
] ]
[tool.pytest.ini_options] [tool.pytest.ini_options]
Generated
+11
View File
@@ -512,6 +512,7 @@ dependencies = [
{ name = "icalendar" }, { name = "icalendar" },
{ name = "mcp", extra = ["cli"] }, { name = "mcp", extra = ["cli"] },
{ name = "pillow" }, { name = "pillow" },
{ name = "pythonvcard4" },
] ]
[package.dev-dependencies] [package.dev-dependencies]
@@ -530,6 +531,7 @@ requires-dist = [
{ name = "icalendar", specifier = ">=6.0.0,<7.0.0" }, { name = "icalendar", specifier = ">=6.0.0,<7.0.0" },
{ name = "mcp", extras = ["cli"], specifier = ">=1.10,<1.11" }, { name = "mcp", extras = ["cli"], specifier = ">=1.10,<1.11" },
{ name = "pillow", specifier = ">=11.2.1,<12.0.0" }, { name = "pillow", specifier = ">=11.2.1,<12.0.0" },
{ name = "pythonvcard4", specifier = ">=0.2.0" },
] ]
[package.metadata.requires-dev] [package.metadata.requires-dev]
@@ -843,6 +845,15 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/45/58/38b5afbc1a800eeea951b9285d3912613f2603bdf897a4ab0f4bd7f405fc/python_multipart-0.0.20-py3-none-any.whl", hash = "sha256:8a62d3a8335e06589fe01f2a3e178cdcc632f3fbe0d492ad9ee0ec35aab1f104", size = 24546, upload-time = "2024-12-16T19:45:44.423Z" }, { url = "https://files.pythonhosted.org/packages/45/58/38b5afbc1a800eeea951b9285d3912613f2603bdf897a4ab0f4bd7f405fc/python_multipart-0.0.20-py3-none-any.whl", hash = "sha256:8a62d3a8335e06589fe01f2a3e178cdcc632f3fbe0d492ad9ee0ec35aab1f104", size = 24546, upload-time = "2024-12-16T19:45:44.423Z" },
] ]
[[package]]
name = "pythonvcard4"
version = "0.2.0"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/34/04/02d5952a9d8cbcb9e62b4fc4f6f842e8d43aead6e307f83e6fd6f7352fbd/pythonvcard4-0.2.0.tar.gz", hash = "sha256:236bba2769e459645cfa776407ff07856aced45b437116bf40ddb39bbcefdb6d", size = 5530, upload-time = "2025-04-26T23:18:48.963Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/0d/2f/ee10d88bbe12e4e9e06f81589d999687038e5cd5fec6c05aed57c50aede6/pythonvcard4-0.2.0-py3-none-any.whl", hash = "sha256:dce31355dd50aee537f8883de86f301510e407bc1755a68ec8d5055b64f5c660", size = 5890, upload-time = "2025-04-26T23:18:48.2Z" },
]
[[package]] [[package]]
name = "pyyaml" name = "pyyaml"
version = "6.0.2" version = "6.0.2"