How to Develop MCP Tools & Skills for the Cline Coding Agent
Workplace usage of AI agents nearly doubled between 2025 and 2026, with 59% of developers now relying on agentic workflows at work. This guide covers MCP skills development for the Cline coding agent, explaining how to build custom servers, write schemas, and configure SKILL.md rules. Learn how to connect your agentic tools to shared, persistent cloud workspaces to overcome the limits of local storage.
Why Developers Need Custom Tools for Agentic Workflows
Workplace usage of AI agents nearly doubled between 2025 and 2026, with 59% of developers now relying on agentic workflows at work, up from 31% in the prior year [Stack Overflow 2025 Developer Survey]. This rapid growth has created a tool capability gap: while developers rely on these agents to automate complex coding tasks, standard local environments restrict agent access to basic tools. A standard coding agent has access to a local terminal, a filesystem, and a search tool. However, real-world development workflows demand integration with private database systems, administrative cloud interfaces, internal company APIs, and continuous deployment environments.
If you limit your coding agent to default capabilities, you force the agent to perform administrative overhead. For example, to retrieve client portal statistics or database schemas, the agent must write temporary node scripts, execute them, and parse the standard output. This approach is slow, error-prone, and consumes excess token context. Instead of forcing the agent to build its own temporary connectors, you can write dedicated tools that expose these capabilities as clean, schema-defined functions.
Developing custom tools bridges this connection gap. By providing your agent with structured endpoints, you ensure that tasks like database queries, document processing, and infrastructure deployments are executed safely and predictably. Rather than writing ad-hoc scripts, the agent simply calls a predefined tool. This guide will show you how to build custom Model Context Protocol (MCP) servers and configure local skills for Cline, allowing your agentic coding workflows to operate with maximum efficiency. Connect Cline to a shared, persistent workspace with a 14-day free trial on the Fastio pricing page.
What is the Architecture of MCP and Cline Skills?
The Model Context Protocol (MCP) is designed by Anthropic as an open standard for secure agent tool integration. This protocol establishes a clear division of labor between the core reasoning model and the external tools it accesses. The core model acts as the brain, processing natural language and planning steps. The MCP server acts as the hands, executing the specific actions requested by the model and returning the results. This division ensures that the reasoning engine does not need to know the implementation details of the databases or APIs it interacts with. It only needs to understand the tool schema.
When building tools for Cline, developers must distinguish between MCP servers and Cline Skills. These two concepts represent different layers of agent configuration:
- MCP tools define capabilities. They represent what the agent is physically capable of doing. Examples include querying a database, reading a file from a shared cloud workspace, or sending an HTTP request.
- Cline Skills define instructions and conventions. They represent how and when the agent should execute its capabilities. Examples include specific coding guidelines, branch naming conventions, or deployment workflows.
Cline communicates with MCP servers using a JSON-RPC 2.0 protocol over standard input/output (stdio) or Server-Sent Events (SSE). When you launch Cline in your IDE, the extension reads your settings file, spawns the registered MCP servers as background processes, and establishes a communication channel. When the user submits a prompt, Cline queries the active servers for their list of tools. If the model determines that a specific tool is required to fulfill the user's request, it sends a tool invocation request, waits for the server to return the output, and feeds that output back into its reasoning loop. By separating capability definition from instructional rules, you can maintain a highly modular agent architecture.
Steps to Build a Custom Node.js MCP Server
To build a custom MCP server using Nodejs, you will need to initialize a project and install the official @modelcontextprotocol/sdk package. The SDK handles JSON-RPC message serialization, transport channel management, and tool definition schemas.
Start by creating a new directory and initializing the project:
mkdir my-mcp-server
cd my-mcp-server
npm init -y
Next, install the required dependencies. You will need the Model Context Protocol SDK and Zod for input schema validation:
npm install @modelcontextprotocol/sdk zod
npm install --save-dev typescript @types/node
Initialize your TypeScript configuration and compile target settings:
npx tsc --init
Configure your tsconfig.json to support modern ESM imports by setting moduleResolution to node and target to ES2022. Now, create a file named index.ts and add the following implementation for a custom text processing tool:
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";
// 1. Initialize the MCP server
const server = new McpServer({
name: "custom-data-formatter",
version: "1.0.0",
});
// 2. Define the Zod schema for input validation
const formatSchema = {
content: z.string().describe("The raw document content to format"),
uppercase: z.boolean().describe("Whether to convert the content to uppercase"),
};
// 3. Register the tool with the server
server.tool(
"format-document",
"Formats raw document text into clean structured output",
formatSchema,
async (params) => {
let result = params.content.trim();
if (params.uppercase) {
result = result.toUpperCase();
}
return {
content: [
{
type: "text",
text: result,
},
],
};
}
);
// 4. Connect the server using standard input/output transport
const transport = new StdioServerTransport();
await server.connect(transport);
When building stdio-based MCP servers, you must follow standard input/output safety rules. Because the communication transport relies on the process standard output (stdout), any debug messages or runtime logs printed using console.log() will corrupt the JSON-RPC messages and crash the Cline connection. If you need to print debug logs, write them to standard error (stderr) using console.error(). Cline reads the standard error stream and prints the text to its log console, allowing you to trace execution without corrupting the active JSON-RPC channel.
How to Configure Server Registration in cline_mcp_settings.json
After compiling your Nodejs MCP server, you must register it in the Cline settings file. Cline reads this configuration when starting a session to determine which servers to execute. The settings file is named cline_mcp_settings.json.
The location of the file depends on your operating system:
- On macOS, navigate to:
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json - On Windows, navigate to:
%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json - On Linux, navigate to:
~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
If you prefer to open the file from VS Code, navigate to the Cline panel sidebar. Click the stacked server icon to open the MCP Servers configuration panel. From there, select the Configure tab and click the Configure MCP Servers button. VS Code will immediately open the correct JSON configuration file in your editor tab.
To register your custom Nodejs server, insert your server block under the mcpServers object:
{
"mcpServers": {
"custom-data-formatter": {
"command": "node",
"args": ["/absolute/path/to/your/server/build/index.js"],
"env": {
"NODE_ENV": "production",
"API_KEY": "your_secret_key_here"
},
"disabled": false,
"autoApprove": []
}
}
}
Make sure the path in the args array points to the compiled JavaScript file, not the TypeScript file. If your custom tool requires access to environment variables, define them inside the env object. For remote servers that run in the cloud or on a separate container, replace the command and args fields with url and transportType to connect via SSE:
{
"mcpServers": {
"remote-data-formatter": {
"url": "https://api.yourdomain.com/mcp/sse",
"transportType": "sse"
}
}
}
Save the file. Cline detects changes to this JSON file automatically and restarts the underlying processes. You can confirm the connection status by looking at the MCP Servers tab in the sidebar. A green indicator dot means the server has successfully connected and its tools are ready for Cline to use. To learn about more integration workflows, review the Fastio agent storage options.
Give your local agents persistent workspace storage
A shared workspace with an MCP-ready endpoint for your agent's reads and writes, with versioning and search built in. Starts with a 14-day free trial.
A Guide to Structuring and Deploying MCP Skills for the Cline Coding Agent
While MCP servers define what actions your coding agent can perform, Cline Skills define the operational instructions the agent must follow. Cline looks for these skills in two main locations: project-level skills inside the .cline/skills/ directory of your active repository, and global skills inside the ~/.cline/skills/ directory of your user home folder. Project-specific skills take precedence over global skills if they share the same name.
Each skill is organized as a separate folder containing at least a SKILL.md markdown file. The directory structure follows this format:
.cline/
└── skills/
└── code-deployer/
├── SKILL.md
├── docs/
│ └── architecture.md
└── scripts/
└── deploy.sh
The SKILL.md file requires a YAML frontmatter block at the top containing the name and description of the skill. The description is critical because Cline scans this field to match user prompts:
---
name: code-deployer
description: Use this skill when deploying software to staging or running continuous integration checks.
---
### Code Deployer Skill
Instructions for executing deployments and checking statuses:
1. Ensure the active workspace has no uncommitted files.
2. Run the unit test suite before starting any deployment.
3. If tests pass, execute the deployment script.
To enable skills, go to VS Code settings, search for Cline, and ensure that the Enable Skills option is checked. When you begin a chat session, Cline reads the descriptions of your project-level skills. If the context of your request matches the description of a skill, Cline automatically loads the instructions into its system prompt. You can also trigger a skill manually by clicking the scale icon (⚖) in the VS Code sidebar or by typing the command /code-deployer in the chat input. Using skills keeps your active LLM context clean, loading detailed instructions only when they are needed for a specific task.
How to Integrate Shared Storage and Transfer Ownership
For team development environments, local storage solutions present major limitations. When you run standard stdio MCP servers, the files the agent modifies remain locked on your physical development machine. While you can use alternatives like raw Amazon S3 storage, this requires manual API key management and lacks a web interface. Traditional consumer cloud storage options often create file version conflicts when an agent writes code concurrently with human edits, and they do not support automated database indexing for semantic search.
To solve these issues, you can connect Cline to shared cloud workspaces using Fastio. Fastio serves as a central coordinate layer where developers and autonomous agents share the same files, notes, and workflows. Fastio exposes a consolidated MCP toolset via Streamable HTTP at /mcp and legacy Server-Sent Events (SSE) at /sse (documentation is available at mcp.fast.io/skill.md and onboarding instructions are at fast.io/llms.txt). The agent communicates with Fastio using these protocols, allowing it to read and write files directly within a cloud workspace.
Using Fastio as the storage backend for your agent enables several key capabilities:
- Fastio workspaces: Shared directories where developers and agents collaborate on the same file structure.
- Intelligence Mode: Auto-indexing of workspace assets for built-in RAG and semantic search.
- Hybrid Search: Combining exact full-text search with semantic matching and metadata value search.
- Metadata Views: Structured document extraction where AI generates schemas and populates sortable spreadsheets.
- Per-file version history: Keeps a record of concurrent agent writes, allowing restoration of prior clean versions.
- Collaborative Notes: Real-time multiplayer co-editing for humans and agents.
- Ownership Transfer: An agent can set up workspaces and portals, then transfer ownership to a human.
Fastio has no free plan or free agent tier. The agent flow is free to sign up, but handing off to a human requires creating an organization. Paid plans: Starter $29/mo, Business $99/mo, Growth $299/mo. Every org starts with a 14-day free trial that requires a credit card. An agent can set up the workspace, configure the file hierarchy, and then generate a claim link. The human team member clicks the link, enters their credit card, starts the 14-day free trial, and takes over the organization, while the agent retains admin access to manage deployments.
Frequently Asked Questions
How do I build an MCP server for Cline?
Building a custom MCP server involves writing a program that implements the JSON-RPC based Model Context Protocol, typically using Nodejs or Python. You define tools with specific input schemas and run the server using a transport mechanism such as standard input/output (stdio) or Server-Sent Events (SSE).
How does Cline call custom tools?
Cline reads the tool schemas exposed by the registered MCP servers when it starts up. When Cline needs to perform an action that matches a tool description, it sends a JSON-RPC request containing the tool name and arguments over standard input (stdin) or HTTP. The MCP server executes the corresponding handler logic and returns the structured results back to Cline.
Where is the cline_mcp_settings.json located?
The cline_mcp_settings.json file is located in your user profile storage directory. On macOS, navigate to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json. On Windows, open %APPDATA%/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json. On Linux, open ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json.
Related Resources
Give your local agents persistent workspace storage
A shared workspace with an MCP-ready endpoint for your agent's reads and writes, with versioning and search built in. Starts with a 14-day free trial.