Weave Net · Capability

Weave Net Container Networking

Unified container networking workflow for managing Weave Net's IPAM, peer connections, DNS, and network status. Used by DevOps engineers and platform operators to automate container network management.

Run with Naftiko ContainersNetworkingKubernetesIPAMDNSDevOps

What You Can Do

GET
Get status — Get Weave Net daemon status
/v1/status
POST
Connect peer — Connect to a remote peer
/v1/peers
POST
Allocate ip — Allocate IP for a container
/v1/ipam/allocations
GET
Lookup ip — Look up container IP
/v1/ipam/allocations/{containerId}
DELETE
Release ips — Release container IPs
/v1/ipam/allocations/{containerId}
GET
Get default subnet — Get default IPAM subnet
/v1/ipam/subnet
GET
Get dns domain — Get WeaveDNS domain
/v1/dns/domain
PUT
Register dns — Register container DNS name
/v1/dns/registrations/{containerId}/{ip}
DELETE
Deregister dns — Deregister container DNS name
/v1/dns/registrations/{containerId}/{ip}

MCP Tools

get-daemon-status

Get the current status of the Weave Net daemon including peers and IPAM state

read-only
connect-to-peer

Connect Weave Net to a remote peer node

idempotent
allocate-container-ip

Allocate an IP address for a container on the Weave network

lookup-container-ip

Look up the IP address allocated to a container

read-only
release-container-ips

Release all IP addresses allocated to a container

get-default-subnet

Get the default subnet used for IPAM allocation

read-only
get-dns-domain

Get the WeaveDNS domain suffix for name resolution

read-only
register-container-dns

Register a DNS name for a container in WeaveDNS

idempotent
deregister-container-dns

Deregister a container's DNS name from WeaveDNS

APIs Used

weave-net

Capability Spec

container-networking.yaml Raw ↑
naftiko: "1.0.0-alpha1"

info:
  label: "Weave Net Container Networking"
  description: "Unified container networking workflow for managing Weave Net's IPAM, peer connections, DNS, and network status. Used by DevOps engineers and platform operators to automate container network management."
  tags:
    - Containers
    - Networking
    - Kubernetes
    - IPAM
    - DNS
    - DevOps
  created: "2026-05-03"
  modified: "2026-05-03"

binds:
  - namespace: env
    keys:
      WEAVE_NET_HOST: WEAVE_NET_HOST

capability:
  consumes:
    - import: weave-net
      location: ./shared/weave-net-api.yaml

  exposes:
    - type: rest
      port: 8082
      namespace: container-networking-api
      description: "Unified REST API for Weave Net container networking management."
      resources:
        - path: /v1/status
          name: status
          description: "Daemon status"
          operations:
            - method: GET
              name: get-status
              description: "Get Weave Net daemon status"
              call: "weave-net.get-status"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/peers
          name: peers
          description: "Peer connection management"
          operations:
            - method: POST
              name: connect-peer
              description: "Connect to a remote peer"
              call: "weave-net.connect-peer"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/ipam/allocations
          name: ipam-allocations
          description: "IP address allocations"
          operations:
            - method: POST
              name: allocate-ip
              description: "Allocate IP for a container"
              call: "weave-net.allocate-ip"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/ipam/allocations/{containerId}
          name: ipam-allocation
          description: "Container IP allocation"
          operations:
            - method: GET
              name: lookup-ip
              description: "Look up container IP"
              call: "weave-net.lookup-ip"
              with:
                containerId: "rest.containerId"
              outputParameters:
                - type: object
                  mapping: "$."
            - method: DELETE
              name: release-ips
              description: "Release container IPs"
              call: "weave-net.release-ips"
              with:
                containerId: "rest.containerId"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/ipam/subnet
          name: default-subnet
          description: "Default subnet information"
          operations:
            - method: GET
              name: get-default-subnet
              description: "Get default IPAM subnet"
              call: "weave-net.get-default-subnet"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/dns/domain
          name: dns-domain
          description: "DNS domain"
          operations:
            - method: GET
              name: get-dns-domain
              description: "Get WeaveDNS domain"
              call: "weave-net.get-dns-domain"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/dns/registrations/{containerId}/{ip}
          name: dns-registration
          description: "DNS name registrations"
          operations:
            - method: PUT
              name: register-dns
              description: "Register container DNS name"
              call: "weave-net.register-dns"
              with:
                containerId: "rest.containerId"
                ip: "rest.ip"
              outputParameters:
                - type: object
                  mapping: "$."
            - method: DELETE
              name: deregister-dns
              description: "Deregister container DNS name"
              call: "weave-net.deregister-dns"
              with:
                containerId: "rest.containerId"
                ip: "rest.ip"
              outputParameters:
                - type: object
                  mapping: "$."

    - type: mcp
      port: 9092
      namespace: container-networking-mcp
      transport: http
      description: "MCP server for AI-assisted Weave Net container networking management."
      tools:
        - name: get-daemon-status
          description: "Get the current status of the Weave Net daemon including peers and IPAM state"
          hints:
            readOnly: true
            openWorld: false
          call: "weave-net.get-status"
          outputParameters:
            - type: object
              mapping: "$."
        - name: connect-to-peer
          description: "Connect Weave Net to a remote peer node"
          hints:
            readOnly: false
            idempotent: true
          call: "weave-net.connect-peer"
          outputParameters:
            - type: object
              mapping: "$."
        - name: allocate-container-ip
          description: "Allocate an IP address for a container on the Weave network"
          hints:
            readOnly: false
            idempotent: false
          call: "weave-net.allocate-ip"
          with:
            containerId: "tools.containerId"
          outputParameters:
            - type: object
              mapping: "$."
        - name: lookup-container-ip
          description: "Look up the IP address allocated to a container"
          hints:
            readOnly: true
            openWorld: false
          call: "weave-net.lookup-ip"
          with:
            containerId: "tools.containerId"
          outputParameters:
            - type: object
              mapping: "$."
        - name: release-container-ips
          description: "Release all IP addresses allocated to a container"
          hints:
            readOnly: false
            destructive: true
          call: "weave-net.release-ips"
          with:
            containerId: "tools.containerId"
          outputParameters:
            - type: object
              mapping: "$."
        - name: get-default-subnet
          description: "Get the default subnet used for IPAM allocation"
          hints:
            readOnly: true
            openWorld: false
          call: "weave-net.get-default-subnet"
          outputParameters:
            - type: object
              mapping: "$."
        - name: get-dns-domain
          description: "Get the WeaveDNS domain suffix for name resolution"
          hints:
            readOnly: true
            openWorld: false
          call: "weave-net.get-dns-domain"
          outputParameters:
            - type: object
              mapping: "$."
        - name: register-container-dns
          description: "Register a DNS name for a container in WeaveDNS"
          hints:
            readOnly: false
            idempotent: true
          call: "weave-net.register-dns"
          with:
            containerId: "tools.containerId"
            ip: "tools.ip"
          outputParameters:
            - type: object
              mapping: "$."
        - name: deregister-container-dns
          description: "Deregister a container's DNS name from WeaveDNS"
          hints:
            readOnly: false
            destructive: true
          call: "weave-net.deregister-dns"
          with:
            containerId: "tools.containerId"
            ip: "tools.ip"
          outputParameters:
            - type: object
              mapping: "$."