feat: add full CRUD for all Netbird API resources#5
Open
ZILosoft wants to merge 1 commit into
Open
Conversation
- Add Post, Delete, Patch methods to NetbirdClient - Fix status check to accept 200 and 204 (DELETE returns 204) - Extend peers, groups, policies, networks, nameservers, posture_checks with get/create/update/delete - Add network_resources and network_routers (full CRUD) - Add dns_settings, setup_keys, users, accounts, routes, events, tokens Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR extends the MCP server from read-only list operations to full CRUD coverage across all major Netbird API resources.
New HTTP methods on
NetbirdClientPost(ctx, path, body, v)— for create operationsDelete(ctx, path)— for delete operationsPatch(ctx, path, body, v)— for partial updates200 OKand204 No Content(DELETE responses)Extended existing tools (get / create / update / delete added)
get_netbird_peer,update_netbird_peer,delete_netbird_peer,get_netbird_peer_accessible_peersget_netbird_group,create_netbird_group,update_netbird_group,delete_netbird_groupget_netbird_policy,create_netbird_policy,update_netbird_policy,delete_netbird_policyget_netbird_network,create_netbird_network,update_netbird_network,delete_netbird_networkget_netbird_nameserver,create_netbird_nameserver,update_netbird_nameserver,delete_netbird_nameserverget_netbird_posture_check,create_netbird_posture_check,update_netbird_posture_check,delete_netbird_posture_checkNew tool files
tools/network_resources.go/networks/{id}/resources)tools/network_routers.go/networks/{id}/routers)tools/dns_settings.goget_netbird_dns_settings,update_netbird_dns_settingstools/setup_keys.gotools/users.goget_netbird_current_user,invite_netbird_usertools/accounts.golist_netbird_accounts,update_netbird_accounttools/routes.gotools/events.golist_netbird_eventswith page/limit paginationtools/tokens.goTest plan
go build ./...compiles without errorsgo test ./...passes all existing tests