ng-postcode-mcp 0.4.0__tar.gz → 0.4.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.
@@ -6,3 +6,4 @@ dist/
6
6
  .mypy_cache/
7
7
  .ruff_cache/
8
8
  .pytest_cache/
9
+ *.mcpb
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: ng-postcode-mcp
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: MCP server for Nigeria's NIPOST digital postcode (NDAPS): validate, look up, reverse-geocode and resolve addresses to postcodes.
5
5
  Project-URL: Repository, https://github.com/Adeniyikayodee/ng-postcode
6
6
  Project-URL: Issues, https://github.com/Adeniyikayodee/ng-postcode/issues
@@ -95,6 +95,10 @@ Most clients take this entry in their MCP settings:
95
95
  | VS Code | The same server object in `.vscode/mcp.json`, under a top-level `"servers"` key instead of `"mcpServers"` |
96
96
  | Others | Any client that launches stdio servers: use the command, arguments and environment above |
97
97
 
98
+ ### As a bundle
99
+
100
+ [`bundle/`](bundle) holds an MCPB manifest for clients that install `.mcpb` files, such as Claude Desktop. It runs the published package with uv and asks for the API key in the client's own settings. Build it with `npx @anthropic-ai/mcpb pack mcp/bundle ng-postcode.mcpb` from the repository root. [`bundle-python/`](bundle-python) is the same bundle for hosts that only run Python bundles, such as Smithery; it starts the server with `uvx`, so uv must be installed. `scripts/smithery_bundle.py` builds the copy Smithery accepts, which also carries each tool's input schema.
101
+
98
102
  ## Configuration
99
103
 
100
104
  | Variable | Default | Purpose |
@@ -67,6 +67,10 @@ Most clients take this entry in their MCP settings:
67
67
  | VS Code | The same server object in `.vscode/mcp.json`, under a top-level `"servers"` key instead of `"mcpServers"` |
68
68
  | Others | Any client that launches stdio servers: use the command, arguments and environment above |
69
69
 
70
+ ### As a bundle
71
+
72
+ [`bundle/`](bundle) holds an MCPB manifest for clients that install `.mcpb` files, such as Claude Desktop. It runs the published package with uv and asks for the API key in the client's own settings. Build it with `npx @anthropic-ai/mcpb pack mcp/bundle ng-postcode.mcpb` from the repository root. [`bundle-python/`](bundle-python) is the same bundle for hosts that only run Python bundles, such as Smithery; it starts the server with `uvx`, so uv must be installed. `scripts/smithery_bundle.py` builds the copy Smithery accepts, which also carries each tool's input schema.
73
+
70
74
  ## Configuration
71
75
 
72
76
  | Variable | Default | Purpose |
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "ng-postcode-mcp"
7
- version = "0.4.0"
7
+ version = "0.4.1"
8
8
  description = "MCP server for Nigeria's NIPOST digital postcode (NDAPS): validate, look up, reverse-geocode and resolve addresses to postcodes."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -3,7 +3,7 @@
3
3
  "name": "io.github.Adeniyikayodee/ng-postcode",
4
4
  "title": "Nigeria Postcode",
5
5
  "description": "Validate, look up and resolve addresses to Nigeria's NIPOST digital postcodes (NDAPS).",
6
- "version": "0.4.0",
6
+ "version": "0.4.1",
7
7
  "repository": {
8
8
  "url": "https://github.com/Adeniyikayodee/ng-postcode",
9
9
  "source": "github",
@@ -13,7 +13,7 @@
13
13
  {
14
14
  "registryType": "pypi",
15
15
  "identifier": "ng-postcode-mcp",
16
- "version": "0.4.0",
16
+ "version": "0.4.1",
17
17
  "runtimeHint": "uvx",
18
18
  "transport": {
19
19
  "type": "stdio"
@@ -311,8 +311,12 @@ def create_server(
311
311
  structured_output=True,
312
312
  )
313
313
  async def find_postcode_at_location(
314
- latitude: Annotated[float, Field(ge=-90, le=90)],
315
- longitude: Annotated[float, Field(ge=-180, le=180)],
314
+ latitude: Annotated[
315
+ float, Field(ge=-90, le=90, description="Latitude in decimal degrees, e.g. 7.6211.")
316
+ ],
317
+ longitude: Annotated[
318
+ float, Field(ge=-180, le=180, description="Longitude in decimal degrees, e.g. 5.2214.")
319
+ ],
316
320
  ctx: Context[State, Any],
317
321
  max_distance_m: Annotated[
318
322
  float | None,
@@ -353,9 +357,13 @@ def create_server(
353
357
  ),
354
358
  ] = None,
355
359
  latitude: Annotated[
356
- float | None, Field(ge=-90, le=90, description="A location pin the user shared.")
360
+ float | None,
361
+ Field(ge=-90, le=90, description="Latitude of a location pin the user shared."),
362
+ ] = None,
363
+ longitude: Annotated[
364
+ float | None,
365
+ Field(ge=-180, le=180, description="Longitude of that pin. Give it with latitude."),
357
366
  ] = None,
358
- longitude: Annotated[float | None, Field(ge=-180, le=180)] = None,
359
367
  ) -> Resolution:
360
368
  """Turn a described Nigerian address into a postcode, only as precisely as the
361
369
  evidence allows.
@@ -29,3 +29,23 @@ def test_readme_proves_registry_ownership() -> None:
29
29
 
30
30
  def test_registry_description_fits() -> None:
31
31
  assert len(server_json()["description"]) <= 100
32
+
33
+
34
+ def test_the_bundle_pins_this_version() -> None:
35
+ bundle = ROOT / "bundle"
36
+ if not bundle.exists(): # the bundle lives in the repository, not the sdist
37
+ return
38
+ released = version("ng-postcode-mcp")
39
+ manifest: dict[str, Any] = json.loads((bundle / "manifest.json").read_text(encoding="utf-8"))
40
+ assert manifest["version"] == released
41
+ assert f'"ng-postcode-mcp=={released}"' in (bundle / "pyproject.toml").read_text()
42
+
43
+
44
+ def test_the_python_bundle_pins_this_version() -> None:
45
+ bundle = ROOT / "bundle-python"
46
+ if not bundle.exists(): # the bundle lives in the repository, not the sdist
47
+ return
48
+ released = version("ng-postcode-mcp")
49
+ manifest: dict[str, Any] = json.loads((bundle / "manifest.json").read_text(encoding="utf-8"))
50
+ assert manifest["version"] == released
51
+ assert f'"ng-postcode-mcp=={released}"' in (bundle / "server" / "main.py").read_text()
File without changes