Skip to content
VS Code

IBM watsonx.ai Granite for VS Code

io.github.nirholas/ibm-watsonx

IBM watsonx.ai MCP by three.ws: chat, text generation, embeddings, and tokenization.

client:VS Code transport:stdio runtime:npm

Install IBM watsonx.ai Granite in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "watsonx-api-key",
      "description": "WATSONX_API_KEY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "watsonx-project-id",
      "description": "WATSONX_PROJECT_ID",
      "password": true
    },
    {
      "type": "promptString",
      "id": "watsonx-space-id",
      "description": "WATSONX_SPACE_ID",
      "password": true
    },
    {
      "type": "promptString",
      "id": "watsonx-url",
      "description": "WATSONX_URL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "watsonx-model-id",
      "description": "WATSONX_MODEL_ID",
      "password": true
    },
    {
      "type": "promptString",
      "id": "watsonx-embed-model-id",
      "description": "WATSONX_EMBED_MODEL_ID",
      "password": true
    },
    {
      "type": "promptString",
      "id": "watsonx-api-version",
      "description": "WATSONX_API_VERSION",
      "password": true
    }
  ],
  "servers": {
    "ibm-watsonx": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@three-ws/ibm-watsonx-mcp"
      ],
      "env": {
        "WATSONX_API_KEY": "${input:watsonx-api-key}",
        "WATSONX_PROJECT_ID": "${input:watsonx-project-id}",
        "WATSONX_SPACE_ID": "${input:watsonx-space-id}",
        "WATSONX_URL": "${input:watsonx-url}",
        "WATSONX_MODEL_ID": "${input:watsonx-model-id}",
        "WATSONX_EMBED_MODEL_ID": "${input:watsonx-embed-model-id}",
        "WATSONX_API_VERSION": "${input:watsonx-api-version}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

IBM watsonx.ai Granite in other clients