Skip to main content
Glama
AngelN-Halo

mcp-netdisco

by AngelN-Halo

mcp-netdisco

一个 Docker 化的 Model Context Protocol (MCP) 服务器,为 MCP 客户端提供对 Netdisco 的只读访问。

功能

  • 使用 Netdisco 的 /login 端点,并携带 HTTP Basic 凭据

  • 缓存返回的 API 密钥,并每 30 天刷新一次

  • 如果 Netdisco 返回 HTTP 401,则自动重新认证

  • 将请求限制在已配置 Netdisco 服务器上的相对路径

  • 通过 MCP stdio 运行,供启动 Docker 容器的客户端使用

Related MCP server: kismet-wireless-mcp

配置

创建一个 .env 文件。默认 URL 是生产环境 Netdisco 服务器:

NETDISCO_URL=http://your-url-site.com:5000
NETDISCO_USERNAME=your-netdisco-username
NETDISCO_PASSWORD=your-netdisco-password
NETDISCO_TIMEOUT=20

用户名和密码仅用于从 POST /login 获取 API 密钥。请勿提交 .env 文件。

Docker

直接构建并运行:

docker build -t mcp-netdisco .
docker run --rm -i --env-file .env mcp-netdisco

或者使用 Compose:

docker compose build
docker compose run --rm -T mcp-netdisco

MCP 工具

该服务器暴露以下工具:

netdisco_api(path, query)

  • path:相对的 Netdisco API 路径,例如 /api/v1/search/device

  • query:可选的查询字符串参数

数据调用仅支持 HTTP GET 请求。绝对 URL 会被拒绝,并且请求不能重定向到其他主机。

Netdisco 令牌有效期

服务器每 30 天刷新缓存的 API 密钥,并在收到 401 响应后重试一次。Netdisco 的 api_token_lifetime 设置必须长于刷新间隔(否则 401 重试会在需要时获取新密钥)。刷新间隔以后可以按需配置。

开发

python3 -m venv .venv
. .venv/bin/activate
pip install -e .
export NETDISCO_USERNAME=your-user
export NETDISCO_PASSWORD=your-password
python -m mcp_netdisco

许可证

尚未选择许可证。

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Read-only MCP server that allows AI assistants to query and monitor KVM Fleet devices, audit logs, and console sessions through the official REST API.
    5
    19
    1
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    A read-only MCP server for querying Kismet Wireless systems, enabling AI agents to retrieve network status, datasources, devices, and alerts via REST API.
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    A read-only MCP server for interacting with Nautobot, enabling network source of truth queries, device management, IPAM, and data quality audits via tools and prompts.
    MIT
  • A
    license
    B
    quality
    B
    maintenance
    Read-only MCP server for Snipe-IT v7 REST API, providing search and retrieval of assets, users, models, categories, and locations without modification.
    16
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AngelN-Halo/mcp-netdisco'

If you have feedback or need assistance with the MCP directory API, please join our Discord server