Skip to content

Commit 66f6ad8

Browse files
committed
Add OpenClaw example
1 parent 031c527 commit 66f6ad8

1 file changed

Lines changed: 68 additions & 0 deletions

File tree

Examples/OpenClaw.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Use the NetApp AIDE MCP Server with OpenClaw
2+
3+
[OpenClaw](https://openclaw.ai) is an AI assistant gateway that connects to MCP servers. This guide shows how to register the NetApp AIDE MCP server with OpenClaw so you can search NetApp documentation directly from the OpenClaw chat interface.
4+
5+
## Ubuntu Desktop Quickstart
6+
7+
> [!NOTE]
8+
> These steps have been validated on Ubuntu Desktop. They may work on other Linux desktop environments, but that has not been verified.
9+
10+
On Ubuntu Desktop, the MCP server needs access to your graphical browser to complete the PKCE OAuth flow. Because OpenClaw launches the server as a background process, it won't automatically inherit your desktop session's environment variables. The steps below create a small wrapper script that injects those variables before starting the server.
11+
12+
1. Create your `.netapp` file as described in the [main README](../README.md). Be sure to use PKCE authentication.
13+
14+
2. Register your browser as the default handler for HTTP and HTTPS so that Python's `webbrowser` module opens the correct browser during authentication.
15+
16+
**Firefox:**
17+
```sh
18+
xdg-mime default firefox.desktop x-scheme-handler/http
19+
xdg-mime default firefox.desktop x-scheme-handler/https
20+
```
21+
22+
**Google Chrome:**
23+
```sh
24+
xdg-mime default google-chrome.desktop x-scheme-handler/http
25+
xdg-mime default google-chrome.desktop x-scheme-handler/https
26+
```
27+
28+
3. Create a helper script for starting the MCP server. The script sets the environment variables needed for the browser-based OAuth flow to work correctly inside an Ubuntu desktop session.
29+
30+
```sh
31+
cat > ~/run-netapp-mcp.sh << 'EOF'
32+
#!/bin/bash
33+
34+
# Force Python to use your graphical browser instead of a hidden text browser.
35+
# Change "firefox" to "google-chrome" if that is your default browser.
36+
export BROWSER=firefox
37+
38+
# Inject the Wayland, X11, and DBus variables required for Ubuntu.
39+
export XDG_RUNTIME_DIR=/run/user/$(id -u)
40+
export WAYLAND_DISPLAY=wayland-0
41+
export DISPLAY=:0
42+
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus
43+
44+
# Start the MCP server.
45+
# Example: exec /home/ailab/.local/bin/uvx -q --from netapp-aide-mcp server 2>> /tmp/mcp_browser_error.log
46+
exec <path_to_your_uvx>/uvx -q --from netapp-aide-mcp server 2>> /tmp/mcp_browser_error.log
47+
EOF
48+
```
49+
50+
3. Make the script executable.
51+
52+
```sh
53+
chmod +x ~/run-netapp-mcp.sh
54+
```
55+
56+
4. Add the MCP server to OpenClaw.
57+
58+
```sh
59+
openclaw mcp set netapp-aide '{"command": "'$HOME'/run-netapp-mcp.sh", "args": []}'
60+
```
61+
62+
5. Restart the OpenClaw gateway.
63+
64+
```sh
65+
openclaw gateway restart
66+
```
67+
68+
6. Prompt OpenClaw to search NetApp AIDE. For example: *"Search NetApp AIDE: \<your query\>"*. OpenClaw will invoke the MCP server's search tool, which opens a browser window to complete authentication before returning results.

0 commit comments

Comments
 (0)