> ## Documentation Index
> Fetch the complete documentation index at: https://developer.watson-orchestrate.ibm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Importing local MCP toolkits

Use the `orchestrate toolkits import` command to import a local MCP toolkit into your environment.

```
orchestrate toolkits import
```

**command flags**

| Flag | Type | Required | Description |
| - | - | - | - |
| `--kind` / `-k` | string | Yes | The type of toolkit to import. Only `mcp` is supported at this time. |
| `--name` / `-n` | string | Yes | The name of the toolkit. |
| `--description` | string | Yes | The description for the toolkit. |
| `--package` | string | No | NPM or Python package of the MCP server. Runs a `npx -y {packagename}` or `python -m {packagename}` command automatically from the package structure. You must provide a `--language` flag to specify what language it uses. |
| `--language` / `-l` | string | No | The language used by the package. Supported values: `node` and `python`. |
| `--package-root` | string | No | The root directory of the MCP server package (for mcp servers imported from your local machine). |
| `--command` | string | No | The command used to start the MCP server. This can be a string (e.g. `'node dist/index.js --transport stdio'`) or a JSON-style list (e.g. `'["node", "dist/index.js", "--transport", "stdio"]'`). |
| `--tools` / `-t` | string | No | A comma-separated list of tools to import, or `*` to import all available tools (e.g. `--tools="tool_1,tool_2"`). |
| `--app-id` / `-a` | string | No | The `app_id` to of a connection to associate with this toolkit. **Only `key_value` connections are supported.** Each key and value within the connection will be exposed as environment variables to the mcp server. For more information, see [Connections](https://developer.watson-orchestrate.ibm.com/connections/overview.md). |

**Examples:**

> [tab] Importing from pypi
>
> ```bash BASH theme={null}
> # Setup connection if not already set
> orchestrate connections add -a tavily
> for env in draft live; do
>     orchestrate connections configure -a tavily --env $env --type team --kind key_value
>     orchestrate connections set-credentials -a tavily --env $env -e "TAVILY_API_KEY=$TAVILY_API_KEY"
> done
>
> # Import the toolkit
> # Note this is a third party mcp server for illustrative purposes only, use the npm variant for production use
> orchestrate toolkits add --kind mcp \
>   --name tavily \
>   --description "Search the internet" \
>   --command "pipx  -y mcp-tavily@0.1.10" \
>   --tools "*"  \
>   --app-id tavily
> ```

> [tab] Importing from npm
>
> ```bash BASH theme={null}
> # Setup connection if not already set
> orchestrate connections add -a tavily
> for env in draft live; do
>     orchestrate connections configure -a tavily --env $env --type team --kind key_value
>     orchestrate connections set-credentials -a tavily --env $env -e "TAVILY_API_KEY=$TAVILY_API_KEY"
> done
>
> # Import the toolkit
> orchestrate toolkits add --kind mcp \
>     --name tavily \
>     --description "Search the internet" \
>     --command "npx -y tavily-mcp@0.1.3" \
>     --tools "*"  \
>     --app-id tavily
> ```

> [tab] Local Python
>
> When building a Python-based MCP server locally, place a `requirements.txt` file at the root of the folder specified by the `--package-root` flag. This file should list all required dependencies, and your server script should include the logic to start the MCP server.
>
> Here's a minimal example of the expected folder structure:
>
> ```bash BASH theme={null}
> ─── mcp_server/
>     └── server.py
>     └── requirements.txt
> ```
>
> This setup ensures watsonx Orchestrate can correctly install dependencies and run your MCP server during tool execution.
>
> ```bash BASH theme={null}
> # Setup connection if not already set
> orchestrate connections add -a my_connection
> for env in draft live; do
>     orchestrate connections configure -a my_connection --env $env --type team --kind key_value
>     orchestrate connections set-credentials -a my_connection --env $env -e "SECURE_ENVIRONMENT_VARIABLE=value"
> done
>
> # Import the toolkit
> orchestrate toolkits import \
>     --kind mcp \
>     --name toolkit_name \
>     --description "does something innovative" \
>     --package-root ./mcp_server \
>     --command "python server.py" \
>     --tools "*" \
>     --app-id "my_connection"
> ```

> [tab] Local Nodejs
>
> When building a Node-based MCP server locally, place a `package.json` file at the root of the folder specified by the `--package-root` flag. This file should define your server’s dependencies and the command used to run it.
> Here's a minimal example of the expected folder structure:
>
> ```
> my-mcp-server/
> ├── package.json
> ├── index.js
> └── other-files/
> ```
>
> The `package.json` should include:
>
> * Required dependencies
> * A `start` script or equivalent command to launch the MCP server
>
> ```bash BASH theme={null}
> # Setup connection if not already set
> orchestrate connections add -a my_connection
> for env in draft live; do
>   orchestrate connections configure -a my_connection --env $env --type team --kind key_value
>   orchestrate connections set-credentials -a my_connection --env $env -e "SECURE_ENVIRONMENT_VARIABLE=value"
> done;
>
> # Import the toolkit
> orchestrate toolkits import \
>     --kind mcp \
>     --name toolkit_name \
>     --description "does something innovative" \
>     --package-root ./mcp_server \
>     --command "node server.js" \
>     --tools "*" \
>     --app-id "my_connection"
> ```

> [tab] Remote gateway
>
> While watsonx Orchestrate does not currently support directly importing remote MCP servers that use **Server-Sent Events (SSE)**, you can work around this limitation by using an open-source **MCP proxy service**.
>
> These proxy services convert an SSE-based server into a **stdio-compatible** server, which Orchestrate can interact with. This allows you to integrate remote MCP servers by bridging the protocol gap.
>
> ```bash BASH theme={null}
> # Setup connection if not already set
> orchestrate connections add -a my_connection
> orchestrate connections configure -a my_connection --env draft --type team --kind key_value
> orchestrate connections set-credentials -a my_connection --env draft -e "SECURE_ENVIRONMENT_VARIABLE=value"
>
> # Import the toolkit
> orchestrate toolkits import \
>     --kind mcp \
>     --name remote_toolkit_name \
>     --description "does something innovative" \
>     --command "uvx mcp-proxy http://myserver/sse" \
>     --tools "*" \
>     --app-id "my_connection"
> ```
