Continue Tool
Relevant source files
The following files were used as context for generating this wiki page:
The Continue Tool is a specialized component within the SuperAgent MCP server that enables the execution of the Continue CLI agent. It allows MCP-compatible clients to perform automated coding tasks, multi-step research, and system explorations by leveraging the Continue CLI in a headless mode. The tool is integrated into a unified runner architecture that supports parallel execution of multiple prompts and surfaces the results in a structured format.
Sources: README.md:1-10, CHANGELOG.md:5-15, src/server.ts:45-50
Architecture and Integration
The Continue Tool operates as an MCP tool registered on the SuperAgent server. It acts as a bridge between the Model Context Protocol (MCP) and the local Continue CLI installation. The integration requires a specific environment variable, CONTINUE_CONFIG_PATH, to point to the user's Continue configuration file (e.g., config.yaml).
Sources: README.md:46-51, src/server.ts:46-49
Request Handling Flow
When a client invokes the continue tool, the server parses the request using the ContinueInvokeSchema and passes it to the runContinueBatch function. This function manages the parallel execution of multiple inputs, each corresponding to a specific task or prompt.
Sources: src/server.ts:241-246, CHANGELOG.md:16-20
The diagram above illustrates the request flow from the MCP client through the SuperAgent server to the Continue CLI execution.
Functional Components
Execution Logic
The core logic for interacting with the Continue CLI is encapsulated in the system's runner. The tool supports "Headless Mode," which is essential for automated or background execution where no user interface is present. The execution returns a status, the agent's text response, and optionally the raw output events for debugging.
Sources: CHANGELOG.md:6-10, src/server.ts:245-255, README.md:32-35
Agent Specialization
The Continue Tool can be customized using "Specialized Agents." These are Markdown files located in ~/.superagent/agents that contain specific system prompts. When the agent parameter is provided in a tool call, the tool loads the corresponding system prompt to guide the Continue CLI's behavior.
Sources: src/agentLoader.ts:10-15, src/server.ts:50-52, README.md:38-44
Tool Configuration and Parameters
The tool accepts several arguments to control its behavior, as detailed in the table below:
| Parameter | Type | Description |
|---|---|---|
inputs[] | Array | A list of prompt objects to be executed. |
concurrency | Number | The number of tasks to run simultaneously. |
workingDirectory | String | The directory where the CLI should execute. |
agent | String | The name of a specialized agent (e.g., "technical-writer"). |
timeoutMs | Number | Maximum time allowed for execution. |
Sources: README.md:31-35, src/server.ts:46-49
Execution Results and Formatting
The server captures the output of the Continue CLI and formats it for the MCP client. Each task's result includes a success or failure status and the duration of the execution in milliseconds.
Sources: src/server.ts:250-265
The sequence diagram shows the server managing the batch execution of Continue CLI instances.
Response Structure
If a task succeeds, the server provides the Response text and, if configured, the first 5 lines of the Raw Output. If a task fails, the server returns an error message capturing the failure details.
Sources: src/server.ts:260-285
Environment Requirements
To function correctly, the Continue Tool depends on specific host environment settings:
- Node.js: Version 18 or newer is required to run the SuperAgent server.
- CLI Path: The
continueCLI must be accessible in the system PATH. - Config Path: The
CONTINUE_CONFIG_PATHenvironment variable must be set.
Sources: README.md:46-51, README.md:60-65
Conclusion
The Continue Tool provides a robust interface for automating software development tasks through the Continue CLI. By supporting parallel execution, specialized system prompts, and structured MCP output, it integrates the power of Continue's headless mode into the broader SuperAgent ecosystem.
Sources: README.md:1-5, CHANGELOG.md:5-10