Skip to content

Instructions Command ​

Show CLI-mode instructions for AI agents using a running 1MCP serve instance.

Synopsis ​

bash
npx -y @1mcp/agent instructions [options]

Description ​

The instructions command is the entrypoint for CLI-mode agent workflows. It prints:

  • A fixed playbook telling the agent to use inspect before run
  • A server summary section
  • A server details section
  • Per-server instruction blocks when the server provides them

Use this command first when an agent or terminal session needs current guidance from the running 1MCP instance.

In practice, instructions is what replaces a large direct-MCP starting surface in the agent loop. Instead of expecting the agent to carry every available tool and schema up front, 1MCP gives it a compact playbook plus the current inventory, then tells it to narrow further with inspect.

Output Structure ​

The output is designed to be agent-readable and includes:

  • === PLAYBOOK === - The required CLI workflow
  • === SERVER SUMMARY === - One compact record per server
  • === SERVER DETAILS === - Detailed records including instructions or availability notes

Each server entry includes metadata such as:

  • Server name
  • Server type
  • Connection status
  • Availability
  • Tool count
  • Whether instructions are available

Options ​

  • --url, -u <url> - Override auto-detected 1MCP server URL
  • --context <name> - Use a named Runtime Target Context and its saved bearer token, if any
  • --preset, -p <name> - Use a preset when querying the running server
  • --tag-filter, -f <expression> - Apply an advanced tag filter expression
  • --tags <tag> - Apply simple comma-separated tags

Examples ​

Show the Full CLI Playbook ​

bash
npx -y @1mcp/agent instructions

Show Instructions for a Filtered Server Set ​

bash
npx -y @1mcp/agent instructions --tags backend

Use a Saved Preset ​

bash
npx -y @1mcp/agent instructions --preset development

Use a Runtime Target Context ​

bash
1mcp instructions --context prod

After reading instructions, continue with:

bash
npx -y @1mcp/agent inspect <server>
npx -y @1mcp/agent inspect <server>/<tool>
npx -y @1mcp/agent run <server>/<tool> --args '<json>'

If authentication is required, the playbook directs the user or agent to retry with:

bash
1mcp auth login --context <name> --token <token>

See Also ​

Released under the Apache 2.0 License.