{"id":28384310,"url":"https://github.com/netboxlabs/netbox-mcp-server","last_synced_at":"2025-06-25T23:31:09.798Z","repository":{"id":281704553,"uuid":"940125757","full_name":"netboxlabs/netbox-mcp-server","owner":"netboxlabs","description":"Model Context Protocol (MCP) server for read-only interaction with NetBox data in LLMs","archived":false,"fork":false,"pushed_at":"2025-05-19T21:55:38.000Z","size":49,"stargazers_count":41,"open_issues_count":6,"forks_count":14,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-06-06T08:34:16.862Z","etag":null,"topics":["mcp","mcp-server","netbox"],"latest_commit_sha":null,"homepage":"https://netboxlabs.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netboxlabs.png","metadata":{"files":{"readme":"README-client.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-27T16:51:50.000Z","updated_at":"2025-05-28T03:30:11.000Z","dependencies_parsed_at":"2025-03-10T18:44:34.672Z","dependency_job_id":"b05c47b1-8b6d-43a5-b93f-2d8e42c2f2aa","html_url":"https://github.com/netboxlabs/netbox-mcp-server","commit_stats":null,"previous_names":["netboxlabs/netbox-mcp-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/netboxlabs/netbox-mcp-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netboxlabs%2Fnetbox-mcp-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netboxlabs%2Fnetbox-mcp-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netboxlabs%2Fnetbox-mcp-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netboxlabs%2Fnetbox-mcp-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netboxlabs","download_url":"https://codeload.github.com/netboxlabs/netbox-mcp-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netboxlabs%2Fnetbox-mcp-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261972578,"owners_count":23238537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mcp","mcp-server","netbox"],"created_at":"2025-05-30T08:10:19.608Z","updated_at":"2025-06-25T23:31:09.789Z","avatar_url":"https://github.com/netboxlabs.png","language":"Python","funding_links":[],"categories":["📚 Projects (1974 total)","🤖 AI/ML"],"sub_categories":["MCP Servers"],"readme":"# NetBox Client Library\n\nA Python client library for interacting with NetBox, providing both a base abstract class and a REST API implementation.\n\n## Features\n\n- Abstract base class with generic CRUD methods\n- REST API implementation of the base class\n- Support for both single and bulk operations\n- Designed to be extensible for ORM-based implementations\n\n## Installation\n\n```bash\npip install -r requirements.txt\n```\n\n## Usage\n\n### REST API Client\n\n```python\nfrom client import NetBoxRestClient\n\n# Initialize the client\nclient = NetBoxRestClient(\n    url=\"https://netbox.example.com\",\n    token=\"your_api_token_here\",\n    verify_ssl=True\n)\n\n# Get all sites\nsites = client.get(\"dcim/sites\")\nprint(f\"Found {len(sites)} sites\")\n\n# Get a specific site\nsite = client.get(\"dcim/sites\", id=1)\nprint(f\"Site name: {site.get('name')}\")\n\n# Example with pagination\n# Get sites page by page\npage = 1\nlimit = 50\nwhile True:\n    sites_page = client.get(\"dcim/sites\", params={\n        \"limit\": limit,\n        \"offset\": (page - 1) * limit\n    })\n    if not sites_page:\n        break\n        \n    print(f\"Processing page {page} with {len(sites_page)} sites\")\n    for site in sites_page:\n        print(f\"Site: {site.get('name')}\")\n        \n    page += 1\n\n# Create a new site\nnew_site = client.create(\"dcim/sites\", {\n    \"name\": \"New Site\",\n    \"slug\": \"new-site\",\n    \"status\": \"active\"\n})\nprint(f\"Created site: {new_site.get('name')} (ID: {new_site.get('id')})\")\n\n# Update a site\nupdated_site = client.update(\"dcim/sites\", id=1, data={\n    \"description\": \"Updated description\"\n})\n\n# Delete a site\nsuccess = client.delete(\"dcim/sites\", id=1)\nif success:\n    print(\"Site deleted successfully\")\n\n# Bulk operations\nnew_sites = client.bulk_create(\"dcim/sites\", [\n    {\"name\": \"Site 1\", \"slug\": \"site-1\", \"status\": \"active\"},\n    {\"name\": \"Site 2\", \"slug\": \"site-2\", \"status\": \"active\"}\n])\n\nupdated_sites = client.bulk_update(\"dcim/sites\", [\n    {\"id\": 1, \"description\": \"Updated description 1\"},\n    {\"id\": 2, \"description\": \"Updated description 2\"}\n])\n\nsuccess = client.bulk_delete(\"dcim/sites\", ids=[1, 2])\n```\n\n## Extending for ORM Implementation\n\nThe `NetBoxClientBase` abstract base class can be extended to create an ORM-based implementation for use within a NetBox plugin:\n\n```python\nfrom client import NetBoxClientBase\nfrom django.db import transaction\n\nclass NetBoxOrmClient(NetBoxClientBase):\n    \"\"\"\n    NetBox client implementation using the ORM directly.\n    This would be used within a NetBox plugin.\n    \"\"\"\n    \n    def __init__(self):\n        # No authentication needed as this would run within NetBox\n        pass\n    \n    def get(self, endpoint, id=None, params=None):\n        # Implementation would use Django ORM to fetch objects\n        # Example (not implemented)\n        pass\n    \n    # Other methods would be implemented similarly\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetboxlabs%2Fnetbox-mcp-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetboxlabs%2Fnetbox-mcp-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetboxlabs%2Fnetbox-mcp-server/lists"}