⚠️ Development Version — You are viewing documentation for a development version (dev_feat.v3.x.jrpc). This version may be unstable or incomplete. — View stable version (v3.x)

Synopsis

fcli util rpc-server start [--async-bg-threads=<bgThreads>] [--import=<importFiles>[,<importFiles>…​]]…​ [[-h] [--env-prefix=<prefix>] [--log-file=<logFile>] [--log-level=<logLevel>] [--log-mask=<level>] [--debug]]

Description

The fcli JSON-RPC server provides a simple JSON-RPC 2.0 interface for IDE plugins and other tools to interact with Fortify products through fcli. Unlike the MCP server which is designed for LLM integration, the RPC server exposes a smaller set of general-purpose methods suitable for programmatic access from IDE plugins.

The server reads JSON-RPC requests from stdin and writes responses to stdout, one JSON object per line. Sessions must be established in advance using the standard fcli session login commands.

Available RPC methods:

EXECUTION METHODS:
  • fcli.execute: Execute an fcli command asynchronously Parameters:

  • command (string, required): The fcli command to execute (e.g., "ssc appversion list")

  • collectRecords (boolean, optional): Collect structured records instead of stdout (default: false) Response: jobId, status="started", jobType ("records" or "stdout")

  • fn.call: Call an imported action function (if --import was used) Parameters: name (string, required), plus function-specific args Response: jobId, status="started", jobType

  • fn.list: List available imported functions Parameters: none

    JOB METHODS:
  • job.getPage: Retrieve a page of records/results from an async job Parameters:

  • jobId (string, required): Job ID from fcli.execute or fn.call

  • offset (integer, optional): Start offset (default: 0)

  • limit (integer, optional): Max records per page (default: 100)

  • job.cancel: Cancel an in-progress async job Parameters:

  • jobId (string, required): Job ID to cancel

  • job.list: List all tracked jobs with their status Parameters: none

    INFO METHODS:
  • fcli.listCommands: List available fcli commands with optional filtering Parameters:

  • module (string, optional): Filter by module (e.g., "ssc", "fod")

  • runnableOnly (boolean, optional): If true, only return runnable (leaf) commands

  • includeHidden (boolean, optional): If true, include hidden commands

  • fcli.getCommandDetails: Get detailed usage information for a specific fcli command Parameters:

  • command (string, required): The fcli command to get details for (e.g., "ssc appversion list")

  • fcli.buildInfo: Get fcli version and build information Parameters: none

  • rpc.listMethods: List available RPC methods Parameters: none

PUSH NOTIFICATIONS (server-to-client, no id field):

  • job.started: Sent when a job begins execution (params: jobId, description)

  • job.records: Batch of records produced by a running job (params: jobId, records, count)

  • job.progress: Progress message from a running job (params: jobId, message)

  • job.complete: Sent when a job finishes (params: jobId, exitCode, stderr?, stdout?)

Typical workflow: 1. Establish fcli sessions using standard fcli session login commands through fcli.execute 2. Execute commands via fcli.execute (always async, returns jobId) 3. Poll job.getPage for results, or listen for push notifications (job.started, job.records, job.complete)

Example JSON-RPC requests:

{"jsonrpc":"2.0","method":"fcli.execute","params":{"command":"ssc appversion list","collectRecords":true},"id":1} {"jsonrpc":"2.0","method":"job.getPage","params":{"jobId":"<jobId from above>","offset":0,"limit":100},"id":2} {"jsonrpc":"2.0","method":"job.list","id":3} {"jsonrpc":"2.0","method":"fcli.getCommandDetails","params":{"command":"ssc appversion list"},"id":4} {"jsonrpc":"2.0","method":"rpc.listMethods","id":5}

Options

--async-bg-threads=<bgThreads>

Number of background threads for running async jobs. Increase if IDE clients submit many concurrent async commands. Default: 4.

--import=<importFiles>[,<importFiles>…​]

Action YAML files to import. Exported functions are accessible via the fn.call and fn.list RPC methods.

--debug

Enable collection of debug logs.

--env-prefix=<prefix>

Prefix for resolving default option values. Default value: FCLI_DEFAULT.

-h, --help

Use 'fcli [command] -h' to display help for fcli (sub-)commands.

--log-file=<logFile>

Write log output to file. Default: ./fcli.log if logging is enabled.

--log-level=<logLevel>

Set logging level: TRACE, DEBUG, INFO, WARN, ERROR, NONE.

--log-mask=<level>

Log mask level: high, medium, low, none. Default: medium. Masking is done on a best-effort basis; no guarantee that all sensitive data will be masked.