cronometer-api-mcp 0.2.0__tar.gz → 0.2.1__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.
- cronometer_api_mcp-0.2.1/.github/dependabot.yml +13 -0
- {cronometer_api_mcp-0.2.0 → cronometer_api_mcp-0.2.1}/PKG-INFO +2 -2
- {cronometer_api_mcp-0.2.0 → cronometer_api_mcp-0.2.1}/pyproject.toml +3 -2
- {cronometer_api_mcp-0.2.0 → cronometer_api_mcp-0.2.1}/server.json +2 -2
- cronometer_api_mcp-0.2.1/tests/test_server_import.py +67 -0
- {cronometer_api_mcp-0.2.0 → cronometer_api_mcp-0.2.1}/uv.lock +4 -4
- {cronometer_api_mcp-0.2.0 → cronometer_api_mcp-0.2.1}/.dockerignore +0 -0
- {cronometer_api_mcp-0.2.0 → cronometer_api_mcp-0.2.1}/.env.example +0 -0
- {cronometer_api_mcp-0.2.0 → cronometer_api_mcp-0.2.1}/.github/workflows/ci.yml +0 -0
- {cronometer_api_mcp-0.2.0 → cronometer_api_mcp-0.2.1}/.github/workflows/docker.yml +0 -0
- {cronometer_api_mcp-0.2.0 → cronometer_api_mcp-0.2.1}/.github/workflows/publish.yml +0 -0
- {cronometer_api_mcp-0.2.0 → cronometer_api_mcp-0.2.1}/.gitignore +0 -0
- {cronometer_api_mcp-0.2.0 → cronometer_api_mcp-0.2.1}/.python-version +0 -0
- {cronometer_api_mcp-0.2.0 → cronometer_api_mcp-0.2.1}/Dockerfile +0 -0
- {cronometer_api_mcp-0.2.0 → cronometer_api_mcp-0.2.1}/LICENSE +0 -0
- {cronometer_api_mcp-0.2.0 → cronometer_api_mcp-0.2.1}/README.md +0 -0
- {cronometer_api_mcp-0.2.0 → cronometer_api_mcp-0.2.1}/src/cronometer_api_mcp/__init__.py +0 -0
- {cronometer_api_mcp-0.2.0 → cronometer_api_mcp-0.2.1}/src/cronometer_api_mcp/client.py +0 -0
- {cronometer_api_mcp-0.2.0 → cronometer_api_mcp-0.2.1}/src/cronometer_api_mcp/server.py +0 -0
- {cronometer_api_mcp-0.2.0 → cronometer_api_mcp-0.2.1}/tests/test_client.py +0 -0
- {cronometer_api_mcp-0.2.0 → cronometer_api_mcp-0.2.1}/tests/test_timezone.py +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "uv"
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: "weekly"
|
|
7
|
+
# Edit the declared ranges, not just the lock: pyproject.toml is what PyPI
|
|
8
|
+
# consumers resolve against, so a breaking release has to surface there.
|
|
9
|
+
versioning-strategy: increase
|
|
10
|
+
open-pull-requests-limit: 5
|
|
11
|
+
groups:
|
|
12
|
+
dev-tooling:
|
|
13
|
+
dependency-type: "development"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cronometer-api-mcp
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: MCP server for Cronometer nutrition data using the mobile REST API
|
|
5
5
|
Author: Randy
|
|
6
6
|
License-Expression: MIT
|
|
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.14
|
|
|
14
14
|
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
|
|
15
15
|
Requires-Python: >=3.14
|
|
16
16
|
Requires-Dist: httpx[socks]>=0.27.0
|
|
17
|
-
Requires-Dist: mcp
|
|
17
|
+
Requires-Dist: mcp<2,>=1.29.0
|
|
18
18
|
Requires-Dist: python-dotenv>=1.0.0
|
|
19
19
|
Requires-Dist: tzdata>=2024.1
|
|
20
20
|
Description-Content-Type: text/markdown
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "cronometer-api-mcp"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.1"
|
|
8
8
|
description = "MCP server for Cronometer nutrition data using the mobile REST API"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -22,7 +22,8 @@ classifiers = [
|
|
|
22
22
|
"Topic :: Scientific/Engineering :: Medical Science Apps.",
|
|
23
23
|
]
|
|
24
24
|
dependencies = [
|
|
25
|
-
|
|
25
|
+
# <2 until the MCPServer migration: 2.x moved mcp.server.fastmcp
|
|
26
|
+
"mcp>=1.29.0,<2",
|
|
26
27
|
"httpx[socks]>=0.27.0",
|
|
27
28
|
"python-dotenv>=1.0.0",
|
|
28
29
|
"tzdata>=2024.1",
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://github.com/rwestergren/cronometer-api-mcp",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.2.
|
|
9
|
+
"version": "0.2.1",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "pypi",
|
|
13
13
|
"identifier": "cronometer-api-mcp",
|
|
14
|
-
"version": "0.2.
|
|
14
|
+
"version": "0.2.1",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
},
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"""Import and tool-registration tests for the server module.
|
|
2
|
+
|
|
3
|
+
server.py is imported by the console entry point, so an import-time failure
|
|
4
|
+
takes the whole server down before it serves a request -- and nothing else in
|
|
5
|
+
the suite imports it.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import asyncio
|
|
11
|
+
|
|
12
|
+
EXPECTED_TOOLS = {
|
|
13
|
+
"add_custom_food",
|
|
14
|
+
"add_food_entry",
|
|
15
|
+
"copy_day",
|
|
16
|
+
"get_biometrics",
|
|
17
|
+
"get_daily_nutrition",
|
|
18
|
+
"get_fasting_history",
|
|
19
|
+
"get_fasting_stats",
|
|
20
|
+
"get_food_details",
|
|
21
|
+
"get_food_log",
|
|
22
|
+
"get_macro_targets",
|
|
23
|
+
"get_nutrition_scores",
|
|
24
|
+
"list_biometrics",
|
|
25
|
+
"mark_day_complete",
|
|
26
|
+
"remove_food_entry",
|
|
27
|
+
"search_foods",
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def test_server_module_imports():
|
|
32
|
+
"""The entry point does `from cronometer_api_mcp.server import main`."""
|
|
33
|
+
from cronometer_api_mcp import server
|
|
34
|
+
|
|
35
|
+
assert callable(server.main)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def test_server_identity():
|
|
39
|
+
from cronometer_api_mcp.server import mcp
|
|
40
|
+
|
|
41
|
+
assert mcp.name == "cronometer"
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def test_registered_tools():
|
|
45
|
+
"""Tools register as an import side effect of the @mcp.tool() decorators.
|
|
46
|
+
|
|
47
|
+
Descriptions come from the docstrings and are what the model reads to pick
|
|
48
|
+
a tool, so an empty one is a silent regression.
|
|
49
|
+
"""
|
|
50
|
+
from cronometer_api_mcp.server import mcp
|
|
51
|
+
|
|
52
|
+
tools = asyncio.run(mcp.list_tools())
|
|
53
|
+
|
|
54
|
+
assert {tool.name for tool in tools} == EXPECTED_TOOLS
|
|
55
|
+
for tool in tools:
|
|
56
|
+
assert tool.description, f"{tool.name} has no description"
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def test_no_client_constructed_at_import():
|
|
60
|
+
"""Import must not need credentials or touch the network.
|
|
61
|
+
|
|
62
|
+
The server is spawned fresh for every stdio session; the client is built
|
|
63
|
+
lazily on the first tool call instead.
|
|
64
|
+
"""
|
|
65
|
+
from cronometer_api_mcp import server
|
|
66
|
+
|
|
67
|
+
assert server._client is None
|
|
@@ -115,7 +115,7 @@ dev = [
|
|
|
115
115
|
[package.metadata]
|
|
116
116
|
requires-dist = [
|
|
117
117
|
{ name = "httpx", extras = ["socks"], specifier = ">=0.27.0" },
|
|
118
|
-
{ name = "mcp", specifier = ">=1.
|
|
118
|
+
{ name = "mcp", specifier = ">=1.29.0,<2" },
|
|
119
119
|
{ name = "python-dotenv", specifier = ">=1.0.0" },
|
|
120
120
|
{ name = "tzdata", specifier = ">=2024.1" },
|
|
121
121
|
]
|
|
@@ -277,7 +277,7 @@ wheels = [
|
|
|
277
277
|
|
|
278
278
|
[[package]]
|
|
279
279
|
name = "mcp"
|
|
280
|
-
version = "1.
|
|
280
|
+
version = "1.29.0"
|
|
281
281
|
source = { registry = "https://pypi.org/simple" }
|
|
282
282
|
dependencies = [
|
|
283
283
|
{ name = "anyio" },
|
|
@@ -295,9 +295,9 @@ dependencies = [
|
|
|
295
295
|
{ name = "typing-inspection" },
|
|
296
296
|
{ name = "uvicorn", marker = "sys_platform != 'emscripten'" },
|
|
297
297
|
]
|
|
298
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
298
|
+
sdist = { url = "https://files.pythonhosted.org/packages/30/d3/f9acc21dfc886e4f78e2add1a47db46ce16884346afde53f8a064c02c891/mcp-1.29.0.tar.gz", hash = "sha256:52d01f334de1868cc3bb2d6604931126a67631f99a6c5d3b82ba47290315ec36", size = 643148, upload-time = "2026-07-28T13:41:41.939Z" }
|
|
299
299
|
wheels = [
|
|
300
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
300
|
+
{ url = "https://files.pythonhosted.org/packages/01/c8/248b201f6d753d69fd5d6506011abbb35a946d9142b2ae311a948fd0be3d/mcp-1.29.0-py3-none-any.whl", hash = "sha256:f5a075bb611f23d6f4d080c6a1699fa62772eebc562ba9e66b306ddde1c755f7", size = 223436, upload-time = "2026-07-28T13:41:40.337Z" },
|
|
301
301
|
]
|
|
302
302
|
|
|
303
303
|
[[package]]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|