A Model Context Protocol (MCP) server for managing ZeroTier networks via the ZeroTier Central API.
⚠️ Vibe Coding WarningThis is a vibe coding project - it was built with enthusiasm and minimal testing. It probably works, but it might not. Use at your own risk. Pull requests for tests and bug fixes welcome.
This MCP server provides tools to:
- Status Management: Get account status and information
- Network Management:
- List all networks
- Get network details
- Create new networks with custom configurations
- Update network settings
- Delete networks
- Member Management:
- List all members of a network
- Get member details
- Authorize/deauthorize members
- Update member configuration (IP assignments, bridge mode, etc.)
- Delete members from networks
- User Management: Get user information
- Utilities: Generate random API tokens
- Node.js 18+
- A ZeroTier account with API access
- A ZeroTier API token (generate at ZeroTier Central)
The package is published on NPM and can be run directly with npx:
npx zerotier-mcpNo installation required - npx will download and execute the package automatically.
For development, you can also build from source:
# Install dependencies
npm install
# Build the project
npm run buildSet your ZeroTier API token as an environment variable:
export ZEROTIER_TOKEN="your_api_token_here"You can generate an API token by logging into ZeroTier Central and navigating to the Account page.
npm startget_status
- Get the overall status of the ZeroTier account tied to the API token
list_networks
- Returns a list of all networks you have access to
get_network
- Get details of a specific network
- Parameters:
networkId(string, required)
create_network
- Create a new ZeroTier network
- Parameters (all optional):
name(string): Network namedescription(string): Network descriptionprivate(boolean): Whether network is private (default: true)ipAssignmentPools(array): IP pools for auto-assignmentroutes(array): Network routesv4AssignMode(object): IPv4 assignment settingsdns(object): DNS configuration
update_network
- Update an existing network configuration
- Parameters:
networkId(string, required): Network IDname(string, optional): New display name for the networkdescription(string, optional): New description for the networkprivate(boolean, optional): Change network privacy settingconfig(object, optional): Network configuration object to update (includes routes, DNS, IP pools, etc.)
delete_network
- Delete a network
- Parameters:
networkId(string, required)
list_members
- List all members of a network
- Parameters:
networkId(string, required)
get_member
- Get details of a specific network member
- Parameters:
networkId(string, required): Network IDmemberId(string, required): Member/node ID
update_member
- Update a network member (authorize, set IPs, etc.)
- Parameters:
networkId(string, required): Network IDmemberId(string, required): Member ID- Optional:
name(string): Member namedescription(string): Member descriptionauthorized(boolean): Authorization statusipAssignments(array): Assigned IP addressesnoAutoAssignIps(boolean): Exempt from auto-assignmentactiveBridge(boolean): Allow as bridge
delete_member
- Delete a member from a network
- Parameters:
networkId(string, required): Network IDmemberId(string, required): Member ID
get_user
- Get user record by ID
- Parameters:
userId(string, required)
get_random_token
- Generate a random 32-character token (useful for creating API keys)
{
"name": "create_network",
"arguments": {
"name": "My Network",
"description": "A private network for my devices",
"private": true,
"ipAssignmentPools": [
{
"ipRangeStart": "10.0.0.1",
"ipRangeEnd": "10.0.0.254"
}
],
"v4AssignMode": {
"zt": true
}
}
}{
"name": "update_member",
"arguments": {
"networkId": "8056c2e21c000001",
"memberId": "abcdef0123",
"authorized": true,
"ipAssignments": [
"10.0.0.5"
]
}
}These examples have been tested with Gemini 3 Pro model:
Prompt: "list my zerotier network members"
Response:
Here are the members of your Example network (1219ee0a41aae33b):
| Name | Node ID | IP Address | Status | Last Seen |
|----------|-------------|------------------|---------|--------------|
| MyLapTop | 1d3c71e6ea | 10.147.11.100 | Offline | ~17 days ago |
| HomeLab | a22cd2a7ba | 10.147.11.101 | Online | Just now |
Prompt: "is there any unauthorized member on my network"
Response:
All members on your networks are currently authorized.
Example (1219ee0a41aae33b):
All 9 members are authorized.
ecstatic_morse (1219ee0a41aae33c):
No members found.
To use this server with an MCP client, add it to your MCP configuration file (typically ~/.config/claude/claude_desktop_config.json for Claude Desktop):
{
"mcpServers": {
"zerotier": {
"command": "npx",
"args": ["zerotier-mcp"],
"env": {
"ZEROTIER_TOKEN": "your_api_token_here"
}
}
}
}This server is based on the ZeroTier Central API v1. For detailed information about the API endpoints and data structures, refer to the official documentation.
- Free users: 20 requests per second
- Paid users: 100 requests per second
MIT
This repository uses GitHub Actions for automated publishing to NPM. When you push a version tag, the workflow will automatically:
- Build the project
- Publish to NPM using the stored NPM_TOKEN secret
-
Generate an NPM access token:
- Go to npmjs.com
- Create a new Automation token
- Copy the token
-
Add to GitHub Secrets:
- Go to your repository Settings → Secrets and variables → Actions
- Click "New repository secret"
- Name:
NPM_TOKEN - Value: Paste your NPM access token
To publish a new version:
# Update version in package.json
npm version patch # or minor, or major
# Commit the change
git commit -am "Bump version to X.Y.Z"
git push
# Create and push a tag
git tag vX.Y.Z
git push origin vX.Y.ZThe GitHub Action will automatically trigger on the tag push and publish to NPM.
# Patch release (1.0.0 → 1.0.1)
npm version patch
git add package.json package-lock.json
git commit -m "Bump version to 1.0.1"
git push
git tag v1.0.1
git push origin v1.0.1
# Minor release (1.0.1 → 1.1.0)
npm version minor
git add package.json package-lock.json
git commit -m "Bump version to 1.1.0"
git push
git tag v1.1.0
git push origin v1.1.0
# Major release (1.1.0 → 2.0.0)
npm version major
git add package.json package-lock.json
git commit -m "Bump version to 2.0.0"
git push
git tag v2.0.0
git push origin v2.0.0