You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `nat mcp serve` command (equivalent to `nat start mcp`) starts a Model Context Protocol (MCP) server that exposes workflow functions as MCP tools. This allows other applications that support the MCP protocol to use your NeMo Agent toolkit functions directly. MCP is an open protocol developed by Anthropic that standardizes how applications provide context to LLMs. The MCP front-end is especially useful for integrating NeMo Agent toolkit workflows with MCP-compatible clients.
163
+
The `nat mcp` command group provides utilities for both serving workflows as MCP servers and interacting with MCP servers as a client.
164
164
165
-
The MCP front-end can be configured using the following options:
165
+
### Client
166
+
167
+
The `nat mcp client` command group provides utilities for interacting with MCP servers directly from the command line. These commands are useful for discovering available tools and testing MCP server connectivity before configuring your workflow.
168
+
169
+
The `nat mcp client --help` utility provides an overview of the available commands:
170
+
171
+
```console
172
+
$ nat mcp client --help
173
+
Usage: nat mcp client [OPTIONS] COMMAND [ARGS]...
174
+
175
+
MCP client commands.
176
+
177
+
Options:
178
+
--help Show this message and exit.
179
+
180
+
Commands:
181
+
ping Ping an MCP server to check if it's responsive.
182
+
tool Inspect and call MCP tools.
183
+
```
184
+
185
+
#### Ping
186
+
187
+
```console
188
+
$ nat mcp client ping --help
189
+
Usage: nat mcp client ping [OPTIONS]
190
+
191
+
Ping an MCP server to check if it's responsive.
192
+
193
+
Options:
194
+
--url TEXT MCP server URL (e.g.
195
+
http://localhost:8080/mcp for streamable-
196
+
http, http://localhost:8080/sse for sse)
197
+
[default: http://localhost:9901/mcp]
198
+
--transport [sse|stdio|streamable-http]
199
+
Type of client to use for ping [default:
200
+
streamable-http]
201
+
--command TEXT For stdio: The command to run (e.g. mcp-
202
+
server)
203
+
--args TEXT For stdio: Additional arguments for the
204
+
command (space-separated)
205
+
--env TEXT For stdio: Environment variables in
206
+
KEY=VALUE format (space-separated)
207
+
--timeout INTEGER Timeout in seconds for ping request
208
+
[default: 60]
209
+
--json-output Output ping result in JSON format
210
+
--auth-redirect-uri TEXT OAuth2 redirect URI for authentication
211
+
(streamable-http only, not with --direct)
212
+
--auth-user-id TEXT User ID for authentication (streamable-http
213
+
only, not with --direct)
214
+
--auth-scopes TEXT OAuth2 scopes (comma-separated, streamable-
--command TEXT For stdio: The command to run (e.g. mcp-
295
+
server)
296
+
--args TEXT For stdio: Additional arguments for the
297
+
command (space-separated)
298
+
--env TEXT For stdio: Environment variables in
299
+
KEY=VALUE format (space-separated)
300
+
--json-args TEXT Pass tool args as a JSON object string
301
+
--auth Enable OAuth2 authentication with default
302
+
settings (streamable-http only, not with
303
+
--direct)
304
+
--auth-redirect-uri TEXT OAuth2 redirect URI for authentication
305
+
(streamable-http only, not with --direct)
306
+
--auth-user-id TEXT User ID for authentication (streamable-http
307
+
only, not with --direct)
308
+
--auth-scopes TEXT OAuth2 scopes (comma-separated, streamable-
309
+
http only, not with --direct)
310
+
--help Show this message and exit.
311
+
```
312
+
313
+
### Serve
314
+
315
+
The `nat mcp serve` command (equivalent to `nat start mcp`) starts a Model Context Protocol (MCP) server that exposes workflow functions as MCP tools. This allows other applications that support the MCP protocol to use your NeMo Agent toolkit functions directly. MCP is an open protocol developed by Anthropic that standardizes how applications provide context to LLMs.
316
+
317
+
The `nat mcp serve --help` utility provides a brief description of each option:
166
318
167
319
```console
168
320
$ nat mcp serve --help
169
321
Usage: nat mcp serve [OPTIONS]
170
322
323
+
Run a NAT workflow using the mcp front end.
324
+
171
325
Options:
172
-
--config_file FILE A JSON/YAML file that sets the parameters for the
173
-
workflow. [required]
174
-
--override <TEXT TEXT>... Override config values using dot notation (e.g.,
175
-
--override llms.nim_llm.temperature 0.7)
176
-
--name TEXT Name of the MCP server
177
-
--host TEXT Host to bind the server to
178
-
--port INTEGER Port to bind the server to
179
-
--debug BOOLEAN Enable debug mode
180
-
--log_level TEXT Log level for the MCP server
181
-
--tool_names TEXT Comma-separated list of tool names to expose.
182
-
If not provided, all functions will be exposed.
183
-
--help Show this message and exit.
326
+
--config_file FILE A JSON/YAML file that sets the parameters
327
+
for the workflow. [required]
328
+
--override <TEXT TEXT>... Override config values using dot notation
329
+
(e.g., --override llms.nim_llm.temperature
330
+
0.7)
331
+
--name TEXT Name of the MCP server (default: NeMo Agent
332
+
Toolkit MCP)
333
+
--host TEXT Host to bind the server to (default:
334
+
localhost)
335
+
--port INTEGER Port to bind the server to (default: 9901)
0 commit comments