MCP Servers
This guide explains how to configure MCP Servers for agents in Sink, enabling them to access external tools and data sources.
What is an MCP Server?
An MCP (Model Context Protocol) Server is a standard way for agents to access external tools and data sources. For example, an MCP Server can provide:
- File system access
- Database queries
- Web API calls
- Code analysis tools
- And more
Sink supports two types of MCP Servers:
- stdio: Executable programs running locally
- http: Remote HTTP services
MCP configuration file
MCP Servers are defined through the mcp.json configuration file, which
should be located at one of:
- Workspace level:
<workspace>/.sink/mcp.json - User level:
~/.sink/mcp.json - Builtin level (pre-configured in the distribution)
Workspace-level configuration overrides user-level, and user-level overrides builtin-level.
Basic format
The basic structure of mcp.json:
{
"mcpServers": {
"server-id": {
"type": "stdio",
"command": "executable-path",
"args": ["--arg1", "--arg2"],
"env": {
"ENV_VAR": "value"
}
}
}
}
Configure stdio-type servers
Stdio-type servers are executable programs running locally. Agents communicate with them via standard input/output.
Basic example
{
"mcpServers": {
"filesystem": {
"type": "stdio",
"command": "mcp-server-filesystem",
"args": ["--root", "/home/user"],
"env": {
"DEBUG": "false"
}
}
}
}
Field descriptions
| Field | Required | Description |
|---|---|---|
type | Yes | "stdio" |
command | Yes | Full path or command name of the executable |
args | No | Array of command-line arguments to pass to the program |
env | No | Additional environment variables to pass to the program |
metadata.disabled | No | Set to true to disable this server (default false) |
metadata.inclusion | No | Inclusion policy: auto (default) / mandatory (cannot be removed) / explicit (only when explicitly referenced) |
metadata.overridable | No | Whether higher-priority config layers can override this resource (default true). When false, same-named entries in higher-priority layers are ignored |
Run via npx
You can run npm packages directly through npx:
{
"mcpServers": {
"web-search": {
"type": "stdio",
"command": "npx",
"args": ["-y", "mcp-server-web-search"]
}
}
}
Environment variables
If an MCP Server requires special environment variables (such as API
keys), specify them in env:
{
"mcpServers": {
"openai": {
"type": "stdio",
"command": "mcp-server-openai",
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}
Note: Do not store sensitive API keys directly in mcp.json.
Instead, set environment variables in settings.json and reference them
in mcp.json. For example:
settings.json:
{
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
mcp.json:
{
"mcpServers": {
"openai": {
"type": "stdio",
"command": "mcp-server-openai",
"env": {
"OPENAI_API_KEY": "${OPENAI_API_KEY}"
}
}
}
}
Configure HTTP-type servers
HTTP-type servers are remote services accessed over the network.
Basic example
{
"mcpServers": {
"api-service": {
"type": "http",
"url": "https://api.example.com/mcp",
"headers": {
"Authorization": "Bearer token-here"
}
}
}
}
Field descriptions
| Field | Required | Description |
|---|---|---|
type | Yes | "http" |
url | Yes | Complete HTTP(S) URL of the server |
headers | No | Headers object (e.g., authentication tokens) |
metadata.disabled | No | Set to true to disable this server (default false) |
metadata.inclusion | No | Inclusion policy: auto (default) / mandatory (cannot be removed) / explicit (only when explicitly referenced) |
metadata.overridable | No | Whether higher-priority config layers can override this resource (default true). When false, same-named entries in higher-priority layers are ignored |
Disable a server
You can temporarily disable an MCP Server without deleting its
configuration, using the metadata.disabled field:
{
"mcpServers": {
"disabled-server": {
"type": "stdio",
"command": "some-command",
"metadata": {
"disabled": true
}
}
}
}
You can also use environment variables for dynamic control:
{
"mcpServers": {
"optional-server": {
"type": "stdio",
"command": "some-command",
"metadata": {
"disabled": "${DISABLE_SERVER}"
}
}
}
}
Then set in settings.json:
{
"env": {
"DISABLE_SERVER": "false"
}
}
Built-in MCP Server
Sink automatically registers a built-in sink MCP Server for each task,
providing the following tools:
Task management tools
task_complete— Mark task as completetask_spawn— Create a subtask. Parameters:prompt(description),profileId(profile selection),executionMode(individualorteam),awaitCompletion(wait for subtask to finish before returning),managed(managed flag),configOverrides(override config defaults),questionnaireAnswers(answer profile questionnaire questions)task_info— Query task informationtask_send_message— Send message to another task. Supports two types:task_message(plain message) andtask_reopen_request(ask the target task to reopen itself after completion). Usetask_infowithtaskId: "parent"to discover your parent task’s IDtask_reopen— Reopen a completed task
Configuration query tools
profile_list— List all Profilesprofile_get— Get specific Profile detailsruntime_list— List all Runtimesruntime_get— Get specific Runtime detailsskill_list— List all Skillsskill_get— Get specific Skill detailsmcp_list— List all MCP Serversmcp_get— Get specific MCP Server details
Cron scheduling tools
Agents can manage scheduled tasks through the following tools:
cron_set— Set a timed notification for the current task (sends a message when triggered)cron_spawn— Set up automatic subtask creation on a schedule (creates a new task with a specified Profile when triggered). Note: requirestask_spawnto be enabled; iftask_spawnis disabled,cron_spawnis automatically unavailable.cron_remove— Remove a scheduled taskcron_list— List all scheduled tasks for the current task
The built-in sink MCP Server does not need to be configured in
mcp.json; all tasks automatically have access to it.
Common MCP Servers
The following are some commonly used open-source MCP Servers:
File system access
{
"mcpServers": {
"filesystem": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem"]
}
}
}
Web browsing
{
"mcpServers": {
"puppeteer": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-puppeteer"]
}
}
}
Git repositories
{
"mcpServers": {
"git": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-git"]
}
}
}
Troubleshooting
MCP Server fails to start
Symptom: MCP Server connection fails when task starts
Checklist:
- Confirm the executable exists and is executable:
which command-name ls -l /path/to/command - Try running the server manually to check for errors:
/path/to/mcp-server - Check logs for more information (if debug mode is configured)
Environment variables not working
Symptom: ${VAR} is not replaced in mcp.json
Reason: Variable not defined in settings.json or doesn’t exist in
shell environment
Solution:
- Confirm the variable is defined in
settings.json:{ "env": { "VAR": "value" } } - Or confirm the environment variable is set in your shell:
export VAR="value" sink gateway
HTTP server connection fails
Symptom: HTTP-type server connection times out or is rejected
Checklist:
- Confirm URL is correct and service is online:
curl -H "Authorization: Bearer token" https://api.example.com/mcp - Check if firewall is blocking the connection
- Verify the authentication token is valid
Next steps
- Manage Profiles — Assign different MCP Servers to different agents
- Configure Runtimes — Learn how to configure agent runtimes
- Quick Start Tutorial — Create and run your first task