You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-10Lines changed: 17 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,12 @@
1
1
# NetBox MCP Server
2
2
3
+
> **⚠️ Breaking Change in v1.0.0**: The project structure has changed.
4
+
> If upgrading from v0.1.0, update your configuration:
5
+
> - Change `uv run server.py` to `uv run netbox-mcp-server`
6
+
> - Update Claude Desktop/Code configs to use `netbox-mcp-server` instead of `server.py`
7
+
> - Docker users: rebuild images with updated CMD
8
+
> - See [CHANGELOG.md](CHANGELOG.md) for full details
9
+
3
10
This is a simple read-only [Model Context Protocol](https://modelcontextprotocol.io/) server for NetBox. It enables you to interact with your data in NetBox directly via LLMs that support MCP.
4
11
5
12
## Tools
@@ -26,7 +33,7 @@ This is a simple read-only [Model Context Protocol](https://modelcontextprotocol
26
33
pip install -e .
27
34
```
28
35
29
-
3. Verify the server can run: `NETBOX_URL=https://netbox.example.com/ NETBOX_TOKEN=<your-api-token> uv run server.py`
36
+
3. Verify the server can run: `NETBOX_URL=https://netbox.example.com/ NETBOX_TOKEN=<your-api-token> uv run netbox-mcp-server`
30
37
31
38
4. Add the MCP server to your LLM client. See below for some examples with Claude.
32
39
@@ -40,7 +47,7 @@ Add the server using the `claude mcp add` command:
40
47
claude mcp add --transport stdio netbox \
41
48
--env NETBOX_URL=https://netbox.example.com/ \
42
49
--env NETBOX_TOKEN=<your-api-token> \
43
-
-- uv --directory /path/to/netbox-mcp-server run server.py
50
+
-- uv --directory /path/to/netbox-mcp-server run netbox-mcp-server
44
51
```
45
52
46
53
**Important notes:**
@@ -61,7 +68,7 @@ For HTTP transport, first start the server manually:
61
68
NETBOX_URL=https://netbox.example.com/ \
62
69
NETBOX_TOKEN=<your-api-token> \
63
70
TRANSPORT=http \
64
-
uv run server.py
71
+
uv run netbox-mcp-server
65
72
```
66
73
67
74
Then add the running server to Claude Code:
@@ -91,7 +98,7 @@ Add the server configuration to your Claude Desktop config file. On Mac, edit `~
91
98
"--directory",
92
99
"/path/to/netbox-mcp-server",
93
100
"run",
94
-
"server.py"
101
+
"netbox-mcp-server"
95
102
],
96
103
"env": {
97
104
"NETBOX_URL": "https://netbox.example.com/",
@@ -176,7 +183,7 @@ For local Claude Desktop or Claude Code usage with stdio transport:
Copy file name to clipboardExpand all lines: claude.md
+36-9Lines changed: 36 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,12 +18,20 @@ A read-only [Model Context Protocol](https://modelcontextprotocol.io/) server th
18
18
19
19
```text
20
20
.
21
-
├── server.py # Main MCP server with tool definitions
22
-
├── netbox_client.py # NetBox REST API client abstraction
23
-
├── pyproject.toml # Dependencies and project metadata
24
-
├── README.md # User-facing documentation
25
-
├── SECURITY.md # Security policy and reporting
26
-
└── LICENSE # Apache 2.0 license
21
+
├── src/
22
+
│ └── netbox_mcp_server/
23
+
│ ├── __init__.py # Package initialization with __version__
24
+
│ ├── __main__.py # Entry point for module execution
25
+
│ ├── server.py # Main MCP server with tool definitions
26
+
│ ├── netbox_client.py # NetBox REST API client abstraction
27
+
│ ├── netbox_types.py # NetBox object type mappings
28
+
│ └── config.py # Settings and logging configuration
29
+
├── tests/ # Test suite
30
+
├── .github/workflows/ # CI/CD automation
31
+
├── pyproject.toml # Dependencies and project metadata
32
+
├── README.md # User-facing documentation
33
+
├── CHANGELOG.md # Auto-generated release notes
34
+
└── LICENSE # Apache 2.0 license
27
35
```
28
36
29
37
**Design Pattern**: Clean separation between MCP server logic (`server.py`) and NetBox API client (`netbox_client.py`) to support future plugin-based implementations.
@@ -35,13 +43,16 @@ A read-only [Model Context Protocol](https://modelcontextprotocol.io/) server th
35
43
uv sync
36
44
37
45
# Run the server locally (requires env vars)
38
-
NETBOX_URL=https://netbox.example.com/ NETBOX_TOKEN=<token> uv run server.py
46
+
NETBOX_URL=https://netbox.example.com/ NETBOX_TOKEN=<token> uv run netbox-mcp-server
47
+
48
+
# Alternative: module execution
49
+
uv run -m netbox_mcp_server
39
50
40
51
# Add to Claude Code (for development/testing)
41
52
claude mcp add --transport stdio netbox \
42
53
--env NETBOX_URL=https://netbox.example.com/ \
43
54
--env NETBOX_TOKEN=<token> \
44
-
-- uv --directory /path/to/netbox-mcp-server run server.py
55
+
-- uv --directory /path/to/netbox-mcp-server run netbox-mcp-server
-**Functional where clear**: Use functional, stateless approaches when they improve clarity
58
69
-**Clean core logic**: Keep business logic clean; push implementation details to the edges
59
70
71
+
## Version Management
72
+
73
+
This project uses [python-semantic-release](https://python-semantic-release.readthedocs.io/) for automated version management. Versions are automatically determined from commit messages following [Conventional Commits](https://www.conventionalcommits.org/).
74
+
75
+
**Release triggers:**
76
+
77
+
-`feat:` commits trigger minor version bumps (1.0.0 → 1.1.0)
78
+
-`fix:` and `perf:` commits trigger patch version bumps (1.0.0 → 1.0.1)
79
+
- Commits with `BREAKING CHANGE:` in the body trigger major version bumps (1.0.0 → 2.0.0)
80
+
-`docs:`, `test:`, `chore:`, `ci:`, `refactor:` commits are logged but don't trigger releases
81
+
82
+
**Workflow:**
83
+
84
+
- Merge to `main` automatically triggers release analysis
85
+
- If commits warrant a release, version is bumped and CHANGELOG updated
86
+
- GitHub Release is created with auto-generated release notes
87
+
60
88
## Code Standards
61
89
62
90
### Python Conventions
@@ -260,7 +288,6 @@ Currently no automated test suite. When adding tests:
260
288
- ❌ **NEVER commit directly to `main`** - Always use feature branches
261
289
- ✅ **DO keep commits professional and concise** and focused on the change
0 commit comments