Integrations
Four first-class ways to talk to the server: an AI desktop client (Claude Desktop), the Claude Code command line, an interactive testing harness (MCP Inspector), and a REST shim (MCPO) for anything that doesn't speak MCP natively.
Claude Desktop
Native MCP support. Drop a JSON snippet into the config file, restart, and the tools appear in the conversation.
Claude Code
One claude mcp add command registers the server for the CLI, with credentials from flags, environment variables or an SSH key.
MCP Inspector
Browser-based tool catalog and ad-hoc invoker. Best way to learn the API without a model in the loop.
MCPO (REST shim)
Exposes every tool as a REST endpoint with OpenAPI docs. Use for ChatGPT actions, n8n, curl scripts.
Claude Desktop
Claude Desktop reads its MCP server list from
claude_desktop_config.json —
~/Library/Application Support/Claude/ on macOS, and
%APPDATA%\Claude\ on Windows. Add the server, restart, and Claude will
discover the tools on its next session.
{
"mcpServers": {
"mikrotik": {
"command": "uvx",
"args": [
"mcp-server-mikrotik",
"--host", "<HOST>",
"--username", "<USERNAME>",
"--password", "<PASSWORD>",
"--port", "22"
]
}
}
}
admin for day-to-day operation.
Verifying the connection
After restarting Claude Desktop, look for the connector indicator in the prompt box. A first easy test:
- Ask: "List my VLAN interfaces."
- Claude should call
mikrotik_list_vlan_interfaceswith empty args and surface the JSON result. - If the call fails with a connection error, double-check
--host, the SSH user's policies, and that/ip sshis allowed on the device.
Claude Code
Claude Code registers MCP servers with claude mcp add. The server runs over stdio,
launched on demand through uvx, so there is nothing to install first beyond
uv.
Quick setup
$ claude mcp add --transport stdio mikrotik \ -- uvx mcp-server-mikrotik \ --host <HOST> --username <USERNAME> --password <PASSWORD>
Setup with environment variables (recommended)
Keeps credentials out of the command line:
$ claude mcp add --transport stdio mikrotik \ --env MIKROTIK_HOST=192.168.88.1 \ --env MIKROTIK_USERNAME=admin \ --env MIKROTIK_PASSWORD=your_password \ -- uvx mcp-server-mikrotik
Setup with an SSH key
Generate a dedicated key, register its public half on the router, then point the server at the private key.
$ ssh-keygen -t ed25519 -f ~/.ssh/mcp-server-mikrotik -N "" -C "mcp-server-mikrotik"
# Upload the key file $ scp ~/.ssh/mcp-server-mikrotik.pub [email protected]:/ # Import it on the router $ ssh [email protected] "/user ssh-keys import public-key-file=mcp-server-mikrotik.pub user=admin"
$ claude mcp add --transport stdio mikrotik \ -- uvx mcp-server-mikrotik \ --host 192.168.88.1 --username admin --key-filename ~/.ssh/mcp-server-mikrotik
Verify and manage
Inside Claude Code, run /mcp to check that the server is connected and all tools are listed.
The registered server is managed with the usual subcommands:
$ claude mcp list # list all configured servers $ claude mcp get mikrotik # show server details $ claude mcp remove mikrotik # remove the server
MCP Inspector
The Inspector is the official debugging tool for MCP servers. It launches a server, connects to it, and gives you a browser UI to browse the tool catalog and invoke them by hand. No LLM involved — pure introspection.
Quick one-liner
$ npx @modelcontextprotocol/inspector \ uvx mcp-server-mikrotik \ --host <HOST> \ --username <USERNAME> \ --password <PASSWORD> \ --port 22
Against an mcp-config.json
If you've already prepared a config file (recommended for MCPO too), install the inspector globally and point it at the file:
$ npm install -g @modelcontextprotocol/inspector $ cp mcp-config.json.example mcp-config.json $ nano mcp-config.json # edit credentials $ mcp-inspector --config mcp-config.json --server mikrotik-mcp-server
Open the URL it prints. The left pane lists every tool; clicking one opens a form for its arguments and a "Call" button. The response JSON appears beneath. Excellent for learning the schema before you wire a real client.
MCPO — REST API
MCPO ("MCP-to-OpenAPI") wraps any MCP server in a FastAPI shell. Each tool becomes a POST endpoint,
and you get auto-generated OpenAPI docs at /docs. Use this for:
- ChatGPT custom actions (which expect OpenAPI URLs).
- n8n / Make / Zapier-style automation.
curlscripts and CI jobs.
uv package manager
(recommended) or pip.
Install
# Using uvx (no installation needed) $ uvx mcpo --help # Or using pip $ pip install mcpo $ mcpo --help
Config file
Create mcp-config.json in your project directory. Adjust the connection parameters
(host, username, password, port) to match your setup:
{
"mcpServers": {
"mikrotik-mcp-server": {
"command": "uvx",
"args": [
"mcp-server-mikrotik",
"--password", "admin",
"--host", "192.168.88.1",
"--port", "22",
"--username", "admin"
],
"env": {}
}
}
}
Installed mcp-server-mikrotik with pip instead of uv? Launch it as a module in the config:
{
"mcpServers": {
"mikrotik-mcp-server": {
"command": "python",
"args": [
"-m", "mcp_mikrotik",
"--password", "admin",
"--host", "192.168.88.1",
"--port", "22",
"--username", "admin"
],
"env": {}
}
}
}
Run the server
# With API key authentication $ uvx mcpo --port 8000 \ --api-key "your-secret-key" \ --config ./mcp-config.json # Or without auth (not recommended for production) $ uvx mcpo --port 8000 --config ./mcp-config.json # Using pip-installed mcpo $ mcpo --port 8000 \ --api-key "your-secret-key" \ --config ./mcp-config.json
You'll see two URLs in the startup log:
Calling a tool
Each tool is exposed at /<server-name>/<tool-name>. POST a JSON body containing the
tool's arguments.
$ curl -X POST http://localhost:8000/mikrotik-mcp-server/mikrotik_list_ip_addresses \ -H "Authorization: Bearer your-secret-key" \ -H "Content-Type: application/json" \ -d '{}'
/docs auto-generates a "Try it out" form for every tool — much faster
than handcrafting curl commands when you're exploring.