Skip to content

Commit 6e72359

Browse files
jamesbrinkclaude
andcommitted
chore: update elasticsearch indexes and bump version to 0.5.1
- Update Elasticsearch index references from latest-42- to latest-43- - Bump version from 0.5.0 to 0.5.1 - Update RELEASE_NOTES.md with v0.5.1 information - Update tests to match new version 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 24ccb93 commit 6e72359

File tree

9 files changed

+62
-17
lines changed

9 files changed

+62
-17
lines changed

RELEASE_NOTES.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,48 @@
1+
# MCP-NixOS: v0.5.1 Release Notes
2+
3+
## Overview
4+
5+
MCP-NixOS v0.5.1 is a minor release that updates the Elasticsearch index references to ensure compatibility with the latest NixOS search API. This release updates the index references from `latest-42-` to `latest-43-` to maintain functionality with the NixOS search service.
6+
7+
## Changes in v0.5.1
8+
9+
### 🔧 Fixes & Improvements
10+
11+
- **Updated Elasticsearch Index References**: Fixed the Elasticsearch index references to ensure proper connectivity with the NixOS search API
12+
- **Version Bump**: Bumped version from 0.5.0 to 0.5.1
13+
14+
## Installation
15+
16+
```bash
17+
# Install with pip
18+
pip install mcp-nixos==0.5.1
19+
20+
# Install with uv
21+
uv pip install mcp-nixos==0.5.1
22+
23+
# Install with uvx
24+
uvx mcp-nixos==0.5.1
25+
```
26+
27+
## Configuration
28+
29+
Configure Claude to use the tool by adding it to your `~/.config/claude/config.json` file:
30+
31+
```json
32+
{
33+
"tools": [
34+
{
35+
"path": "mcp_nixos",
36+
"default_enabled": true
37+
}
38+
]
39+
}
40+
```
41+
42+
## Contributors
43+
44+
- James Brink (@utensils)
45+
146
# MCP-NixOS: v0.5.0 Release Notes
247

348
## Overview
@@ -24,7 +69,7 @@ MCP-NixOS v0.5.0 introduces support for the NixOS 25.05 Beta channel, enhancing
2469

2570
The release implements the following key improvements:
2671

27-
1. **25.05 Beta Channel**: Added the Elasticsearch index mapping for the upcoming NixOS 25.05 release using the index name pattern `latest-42-nixos-25.05`
72+
1. **25.05 Beta Channel**: Added the Elasticsearch index mapping for the upcoming NixOS 25.05 release using the index name pattern `latest-43-nixos-25.05`
2873

2974
2. **Beta Alias**: Implemented a "beta" alias that will always point to the current beta channel, similar to how the "stable" alias points to the current stable release
3075

mcp_nixos/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
__version__ = version("mcp-nixos")
1313
except PackageNotFoundError:
1414
# Package is not installed, use a default version
15-
__version__ = "0.5.0"
15+
__version__ = "0.5.1"
1616
except ImportError:
1717
# Fallback for Python < 3.8
1818
try:
1919
import pkg_resources
2020

2121
__version__ = pkg_resources.get_distribution("mcp-nixos").version
2222
except Exception:
23-
__version__ = "0.5.0"
23+
__version__ = "0.5.1"

mcp_nixos/clients/elasticsearch_client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828

2929
# Channel to Index mapping
3030
AVAILABLE_CHANNELS = {
31-
"unstable": "latest-42-nixos-unstable",
32-
"25.05": "latest-42-nixos-25.05", # Beta channel
33-
"beta": "latest-42-nixos-25.05", # Alias for beta
34-
"24.11": "latest-42-nixos-24.11",
35-
"stable": "latest-42-nixos-24.11", # Alias for stable
31+
"unstable": "latest-43-nixos-unstable",
32+
"25.05": "latest-43-nixos-25.05", # Beta channel
33+
"beta": "latest-43-nixos-25.05", # Alias for beta
34+
"24.11": "latest-43-nixos-24.11",
35+
"stable": "latest-43-nixos-24.11", # Alias for stable
3636
}
3737
DEFAULT_CHANNEL = "unstable"
3838

mcp_nixos/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
The server connects to the NixOS search Elasticsearch API with these details:
2020
- URL: https://search.nixos.org/backend/{index}/_search
2121
- Credentials: Basic authentication (public credentials from NixOS search)
22-
- Index pattern: latest-42-nixos-{channel} (e.g., latest-42-nixos-unstable)
22+
- Index pattern: latest-43-nixos-{channel} (e.g., latest-43-nixos-unstable)
2323
- Both packages and options are in the same index, distinguished by a "type" field
2424
- Hierarchical paths use a special query format with wildcards
2525

mcp_nixos/utils/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def make_http_request(
241241

242242
# Extract channel information from URL for ES requests to ensure proper cache separation
243243
channel_key = ""
244-
if "latest-42-nixos" in url:
244+
if "latest-43-nixos" in url:
245245
if "unstable" in url:
246246
channel_info = "unstable"
247247
elif "24.11" in url:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "mcp-nixos"
7-
version = "0.5.0"
7+
version = "0.5.1"
88
description = "Model Context Protocol server for NixOS, Home Manager, and nix-darwin resources"
99
readme = "README.md"
1010
authors = [

tests/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ def setUp(self):
4040
self.context = NixOSContext()
4141

4242
# Ensure we're using the correct endpoints
43-
self.context.es_client.es_packages_url = "https://search.nixos.org/backend/latest-42-nixos-unstable/_search"
43+
self.context.es_client.es_packages_url = "https://search.nixos.org/backend/latest-43-nixos-unstable/_search"
4444
self.context.es_client.es_options_url = (
45-
"https://search.nixos.org/backend/latest-42-nixos-unstable-options/_search"
45+
"https://search.nixos.org/backend/latest-43-nixos-unstable-options/_search"
4646
)
4747

4848
# Use a smaller cache for testing

tests/integration/test_mcp_nixos.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ def setUp(self):
5555
# Use a smaller cache for testing
5656
self.client.cache = SimpleCache(max_size=10, ttl=60)
5757
# Default base endpoint for packages index
58-
self.client.es_packages_url = "https://search.nixos.org/backend/latest-42-nixos-unstable/_search"
58+
self.client.es_packages_url = "https://search.nixos.org/backend/latest-43-nixos-unstable/_search"
5959
# Default base endpoint for options index
60-
self.client.es_options_url = "https://search.nixos.org/backend/latest-42-nixos-unstable-options/_search"
60+
self.client.es_options_url = "https://search.nixos.org/backend/latest-43-nixos-unstable-options/_search"
6161

6262
def test_search_packages(self):
6363
"""Test searching for packages."""

tests/test_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def test_version_fallback_package_not_found(mock_version):
4747
import mcp_nixos
4848

4949
# Check that the default version is used
50-
assert mcp_nixos.__version__ == "0.5.0"
50+
assert mcp_nixos.__version__ == "0.5.1"
5151
mock_version.assert_called_once_with("mcp-nixos")
5252

5353

@@ -80,5 +80,5 @@ def test_version_ultimate_fallback(mock_get_distribution, _):
8080
import mcp_nixos
8181

8282
# Check that the default version is used when everything fails
83-
assert mcp_nixos.__version__ == "0.5.0"
83+
assert mcp_nixos.__version__ == "0.5.1"
8484
mock_get_distribution.assert_called_once()

0 commit comments

Comments
 (0)