rpk ai mcp-server tools call
Invoke a tool on an MCP server through the aigw MCP proxy.
The server’s /mcp/v1/<name> endpoint is reached with the same bearer token
used by the rest of rpk ai; aigw resolves user-delegated OAuth tokens from the
vault when the MCP server is configured with --user-oauth-provider.
Arguments passed to the tool are a JSON object supplied via --args. Example:
rpk ai mcp tools call gf-servicenow-sand2 listtablerecords \.
--args '{"tableName":"incident","sysparm_limit":3}'
With --code-mode the call targets the virtual code-mode sibling endpoint
(/mcp/v1/<name>-code). That endpoint exposes search (tool catalog for the
primary) and execute (runs JavaScript in a sandbox with call_tool bound to
the primary’s tools). Example:
rpk ai mcp tools call pg-garrett execute --code-mode \.
--args '{"code":"var r = call_tool({name:\"query\", arguments:{query:\"SELECT 1\"}}); JSON.stringify(r);"}'
Global flags
| Value | Type | Description |
|---|---|---|
|
string |
Redpanda or |
|
stringArray |
Override |
|
bool |
Ignore |
|
string |
|
|
bool |
Enable verbose logging. |