Register a STDIO server
Write a config file
Create a JSON file describing your server. Here is an example for the official MCP filesystem server:
Config file format
The full set of fields for a STDIO server config:| Field | Required | Description |
|---|---|---|
name | Yes | Unique identifier. No spaces, special characters, or consecutive underscores. |
transport | Yes | Must be "stdio". Other possible values are "streamable_http" and "sse". |
description | No | Human-readable description surfaced in the CLI and API. |
command | Yes | The executable to run — typically "npx" or "uvx". |
args | No | List of arguments passed to command when Mcpjungle spawns the process. |
session_mode | No | stateless (default) creates a new process/connection per tool call. stateful reuses a persistent session. |
env | No | Map of environment variables injected into the process environment at startup. |
Examples
Environment variable substitution
JSON config files support${VAR_NAME} placeholders in string fields, including command args and env values.
See the configuration file reference for the full substitution rules and examples.
Running in Docker: filesystem access
When Mcpjungle runs inside a Docker container, the container process does not have access to your host filesystem by default. To use thefilesystem MCP server from inside Docker, you need to mount the host directory you want to expose.
The default docker-compose.yaml provided by Mcpjungle mounts your current working directory as /host inside the container. Use /host as the target directory in your config:
filesystem server access to your current working directory on the host machine, mounted at /host inside the container.
Using the stdio Docker image
STDIO-based servers that rely onnpx or uvx require those tools to be present in the Mcpjungle container.
Start Mcpjungle with the stdio image using the MCPJUNGLE_IMAGE_TAG environment variable:
If you are using the development
docker-compose.yaml, the latest-stdio tag is already the default. You only need to set MCPJUNGLE_IMAGE_TAG explicitly when using docker-compose.prod.yaml.npx or uvx, create a custom Docker image that builds on the Mcpjungle base image and installs the additional dependency.
Debugging STDIO servers
If a STDIO server fails to start or throws errors during a tool call, check the Mcpjungle server logs. The server capturesstderr output from child processes and writes it to its own log stream, making it the primary place to diagnose STDIO server issues.
Related pages
Session modes
Use stateful mode when a STDIO server’s cold start cost becomes a bottleneck.
Docker deployment
Choose the right image and understand container filesystem access.
Register HTTP servers
Register remote MCP servers over streamable HTTP.
Config file reference
See the exact JSON schema for STDIO registration files.
