system_info
System Info
Identity, RouterOS version, model, uptime, CPU and memory for the device.
无需输入参数。

io.github.StefanKnol由 GitHub 账号 StefanKnol 发布v0.3.1更新于 Nov 13, 2026
MikroTik RouterOS over the binary API, addressing rules by real .id not list position.
发布方自己的服务:370.ai — AI Gateway: 100+ Chat Models, Image & Speech Generation
通过二进制 API 管理单台 MikroTik RouterOS 设备的 MCP 服务器,可查看和修改接口、IP、防火墙、NAT、DHCP、DNS、路由与日志。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
参照 仓库 中的启动说明。
mcp-name: io.github.StefanKnol/mikrotik-mcp
An MCP server for MikroTik RouterOS, over the binary API rather than by driving the CLI over SSH.
That distinction is the whole point. The CLI prints positional numbers, which
are not a rule's identity. A server that lists rules by position and then writes
by position either fails outright — where .id=3 matches nothing, so every
write reports "not found" for rules that plainly exist — or, worse, succeeds
against a different rule once the order has shifted. On a firewall that means
deleting the wrong rule.
The binary API returns the real .id (*7, *1f) on every read. So:
id, and every write takes one back;position, which is display-only and refused for
writes, with an error that explains why;remove_firewall_rule takes an optional confirm_comment and returns the
rule it deleted.Configure through the environment — ps would show a password passed as a flag:
In an MCP client's config:
The api policy is not optional, and its absence produces a login error
identical to a wrong password — so if credentials look right and login still
fails, check the group first.
Set MIKROTIK_TLS_FINGERPRINT if you can. MikroTik's API-SSL certificate is
self-signed, so ordinary CA validation cannot succeed against a stock device;
pinning is what makes the connection authenticated rather than merely encrypted.
34 of them, covering system info, interfaces, IP addressing, firewall filter
(IPv4 and IPv6), firewall address lists, NAT, DHCP leases, DNS, routes and logs
— plus ros_list, which reads any RouterOS path and so covers everything
without a dedicated tool.
There is deliberately no generic write escape hatch.
Three things worth knowing before the first call:
id (*7), never a position. Both appear in every list
result. position is where a rule currently sits in evaluation order; it
shifts whenever anything is added, removed or moved, and it is counted across
the whole table rather than within the chain you filtered to. Passing one to
a write is rejected rather than guessed at.family
and default to ipv4, so a device can read as locked down while its IPv6
table is empty and therefore accepting everything. Listing IPv4 reports the
IPv6 rule count for exactly this reason.list_address_list_entries for a count_only first: a populated block list
can hold tens of thousands.mcphub puts MCP servers behind one
sign-in and grants them out per account. One router is one backend, at its own
/mcp/<slug>, registered in a client as its own connector.
From the registry — the better default. Add from registry, search for
mikrotik-mcp, and the hub builds the settings form from server.json and
launches uvx mikrotik-mcp when you enable the backend. It runs in its own
process and cannot read credentials the hub holds for anything else. Backends
added this way start disabled: open it, look at the tool list, then enable.
As a plugin — install this package into the hub's own environment and
mikrotik appears as a backend kind, with typed fields and a Test button that
reports the router's identity and RouterOS version. Nicer to configure, but an
in-process plugin can read every credential the hub holds. Use it when you
build your own hub image.
Either route asks for the same things. As environment variables:
No data directory: everything this server reads and writes lives on the router, so there is no local state to keep. Leave Give this server a data directory unticked.
The hub reads readOnlyHint and destructiveHint from each tool and enforces
the grant's level from those alone — a tool above the level is left out of
tools/list and refused if called anyway.
viewer — connectivity_check, get_dns_settings, get_firewall_rule,
get_logs, get_nat_rule, list_address_list_entries, list_address_lists,
list_dhcp_leases, list_dns_adlist, list_dns_static, list_firewall_rules,
list_interfaces, list_ip_addresses, list_nat_rules, list_routes,
ros_list, system_info.
user adds add_address_list_entry, add_dns_static, add_firewall_rule,
add_nat_rule, make_lease_static, set_firewall_rule_enabled,
set_nat_rule_enabled. Each of these writes, and none of them takes anything
away: adding a rule is a write, not a destruction, and disabling one keeps the
rule, its comment and its position so that re-enabling restores exactly what
was there. Disabling is the reversible way to find out whether a rule is
responsible for something, so it sits here rather than behind admin — the
alternative would leave a user with no safe way to test at all.
admin adds the destructive ten:
A test pins every one of these assignments by name, so a tool added later fails the suite until someone decides which level it belongs to.
server.json is the manifest for the official MCP registry,
validated against the published schema. It declares the uvx mikrotik-mcp
command and every MIKROTIK_* variable, marking which are required and which
are secret — so a client that browses the registry can generate a correct
settings form without knowing anything about this server.
Publishing has an order to it, because the registry verifies that whoever publishes an entry actually owns the package it points at.
1. The package must already be on PyPI. The registry fetches
pypi.org/pypi/mikrotik-mcp/<version>/json and refuses an entry whose package
does not exist. Tag a release and let CI publish it:
That needs a PyPI Trusted Publisher first, and because this project does not exist on PyPI yet it has to be a pending publisher — the per-project Publishing tab only appears once a project exists, which is the chicken-and-egg this page solves:
pypi.org → Account settings → Publishing → Add a new pending publisher
The environment name matters: the publish job declares environment: pypi, and
PyPI rejects the upload if they disagree.
2. The README must carry the ownership token. The registry looks for
mcp-name: io.github.StefanKnol/mikrotik-mcp in the PyPI description, which is
this file — it is at the top, on its own line. That is what proves the person
publishing the registry entry controls the PyPI package.
3. The registry entry publishes itself. The registry job in ci.yml
runs after the PyPI upload on the same tag, authenticating with
mcp-publisher login github-oidc. GitHub signs a short-lived OIDC token, the
registry verifies it and grants the io.github.StefanKnol/* namespace from the
repository owner. There is no secret to store and no device-flow login to sit
through on each release.
It waits for PyPI to actually serve the new version first. The registry fetches
pypi.org/pypi/mikrotik-mcp/<version>/json and refuses an entry whose package
it cannot see, and that endpoint lags the upload by some seconds — long enough
that publishing straight afterwards races it.
Re-running it is safe: a version already in the registry is the outcome the job exists to produce, so it reports that and passes rather than failing on the registry's duplicate refusal.
To publish by hand — recovering a failed run, or a version released before this job existed:
login github opens the device flow and proves you are StefanKnol, which
authorises the same namespace the OIDC path gets without asking.
The version appears in four places — pyproject.toml, __version__,
server.json, and again inside that file's packages entry. Rather than
edit them by hand:
It sets all four, verifies them, commits and tags. The registry treats each
version as its own row and checks PyPI has the package at exactly that
version, so the nested packages[].version matters as much as the top-level
one — and it is the one that gets missed, because the manifest still validates
without it. A test enforces that they agree.
MIT
来源:README.md,提交 10d61a8
System Info
Identity, RouterOS version, model, uptime, CPU and memory for the device.
无需输入参数。
Read Any RouterOS Path
Read any RouterOS configuration path. The escape hatch for everything without a dedicated tool. Read-only: it lists items at a path and cannot modify the device.
path必填List Interfaces
List every interface with its type, MAC, MTU and running state.
type_filterrunning_onlyEnable/Disable Interface
Bring an interface up or down. Disabling the interface you are reaching the router through will cut this connection, and nothing here can undo that remotely.
enabled必填interface_id必填List IP Addresses
List configured IPv4 addresses and the interfaces they sit on.
无需输入参数。
List Firewall Rules
List firewall filter rules in evaluation order. Each rule carries both an `id` and a `position`. Use `id` for any later change: `position` is only where the rule currently sits, and it shifts as soon as anything is added, removed or moved. `position` counts every rule in the table, so a result filtered to one chain is numbered by its place among *all* rules — the first three forward rules might come back as 29, 30, 31. That is the right number for reasoning about evaluation order and the wrong number for anything else.
chainfamilyverboseinclude_dynamicGet Firewall Rule
Every field of one firewall rule, including counters.
familyrule_id必填Add Firewall Rule
Add a firewall filter rule. Order decides everything in a RouterOS firewall: the first matching rule wins. A new rule appended after a final `drop` is dead code, so set `place_before` unless the end of the chain is genuinely what you want.
logpsdportchain必填limitaction必填familycommentdisableddst_portprotocolsrc_port另有 21 个Update Firewall Rule
Change fields on an existing firewall rule. Only the arguments you pass are modified; omitted ones are left alone. To remove a field rather than change it, name it in `unset`. Returns the rule before and after, so the change can be checked rather than taken on trust.
logpsdportchainlimitunsetactionfamilycommentrule_id必填dst_portprotocol另有 21 个Enable/Disable Firewall Rule
Enable or disable one firewall rule, leaving its position intact. Disabling is the reversible way to test whether a rule is responsible for something — prefer it over removing the rule.
familyenabled必填rule_id必填Remove Firewall Rule
Delete a firewall rule permanently. There is no undo. Disabling a rule (`set_firewall_rule_enabled`) is almost always the better first move, and the returned copy of the deleted rule is the only record you will have afterwards.
familyrule_id必填confirm_commentMove Firewall Rule
Reorder a firewall rule relative to another rule. Both ends are given by `id` rather than position, so the move means the same thing even if the list shifted since you last read it. The resulting order is read back and checked against what was asked for. If the rule did not land where it should have, this fails and says so rather than reporting a move that did not happen.
familyrule_id必填before_rule_idList Address Lists
The names of every firewall address list, with entry counts. Start here rather than with `list_address_list_entries`: a firewall built on named lists is unreadable until you know which lists exist, and the dynamic entries that rules create with a timeout never appear in a configuration export. Reads one small row per entry to do the counting, so it is proportional to the total number of entries across all lists.
familyList Address List Entries
List firewall address list entries. `count_only` first, then narrow with `list_name` or `address`. A dynamically populated block list can hold tens of thousands of entries, and asking for all of them is rarely what you want.
limitfamilyaddresslist_namecount_onlyinclude_dynamicAdd Address List Entry
Add one entry to a firewall address list. Adding to a list no rule references has no effect; check `list_address_lists` for the name, or search the rules for `src_address_list`.
familyaddress必填commenttimeoutlist_name必填Remove Address List Entry
Remove one entry from a firewall address list. A dynamic entry removed here comes back the moment the rule that created it matches again; change the rule if that is not what you want.
familyentry_id必填confirm_addressList NAT Rules
List NAT rules, including port forwards, in evaluation order. NAT is an ordered table with first-match-wins semantics, exactly like the filter chains, so `position` and `id` mean the same things here — `id` for writes, `position` for reading order, counted across both chains rather than within one.
chainverboseinclude_dynamicGet NAT Rule
Every field of one NAT rule, including counters.
rule_id必填Add NAT Rule
Add a NAT rule, such as a port forward. A port forward also needs the forward chain to permit the traffic; check `list_firewall_rules(chain='forward')` for a rule accepting `connection_nat_state='dstnat'` before concluding it is broken.
logportchain必填action必填commentdisableddst_portprotocolsrc_portto_portslog_prefixdst_address另有 12 个Update NAT Rule
Change fields on an existing NAT rule. Only the arguments you pass are modified; omitted ones are left alone. Editing in place keeps the rule's id and its position — removing and re-adding a port forward loses both, and the replacement lands at the end of the table.
logportchainunsetactioncommentrule_id必填dst_portprotocolsrc_portto_portslog_prefix另有 12 个Move NAT Rule
Reorder a NAT rule relative to another rule. NAT is first-match-wins within a chain, so a broad `masquerade` ahead of a specific `src-nat` means the specific one never runs. Both ends are given by `id`, and the resulting order is read back and checked.
rule_id必填before_rule_idEnable/Disable NAT Rule
Enable or disable one NAT rule, leaving its position intact. Disabling is the reversible way to test whether a port forward is responsible for something — prefer it over removing the rule.
enabled必填rule_id必填Remove NAT Rule
Delete a NAT rule permanently. There is no undo, and the returned copy is the only record you will have afterwards. To change a rule rather than replace it, use `update_nat_rule` — it keeps the id and the position.
rule_id必填confirm_commentList DHCP Leases
List DHCP leases — effectively the inventory of what is on the network.
searchactive_onlyMake DHCP Lease Static
Pin a dynamic DHCP lease so the device keeps its address.
commentlease_id必填List Static DNS
List static DNS entries and regex overrides.
无需输入参数。
Add Static DNS Entry
Add a static DNS entry.
ttlnamecnameregexpaddresscommentmatch_subdomainUpdate Static DNS Entry
Change fields on an existing static DNS entry. Only the arguments you pass are modified. Repointing a name at a new address belongs here rather than in remove-then-add: editing keeps the entry's id, so anything holding a reference to it stays valid.
ttlnamecnameregexpaddresscommentdisabledentry_id必填match_subdomainRemove Static DNS Entry
Delete a static DNS entry.
entry_id必填Get DNS Settings
Resolver configuration: upstream servers, cache, and who may query it. `allow-remote-requests` is the field to look at first. With it set, the router answers DNS for anything that can reach port 53, so whether the firewall restricts that reaching is the difference between a LAN resolver and an open one that can be used to amplify traffic at someone else.
无需输入参数。
List DNS Adlists
Blocklist files the DNS server loads (RouterOS 7.15 and later). Reports a `match-count` per list, which is how you tell a list that is doing work from one that failed to download.
无需输入参数。
List Routes
List the IPv4 routing table.
active_onlyGet Logs
Read the device log, most recent last.
limittopicsearchConnectivity Check
Confirm the hub can reach and authenticate to this device.
无需输入参数。
已满足适用检查项的 90%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
ai.router官方发布者
远程 AI 网关 MCP 服务器,让助手用一个 370.ai API 密钥调用 100 多个聊天模型、生成图片并把文字转为语音。
由 GitHub 账号 srigenmedia 发布
远程 MCP 服务器,将 LLM 提示路由到印度地理锁定的主权云端点,清洗印度受监管 PII,并执行 AP2 支付授权与支出上限。

由 GitHub 账号 Nimbleway 发布
WebRouter 为助手提供统一的类型化接口,跨多家服务商完成网页搜索、页面提取、问答、深度调研与浏览器会话。

由 GitHub 账号 Tradelord223 发布
远程 MCP 服务器,用于审计 Solana SPL 与 Token-2022 代币的蜜罐风险,并构建未签名的 Jito 保护兑换与退出交易。

由 GitHub 账号 stos-technologies 发布
让助手在 Base Sepolia 测试网上查找 AI 代理服务、把任务路由给卖家、下 USDC 托管或 x402 订单,并核验交付。
uvx mikrotik-mcp{ "mcpServers": { "mikrotik": { "command": "uvx", "args": ["mikrotik-mcp"], "env": { "MIKROTIK_HOST": "192.168.88.1", "MIKROTIK_USERNAME": "mcp-agent", "MIKROTIK_PASSWORD": "..." } } }}/ip service enable api-ssl/user group add name=mcp policy=api,read,write,test/user add name=mcp-agent group=mcp password=<strong-password>git tag v0.1.0 && git push --tagscurl -sL https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_linux_amd64.tar.gz | tar xz mcp-publisher./mcp-publisher login github && ./mcp-publisher publishuv run python scripts/release.py 0.2.0 --taguv sync --extra devuv run pytest