Testing the tool catalog ensures that the MCP client can list available tools and invoke them correctly. This step validates authentication and tool functionality before moving to production.

List tool names

Run this command to display all available tools for the specified profile:
./mcpgen client <profile-name>

Invoke tool

Use this command to invoke a specific tool and pass arguments. The following example calls the listProducts tool with a limit of two items:
./mcpgen client <profile-name> --tool listProducts --args '{"limit":2}'
Where,
  • --tool listProducts—Specifies the tool to invoke.
  • --args '{"limit":2}'—Provides arguments in JSON format for the tool.

Use different service account tokens

Service account tokens control access to MCP tools based on assigned scopes. If you have multiple tokens with different permissions, you can specify which token to use when listing tools or invoking them. This step allows you to test access levels and validate role-based functionality. If multiple service account tokens exist with different scopes, select a specific token using --sa-token option with the mcpgen client command:
Action Command
List tools with regular access ./mcpgen client <profile_name> --sa-token regular
List tools with admin access ./mcpgen client <profile_name> --sa-token admin
Invoke admin-only tool ./mcpgen client <profile_name> --sa-token admin --tool getSupportTickets --args '{"limit":5}'

List available tokens for a profile

To view all service account tokens associated with a profile, use the following command:
./mcpgen sa-tokens <profile_name>

For more information, see Client.