cline-local mcp for Cline CLI
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cline-local mcp for Cline CLIReview this repository for security issues without modifying any files."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Local Cline MCP Bridge
This is a local stdio MCP server that exposes one tool, ask_cline. It launches the authenticated Cline CLI and returns only the terminal text response plus model, duration, and usage/cost when Cline supplies them.
Requirements
Node.js 20 or newer
The Cline CLI already installed and authenticated (
cline.exeon Windows)
Related MCP server: Workbench MCP Server
Install, build, and launch
npm install
npm run build
npm test
npm startnpm start runs a stdio server, so it will appear idle until an MCP client connects. Do not type prompts into that terminal.
MCP client configuration
Build first, then add this server to an MCP client that supports stdio servers:
{
"mcpServers": {
"cline-local": {
"command": "node",
"args": ["C:\\Develop\\ClineMcp\\dist\\index.js"]
}
}
}Tool
ask_cline({
prompt: string,
cwd?: string,
thinking?: "none" | "low" | "medium" | "high" | "xhigh",
timeoutSeconds?: number,
systemPrompt?: string
})timeoutSecondsdefaults to180and is limited to300.thinkingdefaults tonone.On Windows,
promptis limited to 20,000 characters andsystemPromptto 8,000. Together they may not exceed 24,000 characters, leaving a safe margin below the Windows command-line limit.The bridge always invokes
cline --json --auto-approve falseand uses an argument array, never a shell command.It passes
--systemonly whensystemPromptis supplied and--cwdonly whencwdis supplied.Cline streamed content and reasoning are ignored. Only a terminal
run_result-style event is returned.With
--auto-approve false, Cline cannot obtain automatic approval for file-changing operations. Use this bridge only for analysis/chat prompts.
Manual test
After configuring the MCP client, call:
{
"prompt": "Reply with exactly: Cline bridge test successful.",
"thinking": "none",
"timeoutSeconds": 180
}The returned text should be Cline bridge test successful.
Isolated workspace analysis
ask_cline_workspace is a separate tool for repository-wide analysis. It requires a cwd inside a Git repository with at least one commit. The bridge creates a detached Git worktree in the system temporary directory, runs Cline there with a mandatory analysis-only instruction, and removes the worktree in a finally block after success, failure, timeout, or cancellation.
{
"prompt": "Review this repository for reliability and security issues. Do not modify files.",
"cwd": "C:\\Develop\\your-repository",
"thinking": "high",
"timeoutSeconds": 300
}This tool uses Cline with automatic tool approval only inside the disposable worktree so it can inspect the repository. The prompt prohibits writes and external side effects, but this is not an operating-system sandbox; use it only for repositories you trust. The original ask_cline tool remains the stricter no-workspace-access option.
Run a live isolated-workspace check with:
npm run verify:workspaceSecurity notes
The bridge does not read or return Cline configuration, credentials, API keys, tokens, stderr, or streamed reasoning. Process launch, non-zero exit, timeout, cancellation, malformed JSONL, and a missing final result are returned as generic MCP tool errors.
Available Tools
2 toolsask_clineC
Ask the locally installed Cline CLI for an analysis/chat response. File edits are not approved.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| prompt | Yes | ||
| thinking | No | ||
| systemPrompt | No | ||
| timeoutSeconds | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the behavioral disclosure burden. It does disclose one important trait: file edits are not approved. However, it leaves other behaviors unstated, such as how the CLI is invoked, whether commands can be executed, what side effects may occur, and how errors or partial responses are handled.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two short sentences with no filler. The purpose is front-loaded, and the safety constraint earns its place. It is concise without sacrificing the key message.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has five parameters and no annotations or output schema, yet the description only covers the high-level action and a single safety note. It omits any explanation of cwd, thinking levels, system prompt, timeout settings, or return value shape, making it incomplete for reliable invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for the schema's silence. It does not mention or explain any of the five parameters (prompt, cwd, thinking, systemPrompt, timeoutSeconds), providing no semantic value beyond what the plain parameter names suggest.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a clear verb and resource: 'Ask the locally installed Cline CLI for an analysis/chat response.' This makes the basic purpose evident. It does not explicitly contrast with the sibling ask_cline_workspace, though the 'locally installed' phrasing hints at a distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus ask_cline_workspace, nor are any exclusions or prerequisites mentioned. The sentence 'File edits are not approved' is a constraint, not usage guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ask_cline_workspaceB
Analyze a Git workspace through Cline in a disposable worktree. The worktree is always removed after the request.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | Yes | ||
| prompt | Yes | ||
| thinking | No | ||
| timeoutSeconds | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the key non-obvious behavior: 'The worktree is always removed after the request.' This clarifies that side effects are contained in a disposable environment, which is valuable. It does not mention other potential behaviors like network access or code execution, but the lifecycle disclosure is strong.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tightly written sentences, with the core purpose first and the essential disposal behavior second. Every word earns its place; there is no fluff or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers purpose and one behavioral trait, but with four undocumented parameters, no output schema, and no annotations, an agent is left without guidance on parameter meaning, expected return value, or how this differs from ask_cline. Too much is left to inference for a complete tool definition.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description does not explicitly define any of the four parameters. It indirectly hints that cwd refers to the Git workspace and prompt is the Cline request, but thinking and timeoutSeconds are completely unexplained. The description fails to compensate for the schema's silence.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Analyze') and resource ('a Git workspace'), and adds a mechanism ('through Cline in a disposable worktree') that distinguishes it from the sibling ask_cline. It is clear but not as explicit as naming the alternative or describing the exact outcome.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for analyzing a Git workspace in a safe, throwaway context, but it does not explicitly say when to prefer this tool over ask_cline or when not to use it. No exclusion criteria or alternative routing is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v1.0.0- First observed
ask_cline - First observed
ask_cline_workspace
TDQS
Scored across 2 tools
The two tools are completely distinct: one is for general chat/analysis, and the other specifically analyzes a Git workspace in a disposable worktree. There is no ambiguity in their purposes.
Both tools share the 'ask_cline' prefix with one using a descriptive '_workspace' suffix. The naming pattern is clear, consistent, and easy to predict.
Two tools is slightly below the typical range, but each tool has a distinct and necessary role for the server's stated purpose. The set is minimal yet not underdeveloped.
For an analysis-only interface to the Cline CLI, the two tools cover all stated use cases: general chat and workspace analysis. No obvious missing operations or dead ends exist within this narrow domain.
Maintenance
Related MCP Connectors
Paid remote MCP for LLM security scans, jailbreak checks, analytics, checkout, and readiness.
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Remote MCP for Gemini upgrade evals, prompt regressions, output diffs, and eval receipts.
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables MCP clients to spawn and control Codex CLI and Claude Code sessions on the host machine, with session management and filesystem access.4MIT
- AlicenseNot gradedqualityDmaintenanceProvides remote project access via MCP, enabling file operations, code search, git commands, and background Claude CLI execution.3 npmMIT
- FlicenseNot gradedqualityCmaintenanceEnables ISLI agents and MCP clients to dispatch natural-language coding and terminal tasks to a locally-installed Claude Code CLI, supporting both one-shot execution and persistent sessions with workspace and security controls.-
- AlicenseAqualityAmaintenanceEnables MCP clients like Claude Code and Codex to delegate coding tasks to Cursor's CLI agent, which implements changes in the workspace and returns clean, structured results for review.3181 npm4MIT