Home

stencila mcp add

Add an MCP server to stencila.toml

Adds a new server configuration to the nearest stencila.toml file, or to the user-level config with --user.

The server spec is either a URL (for HTTP servers) or a command followed by its arguments (for stdio servers). URLs are detected by an http:// or https:// prefix.

Usage

stencila mcp add [OPTIONS] <ID> <SPEC>...

Examples

# Add a stdio server
stencila mcp add filesystem npx -y @modelcontextprotocol/server-filesystem /tmp

# Add an HTTP server
stencila mcp add remote-api https://api.example.com/mcp

# Add with a display name
stencila mcp add --name 'Filesystem Server' fs npx -y @modelcontextprotocol/server-filesystem /tmp

# Add with environment variables
stencila mcp add --env GITHUB_TOKEN=ghp_xxx github npx -y @modelcontextprotocol/server-github

# Add to user-level config
stencila mcp add --user my-server my-mcp-server

# Compatibility scope syntax
stencila mcp add --scope user my-server my-mcp-server

Arguments

NameDescription
<ID>The server ID (unique identifier).
<SPEC>Command and arguments, or URL.

Options

NameDescription
--nameHuman-readable name for the server.
--envEnvironment variable for stdio servers (repeatable, KEY=VALUE).
-f, --forceOverwrite if a server with this ID already exists. Possible values: true, false.
--userAdd to user config (~/.config/stencila/stencila.toml). Possible values: true, false.
--workspaceAdd to workspace config (nearest stencila.toml). Possible values: true, false.
--scopeConfig scope (compatibility with other tools). Possible values: user, workspace.
--dirWorkspace directory. Default value: ..
© 2026 Stencila