PeeringDB MCP Server — 80 tools
contains code
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
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.
How do you configure the PeeringDB DADL?
- Create a free account at https://www.peeringdb.com and log in.
- USER KEY: click your username (top-right) -> Profile, open the 'API Keys' panel (https://www.peeringdb.com/profile/api_keys).
- 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.
- Click 'Add Key' and COPY the key value immediately -- it is shown only once. If lost, revoke it and create a new one.
- 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.
- Provide only the raw key value to ToolMesh -- it sends the 'Authorization: Api-Key <key>' header automatically.
- For anonymous read-only access, set the credential to 'none' (subject to lower shared rate limits).
Environment variable: CREDENTIAL_PEERINGDB_API_KEY
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:
- name: peeringdb
transport: rest
dadl: peeringdb.dadl
url: "https://www.peeringdb.com/api"
Set the credential:
CREDENTIAL_PEERINGDB_API_KEY=your-token-hereWhat 80 tools does the PeeringDB DADL expose?
GETlist_orgsList organizations. Filter by name/city/country; expand owned net/ix/fac/carrier/campus sets with depth.GETget_orgRetrieve 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.POSTcreate_orgCreate an organization. RESTRICTED to PeeringDB staff -- normal API keys are rejected. New orgs are status='pending'.PUTupdate_orgUpdate an organization (partial -- send only changed fields). Same writable fields as create_org.DELETEdelete_orgSoft-delete an organization (marks status='deleted'). Only empty orgs (no active children) can be deleted.GETlist_org_usersList the user accounts (members/admins) attached to an organization. Requires admin rights on the org.POSTadd_org_userAdd an existing PeeringDB user to an organization with a role. Identify the user by user_id (preferred) or email. Org-admin operation.PUTupdate_org_userUpdate an organization member's role (admin <-> member). Org-admin operation.DELETEremove_org_userRemove a user from an organization's membership (does not delete the user account). Org-admin operation.GETlist_facsList facilities (datacenters). Filter by name, org_id, city, country, state, clli, npanxx; expand netfac/ixfac sets with depth.GETget_facRetrieve a single facility by id (one-element data array). depth=2 expands its net/ix presence sets.POSTcreate_facCreate a facility under an organization. New facilities are status='pending' until staff approval.PUTupdate_facUpdate a facility (partial). Same writable fields as create_fac.DELETEdelete_facSoft-delete a facility (status='deleted').GETlist_netsList 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.GETget_netRetrieve 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.POSTcreate_netCreate a network under an organization. Requires org_id, name and asn. New networks are status='pending' until staff approval. ASN is set-once.PUTupdate_netUpdate a network (partial). Same writable fields as create_net. Note: asn cannot be changed after creation.DELETEdelete_netSoft-delete a network (status='deleted').GETlist_ixesList Internet Exchanges. Filter by name, org_id, city, country, region_continent; expand ixlan_set/fac_set with depth.GETget_ixRetrieve a single Internet Exchange by id (one-element data array). depth=2 expands ixlan_set and fac_set.POSTcreate_ixCreate 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'.PUTupdate_ixUpdate an Internet Exchange (partial). Same writable fields as create_ix (the 'prefix' field only applies at creation).DELETEdelete_ixSoft-delete an Internet Exchange (status='deleted').POSTrequest_ixf_importQueue 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.GETlist_ixlansList IX LANs. Filter by ix_id; expand ixpfx_set/net_set with depth.GETget_ixlanRetrieve a single IX LAN by id (one-element data array). depth=2 expands ixpfx_set and net_set.PUTupdate_ixlanUpdate an IX LAN (partial). IX LANs are created/deleted together with their parent exchange, so only update is available.GETlist_ixpfxsList IX LAN prefixes. Filter by ixlan_id, prefix, protocol (IPv4|IPv6), in_dfz.GETget_ixpfxRetrieve a single IX LAN prefix by id (one-element data array).POSTcreate_ixpfxAdd an IP prefix to an IX LAN. Requires ixlan_id, protocol and prefix (CIDR).PUTupdate_ixpfxUpdate an IX LAN prefix (partial). Same writable fields as create_ixpfx.DELETEdelete_ixpfxSoft-delete an IX LAN prefix (status='deleted').GETlist_ixfacsList IX-facility presences (an exchange present at a facility). Filter by ix_id, fac_id.GETget_ixfacRetrieve a single IX-facility presence by id (one-element data array).POSTcreate_ixfacRecord that an Internet Exchange is present at a facility. Requires ix_id and fac_id.PUTupdate_ixfacUpdate an IX-facility presence (partial). Repoints ix_id / fac_id.DELETEdelete_ixfacSoft-delete an IX-facility presence (status='deleted').GETlist_netfacsList network-facility presences (a network present at a facility). Filter by net_id, fac_id, local_asn.GETget_netfacRetrieve a single network-facility presence by id (one-element data array).POSTcreate_netfacRecord that a network is present at a facility. Requires net_id and fac_id.PUTupdate_netfacUpdate a network-facility presence (partial). Repoints net_id / fac_id.DELETEdelete_netfacSoft-delete a network-facility presence (status='deleted').GETlist_netixlansList 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.GETget_netixlanRetrieve a single peering presence by id (one-element data array).POSTcreate_netixlanAdd 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.PUTupdate_netixlanUpdate a peering presence (partial). Same writable fields as create_netixlan.DELETEdelete_netixlanSoft-delete a peering presence (status='deleted').POSTset_netixlan_net_sideSet the network-side facility of a peering presence (which facility the network's connection lands in). Requires fac_id.POSTset_netixlan_ix_sideSet the IX-side facility of a peering presence (which facility the exchange's connection lands in). Requires fac_id.GETlist_pocsList network points of contact. Filter by net_id, role, name, email, phone. Private/Users-visibility contacts require an authorized key.GETget_pocRetrieve a single point of contact by id (one-element data array).POSTcreate_pocCreate a point of contact on a network. Requires net_id and role.PUTupdate_pocUpdate a point of contact (partial). Same writable fields as create_poc.DELETEdelete_pocSoft-delete a point of contact (status='deleted').GETlist_carriersList carriers. Filter by name, org_id; expand carrierfac_set with depth.GETget_carrierRetrieve a single carrier by id (one-element data array). depth=2 expands carrierfac_set.POSTcreate_carrierCreate a carrier under an organization. Requires org_id and name.PUTupdate_carrierUpdate a carrier (partial). Same writable fields as create_carrier.DELETEdelete_carrierSoft-delete a carrier (status='deleted').GETlist_carrierfacsList carrier-facility presences. Filter by carrier_id, fac_id.GETget_carrierfacRetrieve a single carrier-facility presence by id (one-element data array).POSTcreate_carrierfacRecord that a carrier is present at a facility. Requires carrier_id and fac_id. The presence starts pending until the facility owner approves it.PUTupdate_carrierfacUpdate a carrier-facility presence (partial). Repoints carrier_id / fac_id.DELETEdelete_carrierfacSoft-delete a carrier-facility presence (status='deleted').POSTapprove_carrierfacApprove a pending carrier-facility presence (facility-owner / staff action).POSTreject_carrierfacReject a pending carrier-facility presence (facility-owner / staff action).GETlist_campusesList campuses (groupings of nearby facilities). Filter by name, org_id; expand fac_set with depth.GETget_campusRetrieve a single campus by id (one-element data array). depth=2 expands fac_set.POSTcreate_campusCreate a campus under an organization. Requires org_id and name. A campus's location fields are derived from its member facilities.PUTupdate_campusUpdate a campus (partial). Same writable fields as create_campus.DELETEdelete_campusSoft-delete a campus (status='deleted').POSTadd_campus_facilityAdd a facility to a campus. Both must belong to the same organization and be geographically close.POSTremove_campus_facilityRemove a facility from a campus (does not delete the facility).GETlist_as_setsList the ASN -> IRR as-set mapping for all networks (read-only). The data object maps each ASN to its irr_as_set string.GETget_as_setGet the IRR as-set / route-set handle for a single ASN (read-only).GETget_assetRetrieve an entity's asset (logo). file_data is returned base64-encoded.POSTcreate_assetUpload/set an entity's logo. Provide file_type (image/png or image/jpeg) and base64 file_data.PUTupdate_assetReplace an entity's logo. Same body fields as create_asset.DELETEdelete_assetDelete an entity's logo asset.What composite workflows does the PeeringDB DADL provide? ⚠ contains code
FNfind_net_by_asnLook up a single network by its ASN (ASN is globally unique). Returns the network object or null if no network has that ASN.FNget_asn_presenceMap 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}.FNscore_net_completenessScore 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'.FNaudit_netixlan_ip_integrityData-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.FNaudit_net_presenceConsistency 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.