things-mcp 0.7.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.
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/claude-code-settings.json",
3
+ "permissions": {
4
+ "allow": [
5
+ "Bash(find:*)",
6
+ "Bash(ls:*)",
7
+ "Bash(gh repo view:*)",
8
+ "Bash(gh pr list:*)",
9
+ "Bash(gh pr view:*)",
10
+ "Bash(gh issue list:*)",
11
+ "WebFetch(domain:raw.githubusercontent.com)",
12
+ "Bash(git add:*)",
13
+ "WebFetch(domain:www.anthropic.com)",
14
+ "WebFetch(domain:gofastmcp.com)",
15
+ "WebFetch(domain:github.com)",
16
+ "Bash(gh issue view:*)",
17
+ "Bash(gh pr diff:*)",
18
+ "WebFetch(domain:culturedcode.com)",
19
+ "WebSearch",
20
+ "Bash(grep:*)",
21
+ "Bash(uv run:*)"
22
+ ],
23
+ "deny": []
24
+ }
25
+ }
@@ -0,0 +1,8 @@
1
+ # Things MCP Server Configuration
2
+
3
+ # Transport type: "stdio" (default) or "http"
4
+ # THINGS_MCP_TRANSPORT=stdio
5
+
6
+ # HTTP server configuration (only used when THINGS_MCP_TRANSPORT=http)
7
+ # THINGS_MCP_HOST=127.0.0.1
8
+ # THINGS_MCP_PORT=8000
@@ -0,0 +1 @@
1
+ ko_fi: haldick
@@ -0,0 +1,19 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
11
+
12
+ # Environment files
13
+ .env
14
+
15
+ # DXT build artifacts
16
+ /server/
17
+ *.dxt
18
+
19
+ .DS_Store
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,35 @@
1
+ # Changelog
2
+
3
+ ## v0.6.0 - 2026-01-14
4
+
5
+ - **Creation Date Filtering**: Added `last` parameter to `search_advanced` for filtering by creation date (e.g., '3d' for last 3 days, '1w' for last week)
6
+ - **DateTime Scheduling with Reminders**: Extended `when` parameter to support datetime format with reminders (`YYYY-MM-DD@HH:MM`)
7
+ - **HTTP Transport**: Added optional HTTP transport mode via environment variables (`THINGS_MCP_TRANSPORT`, `THINGS_MCP_HOST`, `THINGS_MCP_PORT`). Note: HTTP transport requires running the server directly and is not available when installed via the .mcpb package.
8
+ - **Background Execution Fix**: Changed URL execution from AppleScript to shell script with `open -g` to prevent Things from coming to foreground
9
+ - **Bug Fix**: Fixed `search_advanced` type parameter causing duplicate keyword argument error
10
+ - **MCP Integration Test Plan**: Added Claude-executable integration test plan (`docs/mcp_integration_test_plan.md`) for verifying MCP tools against a live Things database
11
+
12
+ ## v0.5.0 - 2025-12-15
13
+
14
+ - **MCPB Package Format**: Migrated from DXT to MCPB package format for Claude Desktop extensions, using uv for runtime dependency resolution
15
+ - **Human-Readable Age Display**: Tasks now show "Age: X ago" and "Last modified: X ago" in natural language (e.g., "3 days ago", "2 weeks ago")
16
+
17
+ ## v0.4.0 - 2025-08-18
18
+
19
+ - **DXT Package Support**: Added automated packaging system with manifest.json configuration
20
+ - **Improved README**: Recommended DXT as preferred installation option
21
+
22
+ ## v0.3.1 - 2025-08-11
23
+
24
+ - **Heading Support**: Added get_headings() tool to list and filter headings by project
25
+ - **Checklist Items**: Include checklist items in todo responses (thanks @JoeDuncko)
26
+ - **Enhanced Formatting**: Projects now display associated headings, improved heading data formatting
27
+ - **Expanded Test Coverage**: Added comprehensive tests for heading functionality (10 new tests, 63 total)
28
+
29
+ ## v0.2.0 - 2025-08-04
30
+
31
+ - **FastMCP Migration**: Migrated from basic MCP implementation to FastMCP for cleaner, more maintainable code (thanks @excelsier)
32
+ - **Background URL Execution**: Things URLs now execute without bringing the app to foreground for better user experience (thanks @cdzombak)
33
+ - **Comprehensive Unit Test Suite**: Added unit tests covering URL construction and data formatting functions
34
+ - **Moving Todos Between Projects**: Handle moving projects from one project to another project (thanks @underlow)
35
+ - **Enhanced README**: Improved installation instructions with clearer step-by-step process
@@ -0,0 +1,88 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Commands
6
+
7
+ ### Development Setup
8
+ ```bash
9
+ # Install dependencies (uses uv package manager)
10
+ uv sync
11
+
12
+ # Run the MCP server (stdio transport, default)
13
+ uv run things-mcp
14
+
15
+ # Run with HTTP transport
16
+ THINGS_MCP_TRANSPORT=http uv run things-mcp
17
+ ```
18
+
19
+ ### Testing
20
+
21
+ The project includes a comprehensive unit test suite covering URL scheme construction and data formatting functions.
22
+
23
+ ```bash
24
+ # Install test dependencies
25
+ uv sync --extra test
26
+
27
+ # Run all tests
28
+ uv run pytest
29
+
30
+ # Run tests with verbose output
31
+ uv run pytest -v
32
+
33
+ # Run specific test file
34
+ uv run pytest tests/test_url_scheme.py
35
+
36
+ # Run tests matching a pattern
37
+ uv run pytest -k "test_format"
38
+ ```
39
+
40
+ Test coverage includes:
41
+ - All URL construction functions (add, update, show, search)
42
+ - Authentication token handling
43
+ - Data formatting for todos, projects, areas, and tags
44
+ - Error handling and edge cases
45
+ - Mock external dependencies (Things.py, shell commands)
46
+
47
+ ## Architecture Overview
48
+
49
+ This is a Model Context Protocol (MCP) server that bridges Claude Desktop with the Things 3 task management app on macOS. The architecture consists of:
50
+
51
+ 1. **src/things_mcp/server.py** - Main MCP server implementation using FastMCP framework
52
+ - Defines all MCP tools for interacting with Things
53
+ - List views (inbox, today, upcoming, etc.)
54
+ - CRUD operations for todos/projects/areas
55
+ - Search and tag operations
56
+ - Things URL scheme integration
57
+
58
+ 2. **src/things_mcp/url_scheme.py** - Things URL scheme implementation
59
+ - Constructs Things URLs for various operations
60
+ - Uses shell script with `open -g` to execute URLs without bringing Things to foreground
61
+ - Handles authentication tokens for update operations
62
+
63
+ 3. **src/things_mcp/formatters.py** - Data formatting utilities
64
+ - Converts Things database objects to human-readable text
65
+ - Handles nested data (projects within areas, checklist items, etc.)
66
+
67
+ 4. **tests/** - Unit test suite (101 total tests)
68
+ - **conftest.py** - Pytest fixtures and mock data
69
+ - **test_url_scheme.py** - Tests for URL construction (30 test cases)
70
+ - **test_formatters.py** - Tests for data formatting (62 test cases)
71
+ - **test_things_server.py** - Tests for server tools (5 test cases)
72
+ - **test_things_server_headings.py** - Tests for heading functionality (4 test cases)
73
+
74
+ ## Key Implementation Details
75
+
76
+ - Uses things.py library for reading Things SQLite database
77
+ - Write operations use Things URL scheme API
78
+ - FastMCP provides the MCP protocol implementation
79
+ - All tools return formatted text strings suitable for Claude
80
+ - Error handling for invalid UUIDs and missing parameters
81
+ - Supports filtering and including nested items via parameters
82
+ - Unit tests mock all external dependencies (Things.py, shell commands)
83
+ - Pytest configuration in pyproject.toml with async support
84
+ - Supports both stdio (default) and HTTP transport modes
85
+
86
+ ## Things URL Scheme Authentication
87
+
88
+ For update operations, the server automatically fetches and includes the auth-token from things.py. This allows updating existing items without user intervention.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 hald
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,413 @@
1
+ Metadata-Version: 2.4
2
+ Name: things-mcp
3
+ Version: 0.7.0
4
+ Summary: Things app Model Context Protocol (MCP) server
5
+ Project-URL: Homepage, https://github.com/hald/things-mcp
6
+ Project-URL: Repository, https://github.com/hald/things-mcp
7
+ Project-URL: Issues, https://github.com/hald/things-mcp/issues
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Keywords: macos,mcp,model-context-protocol,task-management,things
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: MacOS X
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: MacOS
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Office/Business :: Scheduling
20
+ Requires-Python: >=3.12
21
+ Requires-Dist: fastmcp>=2.0.0
22
+ Requires-Dist: httpx>=0.28.1
23
+ Requires-Dist: things-py>=0.0.15
24
+ Provides-Extra: test
25
+ Requires-Dist: pytest-asyncio>=0.24.0; extra == 'test'
26
+ Requires-Dist: pytest-mock>=3.14.0; extra == 'test'
27
+ Requires-Dist: pytest>=8.0.0; extra == 'test'
28
+ Description-Content-Type: text/markdown
29
+
30
+ # Things MCP Server
31
+
32
+ This [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server lets you use Claude Desktop to interact with your task management data in [Things 3](https://culturedcode.com/things) from Cultured Code. You can ask Claude to create tasks, analyze projects, help manage priorities, and more.
33
+
34
+ This server leverages the [Things.py](https://github.com/thingsapi/things.py) library and the [Things URL Scheme](https://culturedcode.com/things/help/url-scheme/).
35
+
36
+ <a href="https://glama.ai/mcp/servers/t9cgixg2ah"><img width="380" height="200" src="https://glama.ai/mcp/servers/t9cgixg2ah/badge" alt="Things Server MCP server" /></a>
37
+
38
+ ## Support the Project
39
+
40
+ If you find this project helpful, consider supporting its development:
41
+
42
+ [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/haldick)
43
+
44
+ ## Features
45
+
46
+ - Access to all major Things lists (Inbox, Today, Upcoming, etc.)
47
+ - Project and area management
48
+ - Tag operations
49
+ - Advanced search capabilities
50
+ - Recent items tracking
51
+ - Detailed item information including checklists
52
+ - Support for nested data (projects within areas, todos within projects)
53
+ - **Human-readable age display** - See how long tasks have been created and when they were last modified
54
+ - Shows task age in natural language (e.g., "3 days ago", "2 weeks ago")
55
+ - Displays both creation age and modification age
56
+ - Helps identify stale tasks and recently updated items
57
+
58
+ ### Task Age Display
59
+
60
+ When viewing tasks, the server automatically calculates and displays human-readable ages:
61
+
62
+ ```
63
+ Title: Prepare presentation
64
+ Created: 2025-11-09T10:30:00
65
+ Age: 1 week ago
66
+ Modified: 2025-11-15T14:20:00
67
+ Last modified: 1 day ago
68
+ ```
69
+
70
+ This makes it easy to:
71
+ - Identify tasks that have been sitting for a long time
72
+ - See recently created tasks at a glance
73
+ - Track when tasks were last updated
74
+ - Make better decisions about task prioritization
75
+
76
+ Age is displayed in natural language:
77
+ - **Same day**: "today"
78
+ - **Recent days**: "3 days ago"
79
+ - **Recent weeks**: "2 weeks ago"
80
+ - **Recent months**: "3 months ago"
81
+ - **Years**: "2 years ago"
82
+
83
+ ## Installation
84
+
85
+ ### Prerequisites
86
+ - macOS (Things 3 is Mac-only)
87
+ - A MCP client, such as Claude Desktop or Claude Code
88
+ - Things 3 app with "Enable Things URLs" turned on (Settings → General)
89
+ - [uv](https://docs.astral.sh/uv/) Python package manager: `brew install uv`
90
+
91
+ ### Quick Install with uvx (Recommended)
92
+
93
+ The easiest way to use Things MCP is with `uvx`, which runs the package directly without manual installation:
94
+
95
+ #### For Claude Desktop:
96
+
97
+ 1. Open Claude Desktop
98
+ 2. Go to **Claude → Settings → Developer → Edit Config**
99
+ 3. Add the Things server:
100
+
101
+ ```json
102
+ {
103
+ "mcpServers": {
104
+ "things": {
105
+ "command": "uvx",
106
+ "args": ["things-mcp"]
107
+ }
108
+ }
109
+ }
110
+ ```
111
+
112
+ 4. Save the file and restart Claude Desktop
113
+
114
+ #### For Claude Code:
115
+
116
+ ```bash
117
+ claude mcp add-json things '{"command":"uvx","args":["things-mcp"]}'
118
+ ```
119
+
120
+ To make it available globally (across all projects), add `-s user`:
121
+ ```bash
122
+ claude mcp add-json -s user things '{"command":"uvx","args":["things-mcp"]}'
123
+ ```
124
+
125
+ ### MCPB Installation (Alternative for Claude Desktop)
126
+
127
+ MCP Bundles (.mcpb) provide another way to install MCP servers.
128
+
129
+ 1. Download the latest `things-mcp-0.6.0.mcpb` file from the [releases page](https://github.com/hald/things-mcp/releases)
130
+ 2. Double-click the `.mcpb` file to install it in Claude Desktop
131
+ 3. The extension will be automatically configured and ready to use
132
+
133
+ The MCPB package uses `uv` to automatically resolve and install the correct Python dependencies for your system architecture.
134
+
135
+ ### Verify it's working
136
+
137
+ After installation:
138
+ - If using Claude Desktop, you should see "Things MCP" in the "Search and tools" list
139
+ - Try asking: "What's in my Things inbox?"
140
+
141
+ ### Sample Usage with Claude Desktop
142
+ * "What's on my todo list today?"
143
+ * "Create a todo to pack for my beach vacation next week, include a packing checklist."
144
+ * "Evaluate my current todos using the Eisenhower matrix."
145
+ * "Help me conduct a GTD-style weekly review using Things."
146
+ * "Show me tasks that haven't been modified in over a month."
147
+
148
+ #### Tips
149
+ * Create a project in Claude with custom instructions that explains how you use Things and organize areas, projects, tags, etc. Tell Claude what information you want included when it creates a new task (eg asking it to include relevant details in the task description might be helpful).
150
+ * Try adding another MCP server that gives Claude access to your calendar. This will let you ask Claude to block time on your calendar for specific tasks, create todos from upcoming calendar events (eg prep for a meeting), etc.
151
+ * Use task ages to identify stale items: "Which tasks in my Anytime list are older than 2 weeks?"
152
+
153
+
154
+ ### Available Tools
155
+
156
+ #### List Views
157
+ - `get-inbox` - Get todos from Inbox
158
+ - `get-today` - Get todos due today
159
+ - `get-upcoming` - Get upcoming todos
160
+ - `get-anytime` - Get todos from Anytime list
161
+ - `get-someday` - Get todos from Someday list
162
+ - `get-logbook` - Get completed todos
163
+ - `get-trash` - Get trashed todos
164
+
165
+ #### Basic Operations
166
+ - `get-todos` - Get todos, optionally filtered by project
167
+ - `get-projects` - Get all projects
168
+ - `get-areas` - Get all areas
169
+
170
+ #### Tag Operations
171
+ - `get-tags` - Get all tags
172
+ - `get-tagged-items` - Get items with a specific tag
173
+
174
+ #### Search Operations
175
+ - `search-todos` - Simple search by title/notes
176
+ - `search-advanced` - Advanced search with multiple filters
177
+
178
+ #### Time-based Operations
179
+ - `get-recent` - Get recently created items
180
+
181
+ #### Things URL Scheme Operations
182
+ - `add-todo` - Create a new todo
183
+ - `add-project` - Create a new project
184
+ - `update-todo` - Update an existing todo
185
+ - `update-project` - Update an existing project
186
+ - `show-item` - Show a specific item or list in Things
187
+ - `search-items` - Search for items in Things
188
+
189
+ ## Tool Parameters
190
+
191
+ ### get-todos
192
+ - `project_uuid` (optional) - Filter todos by project
193
+ - `include_items` (optional, default: true) - Include checklist items
194
+
195
+ ### get-projects / get-areas / get-tags
196
+ - `include_items` (optional, default: false) - Include contained items
197
+
198
+ ### search-advanced
199
+ - `status` - Filter by status (incomplete/completed/canceled)
200
+ - `start_date` - Filter by start date (YYYY-MM-DD)
201
+ - `deadline` - Filter by deadline (YYYY-MM-DD)
202
+ - `tag` - Filter by tag
203
+ - `area` - Filter by area UUID
204
+ - `type` - Filter by item type (to-do/project/heading)
205
+ - `last` - Filter by creation date (e.g., '3d' for last 3 days, '1w' for last week)
206
+
207
+ ### get-recent
208
+ - `period` - Time period (e.g., '3d', '1w', '2m', '1y')
209
+
210
+ ### Scheduling with Reminders (add-todo, add-project, update-todo, update-project)
211
+ - `when` - Accepts multiple formats:
212
+ - Keywords: `today`, `tomorrow`, `evening`, `anytime`, `someday`
213
+ - Date: `YYYY-MM-DD` (e.g., `2024-01-15`)
214
+ - DateTime with reminder: `YYYY-MM-DD@HH:MM` (e.g., `2024-01-15@14:30`)
215
+
216
+ ## Manual Installation
217
+
218
+ For advanced users who prefer to install from source:
219
+
220
+ ### Step 1: Clone the repository
221
+
222
+ Choose a location where you want to install Things MCP. For example, to install in your home directory:
223
+
224
+ ```bash
225
+ cd ~
226
+ git clone https://github.com/hald/things-mcp
227
+ cd things-mcp
228
+ ```
229
+
230
+ **Important**: Remember this location! You'll need the full path. You can get it by running:
231
+ ```bash
232
+ pwd
233
+ ```
234
+ This will show something like: `/Users/yourusername/things-mcp`
235
+
236
+ ### Step 2: Install dependencies
237
+
238
+ ```bash
239
+ uv sync
240
+ ```
241
+
242
+ ### Step 3: Configure Claude
243
+
244
+ #### For Claude Desktop:
245
+
246
+ 1. Open Claude Desktop
247
+ 2. Go to **Claude → Settings → Developer → Edit Config**
248
+ 3. Add the Things server to the `mcpServers` section:
249
+
250
+ ```json
251
+ {
252
+ "mcpServers": {
253
+ "things": {
254
+ "command": "uv",
255
+ "args": [
256
+ "--directory",
257
+ "/Users/yourusername/things-mcp",
258
+ "run",
259
+ "things-mcp"
260
+ ]
261
+ }
262
+ }
263
+ }
264
+ ```
265
+
266
+ **Replace `/Users/yourusername/things-mcp` with your actual path from Step 1!**
267
+
268
+ **Note**: If you installed uv outside of Homebrew, you may need to use the full path to uv in your MCP configuration. Common locations include:
269
+ - pip install: Usually in your Python environment's bin directory
270
+ - Standalone installer: `~/.local/bin/uv` or `~/.cargo/bin/uv`
271
+
272
+ To find your uv location, run:
273
+ ```bash
274
+ which uv
275
+ ```
276
+
277
+ 4. Save the file and restart Claude Desktop
278
+
279
+ #### For Claude Code:
280
+
281
+ In your terminal, run:
282
+ ```bash
283
+ claude mcp add-json things '{"command":"uv","args":["--directory","/path/to/things-mcp","run","things-mcp"]}'
284
+ ```
285
+
286
+ **Replace `/path/to/things-mcp` with your actual path from Step 1!**
287
+
288
+ To make it available globally (across all projects), add `-s user`:
289
+ ```bash
290
+ claude mcp add-json -s user things '{"command":"uv","args":["--directory","/path/to/things-mcp","run","things-mcp"]}'
291
+ ```
292
+
293
+ ### Step 4: Verify it's working
294
+
295
+ After restarting your MCP client:
296
+ - If using Claude Desktop, you should see "Things 3" in the "Search and tools" list
297
+ - Try asking: "What's in my Things inbox?"
298
+
299
+ ### Troubleshooting
300
+
301
+ If it's not working:
302
+
303
+ 1. **Make sure Things 3 is installed and has been opened at least once**
304
+ - The Things database needs to exist for the server to work
305
+
306
+ 2. **Check that "Enable Things URLs" is turned on**
307
+ - Open Things → Settings → General → Enable Things URLs
308
+
309
+ 3. **Verify the path in your configuration matches where you cloned the repository**
310
+ - The path must be absolute (starting with `/`)
311
+ - Run `pwd` in the things-mcp directory to get the correct path
312
+
313
+ 4. **Check Claude's logs for errors:**
314
+ ```bash
315
+ tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
316
+ ```
317
+
318
+ 5. **Common issues:**
319
+ - "Could not attach to MCP" - Usually means the path is wrong
320
+ - "spawn uv ENOENT" - Make sure uv was installed with Homebrew (`brew install uv`)
321
+ - "No module named 'things'" - Run `uv sync` in the things-mcp directory
322
+ - "Command not found: uv" - Install uv with Homebrew: `brew install uv`
323
+
324
+ 6. **MCPB-specific issues:**
325
+ - "No module named 'pydantic_core'" or similar binary module errors - Install uv (`brew install uv`) and restart Claude Desktop. The MCPB package requires uv to resolve dependencies at runtime.
326
+
327
+ ### Updating
328
+
329
+ To update to the latest version:
330
+ ```bash
331
+ cd ~/things-mcp # or wherever you installed it
332
+ git pull
333
+ uv sync
334
+ ```
335
+ Then restart Claude.
336
+
337
+ ## Development
338
+
339
+ ### Running Tests
340
+
341
+ The project includes a comprehensive unit test suite for the URL scheme and formatter modules.
342
+
343
+ ```bash
344
+ # Install test dependencies
345
+ uv sync --extra test
346
+
347
+ # Run all tests
348
+ uv run pytest
349
+
350
+ # Run tests with verbose output
351
+ uv run pytest -v
352
+
353
+ # Run a specific test file
354
+ uv run pytest tests/test_url_scheme.py
355
+
356
+ # Run tests matching a pattern
357
+ uv run pytest -k "test_add_todo"
358
+ ```
359
+
360
+ ### MCP Integration Test
361
+
362
+ The project includes an integration test plan that can be executed by Claude (via Claude Cowork or Claude Code) to verify all MCP tools work correctly against a live Things database.
363
+
364
+ See [`docs/mcp_integration_test_plan.md`](docs/mcp_integration_test_plan.md) for the full test plan.
365
+
366
+ ### Project Structure
367
+
368
+ ```
369
+ things-mcp/
370
+ ├── src/things_mcp/ # Main package
371
+ │ ├── __init__.py # Package exports
372
+ │ ├── __main__.py # Entry point for python -m
373
+ │ ├── server.py # MCP server implementation
374
+ │ ├── url_scheme.py # Things URL scheme implementation
375
+ │ └── formatters.py # Data formatting utilities
376
+ ├── tests/ # Unit tests
377
+ │ ├── conftest.py # Test fixtures and configuration
378
+ │ ├── test_url_scheme.py
379
+ │ └── test_formatters.py
380
+ ├── docs/ # Documentation
381
+ │ └── mcp_integration_test_plan.md # Claude-executable integration test
382
+ ├── manifest.json # MCPB package manifest
383
+ ├── build_mcpb.sh # MCPB package build script
384
+ ├── pyproject.toml # Project dependencies, build config, and pytest config
385
+ ├── .env.example # Sample environment configuration
386
+ └── run.sh # Convenience runner script
387
+ ```
388
+
389
+ ### HTTP Transport
390
+
391
+ By default, the server uses stdio transport for communication with MCP clients. For remote access scenarios, you can run the server with HTTP transport.
392
+
393
+ #### Configuration
394
+
395
+ Set these environment variables to enable HTTP transport:
396
+
397
+ | Variable | Default | Description |
398
+ |----------|---------|-------------|
399
+ | `THINGS_MCP_TRANSPORT` | `stdio` | Transport type: `stdio` or `http` |
400
+ | `THINGS_MCP_HOST` | `127.0.0.1` | HTTP server bind address |
401
+ | `THINGS_MCP_PORT` | `8000` | HTTP server port |
402
+
403
+ #### Example
404
+
405
+ ```bash
406
+ # Using uvx
407
+ THINGS_MCP_TRANSPORT=http THINGS_MCP_HOST=0.0.0.0 THINGS_MCP_PORT=8000 uvx things-mcp
408
+
409
+ # Or from source
410
+ THINGS_MCP_TRANSPORT=http THINGS_MCP_HOST=0.0.0.0 THINGS_MCP_PORT=8000 uv run things-mcp
411
+ ```
412
+
413
+ See `.env.example` for a sample configuration file.