Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ This is a simple read-only [Model Context Protocol](https://modelcontextprotocol
> Show me all configuration changes to the core router in the last month
```

### SSL Verification (Self-Signed Certificates)

By default, SSL certificate verification is enabled. If your NetBox instance uses a self-signed certificate, you can disable SSL verification by setting the `VERIFY_SSL` environment variable to `FALSE`, `NO`, `0`, or `OFF`:

## Development

Contributions are welcome! Please open an issue or submit a PR.
Expand Down
9 changes: 7 additions & 2 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,16 @@ def netbox_get_changelogs(filters: dict):
# Load NetBox configuration from environment variables
netbox_url = os.getenv("NETBOX_URL")
netbox_token = os.getenv("NETBOX_TOKEN")

verify_ssl_env = os.getenv("VERIFY_SSL", "TRUE").strip().upper()
if verify_ssl_env in ("0", "FALSE", "NO", "OFF"):
verify_ssl = False
else:
verify_ssl = True

if not netbox_url or not netbox_token:
raise ValueError("NETBOX_URL and NETBOX_TOKEN environment variables must be set")

# Initialize NetBox client
netbox = NetBoxRestClient(url=netbox_url, token=netbox_token)
netbox = NetBoxRestClient(url=netbox_url, token=netbox_token, verify_ssl=verify_ssl)

mcp.run(transport="stdio")