# PeeringDB MCP Server — 80 tools via DADL

The PeeringDB DADL turns PeeringDB's API into an MCP server that Claude, GPT or any MCP-compatible agent can consume directly. One YAML file declares all 80 tools — org, fac, ix, net, netixlan, campus, and more — and ToolMesh serves them at runtime. No Python boilerplate, no per-endpoint code, no separate MCP server process.

Below: the endpoint coverage matrix, a two-block ToolMesh setup, the full tool reference grouped by PeeringDB feature area, required credential scopes.

**Source:** [PeeringDB API](https://www.peeringdb.com/apidocs/)

**Updated:** 2026-06-25

**Tags:** networking, crud, user-management, authentication, real-time, logging, monitoring, auth:bearer

## Which PeeringDB endpoints are covered?

**100%** (80 of ~80 endpoints).

**Focus:** PeeringDB v2 peering database: net, ix, fac, org records, net (ASN, IRR as-set, peering policy, info prefixes), ix (Internet exchanges, ixlan, ixpfx), fac (datacenter facilities, address, geolocation), org (organizations, poc contacts, members, logos), netixlan (peering presence, IPv4, IPv6, port speed).

**Missing:** None of the documented /api endpoints are omitted. Per-field filter parameters are documented (suffix system) rather than enumerated exhaustively; HTTP PATCH partial_update is served by the PUT-based update tools.

*Last reviewed: 2026-06-25*

## How do you configure the PeeringDB DADL?

1. Create a free account at https://www.peeringdb.com and log in.
2. USER KEY: click your username (top-right) -> Profile, open the 'API Keys' panel (https://www.peeringdb.com/profile/api_keys).
3. Click 'Add API Key', give it a label, and choose the scope: leave it a normal key to mirror your account's write permissions, or tick 'read-only' for safe read access across your namespaces.
4. Click 'Add Key' and COPY the key value immediately -- it is shown only once. If lost, revoke it and create a new one.
5. ORG KEY (for automation not tied to a person): go to the organization's admin panel -> 'API Keys', add a key with an associated email and per-namespace permissions.
6. Provide only the raw key value to ToolMesh -- it sends the 'Authorization: Api-Key <key>' header automatically.
7. For anonymous read-only access, set the credential to 'none' (subject to lower shared rate limits).

**Environment variable:** `CREDENTIAL_PEERINGDB_API_KEY`

[Authentication docs](https://docs.peeringdb.com/howto/api_keys/)

*base_url is the public hosted instance (https://www.peeringdb.com/api). Reads work without a key but share a lower anonymous rate limit; a key raises limits and is required for writes and for private/contact data. Prefer a read-only key unless you intend to modify records. Interactive API docs: https://www.peeringdb.com/apidocs/ -- raw schema: https://www.peeringdb.com/s/2.80.1/api-schema.yaml*

## How do you install the PeeringDB MCP server with ToolMesh?

Add to your `backends.yaml`:

```yaml
- name: peeringdb
  transport: rest
  dadl: peeringdb.dadl
  url: "https://www.peeringdb.com/api"

```

Set the credential:

```
CREDENTIAL_PEERINGDB_API_KEY=your-token-here
```

## What 80 tools does the PeeringDB DADL expose?

- **GET** `list_orgs` — List organizations. Filter by name/city/country; expand owned net/ix/fac/carrier/campus sets with depth.
- **GET** `get_org` — Retrieve a single organization by id. Returns a one-element data array. Use depth=2 to expand its net_set/ix_set/fac_set/carrier_set/campus_set.
- **POST** `create_org` — Create an organization. RESTRICTED to PeeringDB staff -- normal API keys are rejected. New orgs are status='pending'.
- **PUT** `update_org` — Update an organization (partial -- send only changed fields). Same writable fields as create_org.
- **DELETE** `delete_org` — Soft-delete an organization (marks status='deleted'). Only empty orgs (no active children) can be deleted.
- **GET** `list_org_users` — List the user accounts (members/admins) attached to an organization. Requires admin rights on the org.
- **POST** `add_org_user` — Add an existing PeeringDB user to an organization with a role. Identify the user by user_id (preferred) or email. Org-admin operation.
- **PUT** `update_org_user` — Update an organization member's role (admin <-> member). Org-admin operation.
- **DELETE** `remove_org_user` — Remove a user from an organization's membership (does not delete the user account). Org-admin operation.
- **GET** `list_facs` — List facilities (datacenters). Filter by name, org_id, city, country, state, clli, npanxx; expand netfac/ixfac sets with depth.
- **GET** `get_fac` — Retrieve a single facility by id (one-element data array). depth=2 expands its net/ix presence sets.
- **POST** `create_fac` — Create a facility under an organization. New facilities are status='pending' until staff approval.
- **PUT** `update_fac` — Update a facility (partial). Same writable fields as create_fac.
- **DELETE** `delete_fac` — Soft-delete a facility (status='deleted').
- **GET** `list_nets` — List networks. ASN is unique: ?asn=13335 returns one network. Also filter by name, org_id, info_type, info_scope, irr_as_set; expand peering/facility/contact sets with depth.
- **GET** `get_net` — Retrieve a single network by its internal id (NOT the ASN; query list_nets?asn=... to look up by ASN). One-element data array. depth=2 expands netixlan_set/netfac_set/poc_set.
- **POST** `create_net` — Create a network under an organization. Requires org_id, name and asn. New networks are status='pending' until staff approval. ASN is set-once.
- **PUT** `update_net` — Update a network (partial). Same writable fields as create_net. Note: asn cannot be changed after creation.
- **DELETE** `delete_net` — Soft-delete a network (status='deleted').
- **GET** `list_ixes` — List Internet Exchanges. Filter by name, org_id, city, country, region_continent; expand ixlan_set/fac_set with depth.
- **GET** `get_ix` — Retrieve a single Internet Exchange by id (one-element data array). depth=2 expands ixlan_set and fac_set.
- **POST** `create_ix` — Create an Internet Exchange. Requires org_id, name, city, country and prefix (the initial IX LAN CIDR, which bootstraps an ixlan + ixpfx). New IXes are status='pending'.
- **PUT** `update_ix` — Update an Internet Exchange (partial). Same writable fields as create_ix (the 'prefix' field only applies at creation).
- **DELETE** `delete_ix` — Soft-delete an Internet Exchange (status='deleted').
- **POST** `request_ixf_import` — Queue an IX-F member-list import for an exchange. Requires the exchange's ixlan to have ixf_ixp_member_list_url set and import enabled.
- **GET** `list_ixlans` — List IX LANs. Filter by ix_id; expand ixpfx_set/net_set with depth.
- **GET** `get_ixlan` — Retrieve a single IX LAN by id (one-element data array). depth=2 expands ixpfx_set and net_set.
- **PUT** `update_ixlan` — Update an IX LAN (partial). IX LANs are created/deleted together with their parent exchange, so only update is available.
- **GET** `list_ixpfxs` — List IX LAN prefixes. Filter by ixlan_id, prefix, protocol (IPv4|IPv6), in_dfz.
- **GET** `get_ixpfx` — Retrieve a single IX LAN prefix by id (one-element data array).
- **POST** `create_ixpfx` — Add an IP prefix to an IX LAN. Requires ixlan_id, protocol and prefix (CIDR).
- **PUT** `update_ixpfx` — Update an IX LAN prefix (partial). Same writable fields as create_ixpfx.
- **DELETE** `delete_ixpfx` — Soft-delete an IX LAN prefix (status='deleted').
- **GET** `list_ixfacs` — List IX-facility presences (an exchange present at a facility). Filter by ix_id, fac_id.
- **GET** `get_ixfac` — Retrieve a single IX-facility presence by id (one-element data array).
- **POST** `create_ixfac` — Record that an Internet Exchange is present at a facility. Requires ix_id and fac_id.
- **PUT** `update_ixfac` — Update an IX-facility presence (partial). Repoints ix_id / fac_id.
- **DELETE** `delete_ixfac` — Soft-delete an IX-facility presence (status='deleted').
- **GET** `list_netfacs` — List network-facility presences (a network present at a facility). Filter by net_id, fac_id, local_asn.
- **GET** `get_netfac` — Retrieve a single network-facility presence by id (one-element data array).
- **POST** `create_netfac` — Record that a network is present at a facility. Requires net_id and fac_id.
- **PUT** `update_netfac` — Update a network-facility presence (partial). Repoints net_id / fac_id.
- **DELETE** `delete_netfac` — Soft-delete a network-facility presence (status='deleted').
- **GET** `list_netixlans` — List peering presences: each row is a network (asn) on an IX LAN with its ipaddr4/ipaddr6 and port speed (Mbit/s). Filter by net_id, ix_id, ixlan_id, asn, ipaddr4, ipaddr6, is_rs_peer, operational, speed.
- **GET** `get_netixlan` — Retrieve a single peering presence by id (one-element data array).
- **POST** `create_netixlan` — Add a network's peering presence on an IX LAN. Requires net_id, ixlan_id, asn (must match the net's ASN) and speed; supply ipaddr4 and/or ipaddr6.
- **PUT** `update_netixlan` — Update a peering presence (partial). Same writable fields as create_netixlan.
- **DELETE** `delete_netixlan` — Soft-delete a peering presence (status='deleted').
- **POST** `set_netixlan_net_side` — Set the network-side facility of a peering presence (which facility the network's connection lands in). Requires fac_id.
- **POST** `set_netixlan_ix_side` — Set the IX-side facility of a peering presence (which facility the exchange's connection lands in). Requires fac_id.
- **GET** `list_pocs` — List network points of contact. Filter by net_id, role, name, email, phone. Private/Users-visibility contacts require an authorized key.
- **GET** `get_poc` — Retrieve a single point of contact by id (one-element data array).
- **POST** `create_poc` — Create a point of contact on a network. Requires net_id and role.
- **PUT** `update_poc` — Update a point of contact (partial). Same writable fields as create_poc.
- **DELETE** `delete_poc` — Soft-delete a point of contact (status='deleted').
- **GET** `list_carriers` — List carriers. Filter by name, org_id; expand carrierfac_set with depth.
- **GET** `get_carrier` — Retrieve a single carrier by id (one-element data array). depth=2 expands carrierfac_set.
- **POST** `create_carrier` — Create a carrier under an organization. Requires org_id and name.
- **PUT** `update_carrier` — Update a carrier (partial). Same writable fields as create_carrier.
- **DELETE** `delete_carrier` — Soft-delete a carrier (status='deleted').
- **GET** `list_carrierfacs` — List carrier-facility presences. Filter by carrier_id, fac_id.
- **GET** `get_carrierfac` — Retrieve a single carrier-facility presence by id (one-element data array).
- **POST** `create_carrierfac` — Record that a carrier is present at a facility. Requires carrier_id and fac_id. The presence starts pending until the facility owner approves it.
- **PUT** `update_carrierfac` — Update a carrier-facility presence (partial). Repoints carrier_id / fac_id.
- **DELETE** `delete_carrierfac` — Soft-delete a carrier-facility presence (status='deleted').
- **POST** `approve_carrierfac` — Approve a pending carrier-facility presence (facility-owner / staff action).
- **POST** `reject_carrierfac` — Reject a pending carrier-facility presence (facility-owner / staff action).
- **GET** `list_campuses` — List campuses (groupings of nearby facilities). Filter by name, org_id; expand fac_set with depth.
- **GET** `get_campus` — Retrieve a single campus by id (one-element data array). depth=2 expands fac_set.
- **POST** `create_campus` — Create a campus under an organization. Requires org_id and name. A campus's location fields are derived from its member facilities.
- **PUT** `update_campus` — Update a campus (partial). Same writable fields as create_campus.
- **DELETE** `delete_campus` — Soft-delete a campus (status='deleted').
- **POST** `add_campus_facility` — Add a facility to a campus. Both must belong to the same organization and be geographically close.
- **POST** `remove_campus_facility` — Remove a facility from a campus (does not delete the facility).
- **GET** `list_as_sets` — List the ASN -> IRR as-set mapping for all networks (read-only). The data object maps each ASN to its irr_as_set string.
- **GET** `get_as_set` — Get the IRR as-set / route-set handle for a single ASN (read-only).
- **GET** `get_asset` — Retrieve an entity's asset (logo). file_data is returned base64-encoded.
- **POST** `create_asset` — Upload/set an entity's logo. Provide file_type (image/png or image/jpeg) and base64 file_data.
- **PUT** `update_asset` — Replace an entity's logo. Same body fields as create_asset.
- **DELETE** `delete_asset` — Delete an entity's logo asset.

## What composite workflows does the PeeringDB DADL provide?

- **FN** `find_net_by_asn` — Look up a single network by its ASN (ASN is globally unique). Returns the network object or null if no network has that ASN.
- **FN** `get_asn_presence` — Map an ASN's peering footprint: the Internet Exchanges (with peering IPs/speed) and the facilities where the network is present. Returns {asn, name, net_id, exchanges[], facilities[]} or {found:false}.
- **FN** `score_net_completeness` — Score a network's PeeringDB record for peering-readiness (0-100) against the fields IXes commonly require; returns the score, the failing checks, and the full checklist. NOTE: has_tech_contact/has_abuse depend on POC visibility -- contacts marked 'Users' or 'Private' are only returned to an authorized API key, so a low contact score can mean 'not visible to this key' rather than 'absent'.
- **FN** `audit_netixlan_ip_integrity` — Data-quality audit of one Internet Exchange's peering table: flags netixlan IPs (IPv4 and IPv6) that fall outside the LAN's ixpfx prefixes, and duplicate IPv4/IPv6 addresses on the same LAN. Pages through all members; returns only the violations and sets truncated=true if a LAN exceeds the 40-page cap. Pass an ix_id from list_ixes.
- **FN** `audit_net_presence` — Consistency audit of a network's peering presence: flags netixlan.asn that disagrees with the net's ASN, non-operational connections, rows with no IP address, invalid speeds, and the case where the net declares IPv6 (info_ipv6=true) but no netixlan carries an IPv6 address. Returns the net summary plus the list of issues. Pass an ASN.

## Which DADLs are related to PeeringDB?

- [Mikrotik](https://www.dadl.ai/d/mikrotik/) — MikroTik RouterOS REST API -- manage interfaces, IP addresses, routing, firewall, DHCP, DNS, PPP, queues, wireless, system configuration, users, certificates, files, logs, and diagnostics on RouterOS v7.1+ devices
- [Graylog](https://www.dadl.ai/d/graylog/) — Graylog REST API -- log search (Views/Search + legacy universal), streams, pipelines, inputs, alerts, events, dashboards, users, roles, sidecars, index management, and cluster administration. Targets Graylog 6.x.
- [Alertmanager](https://www.dadl.ai/d/alertmanager/) — Prometheus Alertmanager API v2 -- alerts, silences, receivers, alert groups, status, and operational health
- [Hacker News](https://www.dadl.ai/d/hackernews/) — Hacker News API — read-only access to stories, comments, polls, jobs, users, and live feeds from news.ycombinator.com
- [Mempool](https://www.dadl.ai/d/mempool/) — mempool.space — Bitcoin block explorer, mempool visualizer, fee estimator, Lightning Network explorer, and transaction accelerator
- [NetBox](https://www.dadl.ai/d/netbox/) — NetBox DCIM/IPAM API -- full v4 coverage: sites, racks, devices, modules, interfaces, cables, power, IPAM (prefixes, IPs, VLANs, VRFs, route-targets, VLAN translation), virtualization, circuits (including virtual circuits), tenants, contacts, VPN (IKE/IPSec/L2VPN), wireless, extras (webhooks, event-rules, scripts, config-templates, bookmarks, notifications), users/permissions/tokens, and core data sources & jobs

---

**Canonical URL:** https://www.dadl.ai/d/peeringdb/
**Raw DADL:** https://github.com/DunkelCloud/dadl-registry/blob/main/peeringdb.dadl
