iflow-mcp_democratize-technology-chronos-mcp 2.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/LICENSE +21 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/PKG-INFO +299 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/README.md +257 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/__init__.py +5 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/__main__.py +9 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/accounts.py +410 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/bulk.py +946 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/caldav_utils.py +149 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/calendars.py +204 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/config.py +187 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/credentials.py +190 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/events.py +515 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/exceptions.py +477 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/journals.py +477 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/logging_config.py +23 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/models.py +202 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/py.typed +0 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/rrule.py +259 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/search.py +315 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/server.py +121 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/tasks.py +518 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/tools/__init__.py +29 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/tools/accounts.py +151 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/tools/base.py +59 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/tools/bulk.py +557 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/tools/calendars.py +142 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/tools/events.py +698 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/tools/journals.py +310 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/tools/tasks.py +414 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/utils.py +163 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/chronos_mcp/validation.py +636 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/iflow_mcp_democratize_technology_chronos_mcp.egg-info/PKG-INFO +299 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/iflow_mcp_democratize_technology_chronos_mcp.egg-info/SOURCES.txt +72 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/iflow_mcp_democratize_technology_chronos_mcp.egg-info/dependency_links.txt +1 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/iflow_mcp_democratize_technology_chronos_mcp.egg-info/entry_points.txt +2 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/iflow_mcp_democratize_technology_chronos_mcp.egg-info/requires.txt +16 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/iflow_mcp_democratize_technology_chronos_mcp.egg-info/top_level.txt +2 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/pyproject.toml +67 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/setup.cfg +4 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/setup.py +15 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/__init__.py +0 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/conftest.py +91 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/__init__.py +0 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_accounts.py +380 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_accounts_ssrf.py +134 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_base.py +135 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_bulk.py +380 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_bulk_create.py +408 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_bulk_delete.py +341 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_bulk_resource_limits.py +74 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_caldav_utils.py +300 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_calendars.py +286 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_config.py +111 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_config_validation.py +128 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_credentials_security.py +189 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_cryptography_security.py +178 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_events.py +536 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_exceptions.py +58 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_journals.py +1097 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_models.py +95 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_race_conditions.py +202 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_recurring_events.py +156 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_rrule.py +217 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_search.py +372 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_search_advanced.py +333 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_server_input_validation.py +219 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_ssrf_protection.py +505 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_tasks.py +918 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_thread_safety.py +301 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_tools_journals.py +617 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_tools_tasks.py +968 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_url_validation_security.py +234 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_utils.py +180 -0
- iflow_mcp_democratize_technology_chronos_mcp-2.0.0/tests/unit/test_validation.py +983 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Democratize Technology and Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: iflow-mcp_democratize-technology-chronos-mcp
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: A comprehensive CalDAV MCP server for calendar management
|
|
5
|
+
Author-email: Code Developer <code-developer@democratize.technology>
|
|
6
|
+
Maintainer-email: Code Developer <code-developer@democratize.technology>
|
|
7
|
+
License: MIT
|
|
8
|
+
Project-URL: Repository, https://github.com/democratize-technology/chronos-mcp
|
|
9
|
+
Project-URL: Documentation, https://github.com/democratize-technology/chronos-mcp#readme
|
|
10
|
+
Project-URL: Issues, https://github.com/democratize-technology-chronos-mcp/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/democratize-technology-chronos-mcp/blob/main/CHANGELOG.md
|
|
12
|
+
Keywords: caldav,calendar,mcp,fastmcp,icalendar,tasks,journal
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Office/Business :: Scheduling
|
|
22
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: fastmcp>=2.0.0
|
|
27
|
+
Requires-Dist: caldav>=1.3.0
|
|
28
|
+
Requires-Dist: icalendar>=5.0.0
|
|
29
|
+
Requires-Dist: pytz>=2024.1
|
|
30
|
+
Requires-Dist: python-dateutil>=2.8.0
|
|
31
|
+
Requires-Dist: pydantic>=2.0.0
|
|
32
|
+
Requires-Dist: httpx>=0.27.0
|
|
33
|
+
Requires-Dist: keyring>=24.0.0
|
|
34
|
+
Requires-Dist: cryptography>=46.0.1
|
|
35
|
+
Provides-Extra: dev
|
|
36
|
+
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
37
|
+
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
|
|
38
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
39
|
+
Requires-Dist: black>=24.0.0; extra == "dev"
|
|
40
|
+
Requires-Dist: ruff>=0.5.0; extra == "dev"
|
|
41
|
+
Dynamic: license-file
|
|
42
|
+
|
|
43
|
+
# Chronos MCP - Advanced CalDAV Management Server
|
|
44
|
+
|
|
45
|
+
[](https://www.python.org/downloads/)
|
|
46
|
+
[](https://github.com/jlowin/fastmcp)
|
|
47
|
+
[](https://tools.ietf.org/html/rfc4791)
|
|
48
|
+
[](https://opensource.org/licenses/MIT)
|
|
49
|
+
|
|
50
|
+
A comprehensive Model Context Protocol (MCP) server for CalDAV calendar management, built with FastMCP 2.0. Chronos provides advanced calendar and event management capabilities with multi-account support.
|
|
51
|
+
|
|
52
|
+
## 🚀 Features
|
|
53
|
+
|
|
54
|
+
- **Multi-account Support**: Manage multiple CalDAV servers simultaneously
|
|
55
|
+
- **Full CRUD Operations**: Create, read, update, and delete calendars and events ✅
|
|
56
|
+
- **Advanced Event Management**:
|
|
57
|
+
- Recurring events with RRULE support ✅
|
|
58
|
+
- Event updates with partial field modifications ✅
|
|
59
|
+
- Attendee management and invitations (JSON format) ✅
|
|
60
|
+
- Reminders and alarms (VALARM) ✅
|
|
61
|
+
- Timezone-aware operations
|
|
62
|
+
- **Advanced Search**:
|
|
63
|
+
- Full-text search across events ✅
|
|
64
|
+
- Field-specific search (title, description, location) ✅
|
|
65
|
+
- Multiple match types (contains, starts_with, exact, regex) ✅
|
|
66
|
+
- Date range filtering ✅
|
|
67
|
+
- Relevance ranking algorithm ✅
|
|
68
|
+
- **Bulk Operations**:
|
|
69
|
+
- Create multiple events in parallel ✅
|
|
70
|
+
- Delete multiple events efficiently ✅
|
|
71
|
+
- Atomic operations with rollback ✅
|
|
72
|
+
- Configurable error handling modes ✅
|
|
73
|
+
- **Security Hardening**:
|
|
74
|
+
- Comprehensive input validation ✅
|
|
75
|
+
- XSS and injection prevention ✅
|
|
76
|
+
- Path traversal protection ✅
|
|
77
|
+
- RFC-compliant validation ✅
|
|
78
|
+
- **Task Management**: Full VTODO support ✅
|
|
79
|
+
- **Journal Entries**: Full VJOURNAL support ✅
|
|
80
|
+
- **Import/Export**: iCalendar format support (coming soon)
|
|
81
|
+
- **Sync Capabilities**: Calendar synchronization between accounts (coming soon)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
## 📋 Task Management (VTODO)
|
|
85
|
+
|
|
86
|
+
Chronos MCP provides comprehensive support for CalDAV tasks:
|
|
87
|
+
|
|
88
|
+
- **Create tasks** with due dates, priorities, and descriptions
|
|
89
|
+
- **Track progress** with percentage completion (0-100%)
|
|
90
|
+
- **Manage status**: NEEDS-ACTION, IN-PROCESS, COMPLETED, CANCELLED
|
|
91
|
+
- **Create subtasks** using related_to relationships
|
|
92
|
+
- **Bulk operations** for efficient task management
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Example: Create a task
|
|
96
|
+
mcp call create_task '{
|
|
97
|
+
"calendar_uid": "my-calendar",
|
|
98
|
+
"summary": "Complete project documentation",
|
|
99
|
+
"due": "2025-02-01T15:00:00Z",
|
|
100
|
+
"priority": 2
|
|
101
|
+
}'
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
## 📓 Journal Entries (VJOURNAL)
|
|
106
|
+
|
|
107
|
+
Keep detailed records with CalDAV journal entries:
|
|
108
|
+
|
|
109
|
+
- **Create journal entries** with timestamps and rich descriptions
|
|
110
|
+
- **Link related entries** using related_to relationships
|
|
111
|
+
- **Organize with categories** for better searchability
|
|
112
|
+
- **Update and manage** existing journal entries
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# Example: Create a journal entry
|
|
116
|
+
mcp call create_journal '{
|
|
117
|
+
"calendar_uid": "my-calendar",
|
|
118
|
+
"summary": "Team Meeting Notes",
|
|
119
|
+
"description": "Discussed Q1 objectives..."
|
|
120
|
+
}'
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
For detailed usage, see [VTODO/VJOURNAL Guide](docs/VTODO_VJOURNAL_GUIDE.md).
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
## 🔐 Security
|
|
127
|
+
|
|
128
|
+
### Secure Password Storage (New!)
|
|
129
|
+
|
|
130
|
+
Chronos MCP now supports secure password storage using your system's keyring (via python-keyring). When available, passwords are automatically stored in:
|
|
131
|
+
- **macOS**: Keychain Access
|
|
132
|
+
- **Windows**: Windows Credential Locker
|
|
133
|
+
- **Linux**: Secret Service (GNOME Keyring, KWallet, etc.)
|
|
134
|
+
|
|
135
|
+
### Migration to Secure Storage
|
|
136
|
+
|
|
137
|
+
If you have existing accounts with passwords stored in plain text, migrate them to secure storage:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
# Check what will be migrated (dry run)
|
|
141
|
+
python scripts/migrate_to_keyring.py --dry-run
|
|
142
|
+
|
|
143
|
+
# Perform actual migration
|
|
144
|
+
python scripts/migrate_to_keyring.py
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
The migration script will:
|
|
148
|
+
1. Read existing passwords from `~/.chronos/accounts.json`
|
|
149
|
+
2. Store them securely in your system keyring
|
|
150
|
+
3. Create a backup of the original configuration
|
|
151
|
+
4. Remove passwords from the JSON file
|
|
152
|
+
|
|
153
|
+
### Fallback Behavior
|
|
154
|
+
|
|
155
|
+
If keyring is not available (e.g., SSH sessions, containers), Chronos MCP will:
|
|
156
|
+
- Warn about the security implications
|
|
157
|
+
- Fall back to storing passwords in the configuration file
|
|
158
|
+
- Automatically attempt to migrate passwords to keyring when it becomes available
|
|
159
|
+
|
|
160
|
+
### Legacy Security Warning
|
|
161
|
+
|
|
162
|
+
**Note**: If keyring is not installed or available, passwords will be stored in plain text at `~/.chronos/accounts.json`. Install keyring support with:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
pip install "chronos-mcp[secure]" # or just: pip install keyring
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Installation
|
|
169
|
+
|
|
170
|
+
### Standard Installation
|
|
171
|
+
```bash
|
|
172
|
+
pip install -e .
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Secure Installation (Recommended)
|
|
176
|
+
Includes keyring support for secure password storage:
|
|
177
|
+
```bash
|
|
178
|
+
pip install -e ".[secure]"
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Or if you already have Chronos installed:
|
|
182
|
+
```bash
|
|
183
|
+
pip install keyring>=24.0.0
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Configuration
|
|
187
|
+
|
|
188
|
+
### Environment Variables (Default Account)
|
|
189
|
+
```bash
|
|
190
|
+
CALDAV_BASE_URL=http://<YOUR_CALDAV_SERVER>:5232
|
|
191
|
+
CALDAV_USERNAME=<YOUR_USERNAME>
|
|
192
|
+
CALDAV_PASSWORD=<YOUR_PASSWORD>
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Multi-Account Configuration
|
|
196
|
+
|
|
197
|
+
Create `~/.chronos/accounts.json`:
|
|
198
|
+
```json
|
|
199
|
+
{
|
|
200
|
+
"accounts": {
|
|
201
|
+
"personal": {
|
|
202
|
+
"url": "http://<YOUR_CALDAV_SERVER>:5232",
|
|
203
|
+
"username": "<YOUR_USERNAME>",
|
|
204
|
+
"display_name": "Personal Calendar"
|
|
205
|
+
},
|
|
206
|
+
"work": {
|
|
207
|
+
"url": "https://caldav.company.com",
|
|
208
|
+
"username": "user",
|
|
209
|
+
"display_name": "Work Calendar"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"default_account": "personal"
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
**Note**: Passwords are not included in the JSON when using keyring. They will be:
|
|
217
|
+
- Prompted for on first use and stored securely
|
|
218
|
+
- Migrated from existing configuration using `scripts/migrate_to_keyring.py`
|
|
219
|
+
- Only stored in JSON if keyring is unavailable (with a warning)
|
|
220
|
+
|
|
221
|
+
## Usage
|
|
222
|
+
|
|
223
|
+
### Running the Server
|
|
224
|
+
```bash
|
|
225
|
+
./run_chronos.sh
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Basic Operations
|
|
229
|
+
|
|
230
|
+
List all configured accounts:
|
|
231
|
+
```
|
|
232
|
+
list_accounts()
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
### Example Tool Usage
|
|
237
|
+
|
|
238
|
+
Create an event with reminder:
|
|
239
|
+
```python
|
|
240
|
+
chronos:create_event(
|
|
241
|
+
calendar_uid="assistant",
|
|
242
|
+
summary="Team Meeting",
|
|
243
|
+
start="2025-07-08T14:00:00",
|
|
244
|
+
end="2025-07-08T15:00:00",
|
|
245
|
+
location="Conference Room",
|
|
246
|
+
alarm_minutes="15" # Note: Pass as string!
|
|
247
|
+
)
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
Create recurring event with attendees:
|
|
251
|
+
```python
|
|
252
|
+
chronos:create_event(
|
|
253
|
+
calendar_uid="work",
|
|
254
|
+
summary="Weekly Standup",
|
|
255
|
+
start="2025-07-07T09:00:00",
|
|
256
|
+
end="2025-07-07T09:30:00",
|
|
257
|
+
recurrence_rule="FREQ=WEEKLY;BYDAY=MO,WE,FR",
|
|
258
|
+
attendees_json='[{"email": "team@example.com", "name": "Team"}]'
|
|
259
|
+
)
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
Delete an event:
|
|
263
|
+
```python
|
|
264
|
+
chronos:delete_event(
|
|
265
|
+
calendar_uid="assistant",
|
|
266
|
+
event_uid="abc-123-def-456"
|
|
267
|
+
)
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
Update an event (partial update):
|
|
271
|
+
```python
|
|
272
|
+
chronos:update_event(
|
|
273
|
+
calendar_uid="assistant",
|
|
274
|
+
event_uid="abc-123-def-456",
|
|
275
|
+
location="Room 202", # Update location
|
|
276
|
+
alarm_minutes="30" # Change reminder to 30 minutes
|
|
277
|
+
# Other fields remain unchanged
|
|
278
|
+
)
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
## Documentation
|
|
282
|
+
|
|
283
|
+
- [API Reference](docs/api/README.md) - Complete API documentation
|
|
284
|
+
- [Architecture Guide](docs/ARCHITECTURE.md) - System design and components
|
|
285
|
+
- [RRULE Guide](docs/RRULE_GUIDE.md) - Recurring events documentation
|
|
286
|
+
- [Data Flows](docs/DATA_FLOWS.md) - Request/response patterns
|
|
287
|
+
- [Design Decisions](docs/DESIGN_DECISIONS.md) - Technical choices explained
|
|
288
|
+
|
|
289
|
+
## Known Issues
|
|
290
|
+
|
|
291
|
+
See [KNOWN_ISSUES.md](KNOWN_ISSUES.md) for current limitations and workarounds.
|
|
292
|
+
|
|
293
|
+
## Changelog
|
|
294
|
+
|
|
295
|
+
See [CHANGELOG.md](CHANGELOG.md) for version history.
|
|
296
|
+
|
|
297
|
+
## Contributing
|
|
298
|
+
|
|
299
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development guidelines.
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
# Chronos MCP - Advanced CalDAV Management Server
|
|
2
|
+
|
|
3
|
+
[](https://www.python.org/downloads/)
|
|
4
|
+
[](https://github.com/jlowin/fastmcp)
|
|
5
|
+
[](https://tools.ietf.org/html/rfc4791)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
A comprehensive Model Context Protocol (MCP) server for CalDAV calendar management, built with FastMCP 2.0. Chronos provides advanced calendar and event management capabilities with multi-account support.
|
|
9
|
+
|
|
10
|
+
## 🚀 Features
|
|
11
|
+
|
|
12
|
+
- **Multi-account Support**: Manage multiple CalDAV servers simultaneously
|
|
13
|
+
- **Full CRUD Operations**: Create, read, update, and delete calendars and events ✅
|
|
14
|
+
- **Advanced Event Management**:
|
|
15
|
+
- Recurring events with RRULE support ✅
|
|
16
|
+
- Event updates with partial field modifications ✅
|
|
17
|
+
- Attendee management and invitations (JSON format) ✅
|
|
18
|
+
- Reminders and alarms (VALARM) ✅
|
|
19
|
+
- Timezone-aware operations
|
|
20
|
+
- **Advanced Search**:
|
|
21
|
+
- Full-text search across events ✅
|
|
22
|
+
- Field-specific search (title, description, location) ✅
|
|
23
|
+
- Multiple match types (contains, starts_with, exact, regex) ✅
|
|
24
|
+
- Date range filtering ✅
|
|
25
|
+
- Relevance ranking algorithm ✅
|
|
26
|
+
- **Bulk Operations**:
|
|
27
|
+
- Create multiple events in parallel ✅
|
|
28
|
+
- Delete multiple events efficiently ✅
|
|
29
|
+
- Atomic operations with rollback ✅
|
|
30
|
+
- Configurable error handling modes ✅
|
|
31
|
+
- **Security Hardening**:
|
|
32
|
+
- Comprehensive input validation ✅
|
|
33
|
+
- XSS and injection prevention ✅
|
|
34
|
+
- Path traversal protection ✅
|
|
35
|
+
- RFC-compliant validation ✅
|
|
36
|
+
- **Task Management**: Full VTODO support ✅
|
|
37
|
+
- **Journal Entries**: Full VJOURNAL support ✅
|
|
38
|
+
- **Import/Export**: iCalendar format support (coming soon)
|
|
39
|
+
- **Sync Capabilities**: Calendar synchronization between accounts (coming soon)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## 📋 Task Management (VTODO)
|
|
43
|
+
|
|
44
|
+
Chronos MCP provides comprehensive support for CalDAV tasks:
|
|
45
|
+
|
|
46
|
+
- **Create tasks** with due dates, priorities, and descriptions
|
|
47
|
+
- **Track progress** with percentage completion (0-100%)
|
|
48
|
+
- **Manage status**: NEEDS-ACTION, IN-PROCESS, COMPLETED, CANCELLED
|
|
49
|
+
- **Create subtasks** using related_to relationships
|
|
50
|
+
- **Bulk operations** for efficient task management
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Example: Create a task
|
|
54
|
+
mcp call create_task '{
|
|
55
|
+
"calendar_uid": "my-calendar",
|
|
56
|
+
"summary": "Complete project documentation",
|
|
57
|
+
"due": "2025-02-01T15:00:00Z",
|
|
58
|
+
"priority": 2
|
|
59
|
+
}'
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## 📓 Journal Entries (VJOURNAL)
|
|
64
|
+
|
|
65
|
+
Keep detailed records with CalDAV journal entries:
|
|
66
|
+
|
|
67
|
+
- **Create journal entries** with timestamps and rich descriptions
|
|
68
|
+
- **Link related entries** using related_to relationships
|
|
69
|
+
- **Organize with categories** for better searchability
|
|
70
|
+
- **Update and manage** existing journal entries
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Example: Create a journal entry
|
|
74
|
+
mcp call create_journal '{
|
|
75
|
+
"calendar_uid": "my-calendar",
|
|
76
|
+
"summary": "Team Meeting Notes",
|
|
77
|
+
"description": "Discussed Q1 objectives..."
|
|
78
|
+
}'
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
For detailed usage, see [VTODO/VJOURNAL Guide](docs/VTODO_VJOURNAL_GUIDE.md).
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
## 🔐 Security
|
|
85
|
+
|
|
86
|
+
### Secure Password Storage (New!)
|
|
87
|
+
|
|
88
|
+
Chronos MCP now supports secure password storage using your system's keyring (via python-keyring). When available, passwords are automatically stored in:
|
|
89
|
+
- **macOS**: Keychain Access
|
|
90
|
+
- **Windows**: Windows Credential Locker
|
|
91
|
+
- **Linux**: Secret Service (GNOME Keyring, KWallet, etc.)
|
|
92
|
+
|
|
93
|
+
### Migration to Secure Storage
|
|
94
|
+
|
|
95
|
+
If you have existing accounts with passwords stored in plain text, migrate them to secure storage:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Check what will be migrated (dry run)
|
|
99
|
+
python scripts/migrate_to_keyring.py --dry-run
|
|
100
|
+
|
|
101
|
+
# Perform actual migration
|
|
102
|
+
python scripts/migrate_to_keyring.py
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
The migration script will:
|
|
106
|
+
1. Read existing passwords from `~/.chronos/accounts.json`
|
|
107
|
+
2. Store them securely in your system keyring
|
|
108
|
+
3. Create a backup of the original configuration
|
|
109
|
+
4. Remove passwords from the JSON file
|
|
110
|
+
|
|
111
|
+
### Fallback Behavior
|
|
112
|
+
|
|
113
|
+
If keyring is not available (e.g., SSH sessions, containers), Chronos MCP will:
|
|
114
|
+
- Warn about the security implications
|
|
115
|
+
- Fall back to storing passwords in the configuration file
|
|
116
|
+
- Automatically attempt to migrate passwords to keyring when it becomes available
|
|
117
|
+
|
|
118
|
+
### Legacy Security Warning
|
|
119
|
+
|
|
120
|
+
**Note**: If keyring is not installed or available, passwords will be stored in plain text at `~/.chronos/accounts.json`. Install keyring support with:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
pip install "chronos-mcp[secure]" # or just: pip install keyring
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Installation
|
|
127
|
+
|
|
128
|
+
### Standard Installation
|
|
129
|
+
```bash
|
|
130
|
+
pip install -e .
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Secure Installation (Recommended)
|
|
134
|
+
Includes keyring support for secure password storage:
|
|
135
|
+
```bash
|
|
136
|
+
pip install -e ".[secure]"
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Or if you already have Chronos installed:
|
|
140
|
+
```bash
|
|
141
|
+
pip install keyring>=24.0.0
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Configuration
|
|
145
|
+
|
|
146
|
+
### Environment Variables (Default Account)
|
|
147
|
+
```bash
|
|
148
|
+
CALDAV_BASE_URL=http://<YOUR_CALDAV_SERVER>:5232
|
|
149
|
+
CALDAV_USERNAME=<YOUR_USERNAME>
|
|
150
|
+
CALDAV_PASSWORD=<YOUR_PASSWORD>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Multi-Account Configuration
|
|
154
|
+
|
|
155
|
+
Create `~/.chronos/accounts.json`:
|
|
156
|
+
```json
|
|
157
|
+
{
|
|
158
|
+
"accounts": {
|
|
159
|
+
"personal": {
|
|
160
|
+
"url": "http://<YOUR_CALDAV_SERVER>:5232",
|
|
161
|
+
"username": "<YOUR_USERNAME>",
|
|
162
|
+
"display_name": "Personal Calendar"
|
|
163
|
+
},
|
|
164
|
+
"work": {
|
|
165
|
+
"url": "https://caldav.company.com",
|
|
166
|
+
"username": "user",
|
|
167
|
+
"display_name": "Work Calendar"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"default_account": "personal"
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**Note**: Passwords are not included in the JSON when using keyring. They will be:
|
|
175
|
+
- Prompted for on first use and stored securely
|
|
176
|
+
- Migrated from existing configuration using `scripts/migrate_to_keyring.py`
|
|
177
|
+
- Only stored in JSON if keyring is unavailable (with a warning)
|
|
178
|
+
|
|
179
|
+
## Usage
|
|
180
|
+
|
|
181
|
+
### Running the Server
|
|
182
|
+
```bash
|
|
183
|
+
./run_chronos.sh
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Basic Operations
|
|
187
|
+
|
|
188
|
+
List all configured accounts:
|
|
189
|
+
```
|
|
190
|
+
list_accounts()
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
### Example Tool Usage
|
|
195
|
+
|
|
196
|
+
Create an event with reminder:
|
|
197
|
+
```python
|
|
198
|
+
chronos:create_event(
|
|
199
|
+
calendar_uid="assistant",
|
|
200
|
+
summary="Team Meeting",
|
|
201
|
+
start="2025-07-08T14:00:00",
|
|
202
|
+
end="2025-07-08T15:00:00",
|
|
203
|
+
location="Conference Room",
|
|
204
|
+
alarm_minutes="15" # Note: Pass as string!
|
|
205
|
+
)
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Create recurring event with attendees:
|
|
209
|
+
```python
|
|
210
|
+
chronos:create_event(
|
|
211
|
+
calendar_uid="work",
|
|
212
|
+
summary="Weekly Standup",
|
|
213
|
+
start="2025-07-07T09:00:00",
|
|
214
|
+
end="2025-07-07T09:30:00",
|
|
215
|
+
recurrence_rule="FREQ=WEEKLY;BYDAY=MO,WE,FR",
|
|
216
|
+
attendees_json='[{"email": "team@example.com", "name": "Team"}]'
|
|
217
|
+
)
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Delete an event:
|
|
221
|
+
```python
|
|
222
|
+
chronos:delete_event(
|
|
223
|
+
calendar_uid="assistant",
|
|
224
|
+
event_uid="abc-123-def-456"
|
|
225
|
+
)
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Update an event (partial update):
|
|
229
|
+
```python
|
|
230
|
+
chronos:update_event(
|
|
231
|
+
calendar_uid="assistant",
|
|
232
|
+
event_uid="abc-123-def-456",
|
|
233
|
+
location="Room 202", # Update location
|
|
234
|
+
alarm_minutes="30" # Change reminder to 30 minutes
|
|
235
|
+
# Other fields remain unchanged
|
|
236
|
+
)
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
## Documentation
|
|
240
|
+
|
|
241
|
+
- [API Reference](docs/api/README.md) - Complete API documentation
|
|
242
|
+
- [Architecture Guide](docs/ARCHITECTURE.md) - System design and components
|
|
243
|
+
- [RRULE Guide](docs/RRULE_GUIDE.md) - Recurring events documentation
|
|
244
|
+
- [Data Flows](docs/DATA_FLOWS.md) - Request/response patterns
|
|
245
|
+
- [Design Decisions](docs/DESIGN_DECISIONS.md) - Technical choices explained
|
|
246
|
+
|
|
247
|
+
## Known Issues
|
|
248
|
+
|
|
249
|
+
See [KNOWN_ISSUES.md](KNOWN_ISSUES.md) for current limitations and workarounds.
|
|
250
|
+
|
|
251
|
+
## Changelog
|
|
252
|
+
|
|
253
|
+
See [CHANGELOG.md](CHANGELOG.md) for version history.
|
|
254
|
+
|
|
255
|
+
## Contributing
|
|
256
|
+
|
|
257
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development guidelines.
|