watsonx MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@watsonx MCP Server generate a haiku about coding"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
watsonx MCP Server
MCP server for IBM watsonx.ai integration with Claude Code. Enables Claude to delegate tasks to IBM's foundation models (Granite, Llama, Mistral, etc.).
Features
Text Generation - Generate text using watsonx.ai foundation models
Chat - Have conversations with watsonx.ai chat models
Embeddings - Generate text embeddings
Model Listing - List all available foundation models
Related MCP server: watsonx MCP Server
Available Tools
Tool | Description |
| Generate text using watsonx.ai models |
| Chat with watsonx.ai models |
| Generate text embeddings |
| List available models |
Setup
1. Install Dependencies
cd ~/watsonx-mcp-server
npm install2. Configure Environment
Set these environment variables:
WATSONX_API_KEY=your-ibm-cloud-api-key
WATSONX_URL=https://us-south.ml.cloud.ibm.com
WATSONX_SPACE_ID=your-deployment-space-id # Recommended: deployment space
WATSONX_PROJECT_ID=your-project-id # Alternative: project IDNote: Either WATSONX_SPACE_ID or WATSONX_PROJECT_ID is required for text generation, embeddings, and chat. Deployment spaces are recommended as they have Watson Machine Learning (WML) pre-configured.
3. Add to Claude Code
The MCP server is already configured in ~/.claude.json:
{
"mcpServers": {
"watsonx": {
"type": "stdio",
"command": "node",
"args": ["/Users/matthewkarsten/watsonx-mcp-server/index.js"],
"env": {
"WATSONX_API_KEY": "your-api-key",
"WATSONX_URL": "https://us-south.ml.cloud.ibm.com",
"WATSONX_SPACE_ID": "your-deployment-space-id"
}
}
}
}Usage
Once configured, Claude can use watsonx.ai tools:
User: Use watsonx to generate a haiku about coding
Claude: [Uses watsonx_generate tool]
Result: Code flows like water
Bugs arise, then disappear
Programs come aliveAvailable Models
Some notable models available:
ibm/granite-3-3-8b-instruct- IBM Granite 3.3 8B (recommended)ibm/granite-13b-chat-v2- IBM Granite chat modelibm/granite-3-8b-instruct- Granite 3 instruct modelmeta-llama/llama-3-70b-instruct- Meta's Llama 3 70Bmistralai/mistral-large- Mistral AI large modelibm/slate-125m-english-rtrvr-v2- Embedding model
Use watsonx_list_models to see all available models.
Architecture
Claude Code (Opus 4.5)
│
└──▶ watsonx MCP Server
│
└──▶ IBM watsonx.ai API
│
├── Granite Models
├── Llama Models
├── Mistral Models
└── Embedding ModelsTwo-Agent System
This enables a two-agent architecture where:
Claude (Opus 4.5) - Primary reasoning agent, handles complex tasks
watsonx.ai - Secondary agent for specific workloads
Claude can delegate tasks to watsonx.ai when:
IBM-specific model capabilities are needed
Running batch inference on enterprise data
Using specialized Granite models
Generating embeddings for RAG pipelines
IBM Cloud Resources
This MCP server uses:
Service: watsonx.ai Studio (data-science-experience)
Plan: Lite (free tier)
Region: us-south
Create your own watsonx.ai project and deployment space in IBM Cloud.
Integration with IBM Z MCP Server
This watsonx MCP server works alongside the IBM Z MCP server:
Claude Code (Opus 4.5)
│
├──▶ watsonx MCP Server
│ └── Text generation, embeddings, chat
│
└──▶ ibmz MCP Server
└── Key Protect HSM, z/OS ConnectDemo scripts in the ibmz-mcp-server:
demo-full-stack.js- Full 5-service pipelinedemo-rag.js- RAG with watsonx embeddings + Granite
Document Analyzer
The document analyzer (document-analyzer.js) provides powerful tools for analyzing your external drive data using watsonx.ai:
Commands
# View document catalog (9,168 documents)
node document-analyzer.js catalog
# Summarize a document
node document-analyzer.js summarize 1002519.txt
# Analyze document type, topics, entities
node document-analyzer.js analyze 1002519.txt
# Ask questions about a document
node document-analyzer.js question 1002519.txt 'What AWS credentials are needed?'
# Generate embeddings for documents
node document-analyzer.js embed
# Semantic search across documents
node document-analyzer.js search 'IBM Cloud infrastructure'Features
Summarization: Generate concise summaries of any document
Analysis: Extract document type, topics, entities, and sentiment
Q&A: Ask natural language questions about document content
Embeddings: Generate 768-dimensional vectors for semantic search
Semantic Search: Find similar documents using vector similarity
Demo
Run the full demo:
./demo-external-drive.shEmbedding Index & RAG
The embedding-index.js tool provides semantic search and RAG (Retrieval Augmented Generation):
# Build an embedding index (50 documents)
node embedding-index.js build 50
# Semantic search
node embedding-index.js search 'cloud infrastructure'
# RAG query - retrieves relevant docs and generates answer
node embedding-index.js rag 'How do I set up AWS for Satellite?'
# Show index statistics
node embedding-index.js statsBatch Processor
The batch-processor.js tool processes multiple documents at once:
# Classify documents into categories
node batch-processor.js classify 20
# Extract topics from documents
node batch-processor.js topics 15
# Generate one-line summaries
node batch-processor.js summarize 10
# Full analysis (classify + topics + summary)
node batch-processor.js full 10Categories: technical, business, creative, personal, code, legal, marketing, educational, other
Files
index.js- MCP server implementationdocument-analyzer.js- Document analysis CLI toolembedding-index.js- Embedding index and RAG toolbatch-processor.js- Batch document processordemo-external-drive.sh- Demo scriptpackage.json- DependenciesREADME.md- This file
Author
Matthew Karsten
License
MIT
Available Tools
13 toolskey_protect_create_keyA
Create a new encryption key in IBM Key Protect (stored in FIPS 140-2 Level 3 HSM)
Inputs: name (required), type, description, extractable.
key_protect_delete_keyA
Delete an encryption key from IBM Key Protect (irreversible)
Inputs: key_id (required), force.
key_protect_get_keyA
Get details of a specific key from IBM Key Protect
Inputs: key_id (required).
key_protect_list_keysB
List encryption keys from IBM Key Protect (HSM-backed key management on IBM Z infrastructure)
Inputs: limit, offset.
key_protect_unwrap_keyA
Unwrap (decrypt) data using a root key in IBM Key Protect
Inputs: key_id (required), ciphertext (required), aad.
key_protect_wrap_keyA
Wrap (encrypt) data using a root key in IBM Key Protect - for envelope encryption
Inputs: key_id (required), plaintext (required), aad.
watsonx_chatD
Have a conversation with watsonx.ai chat models
Inputs: messages (required), model_id, temperature, max_new_tokens.
watsonx_embeddingsB
Generate text embeddings using watsonx.ai embedding models
Inputs: texts (required), model_id.
watsonx_generateC
Generate text using IBM watsonx.ai foundation models (Granite, Llama, Mistral, etc.)
Inputs: prompt (required), top_k, top_p, model_id, +2 more.
watsonx_list_modelsA
List available foundation models in watsonx.ai
Inputs: no named parameters.
zos_connect_call_serviceB
Call a z/OS Connect service to interact with mainframe programs (CICS, IMS, batch). Requires ZOS_CONNECT_URL to be configured.
Inputs: service_name (required), payload, operation.
zos_connect_get_service_infoA
Get detailed information about a z/OS Connect service including its OpenAPI specification
Inputs: service_name (required).
zos_connect_list_servicesA
List available z/OS Connect services (RESTful APIs to mainframe programs). Requires ZOS_CONNECT_URL to be configured.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool targets a distinct resource and action: AI generation/embeddings/chat, key lifecycle operations, and z/OS Connect service interactions. Even within similar actions like list_models vs list_keys, the domains are clearly separated by prefixes and descriptions, leaving no ambiguity.
The naming uses consistent lowercase snake_case with clear subservice prefixes (watsonx_, key_protect_, zos_connect_). However, verb placement is not uniform: some tools start with a verb (watsonx_generate, key_protect_list_keys) while others are noun-only (watsonx_embeddings). This minor inconsistency is easy to adapt to.
With 13 tools spanning three related enterprise AI and mainframe domains, the count is well within the ideal range. Each tool handles a distinct operation without redundancy or excessive granularity, making the set easy to learn and use.
Each sub-domain has solid coverage: watsonx generation, chat, embeddings, and model listing; key management covers CRUD plus wrap/unwrap; z/OS Connect supports listing, fetching specs, and calling services. Minor gaps like key rotation or service deployment exist, but the core workflows are fully supported.
Maintenance
Related MCP Connectors
Add any agent you deploy on ibl.ai to Claude Code, Cursor or Claude Desktop and talk to it there.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Connect Claude to Fathom meeting recordings, transcripts, and summaries
Connect assistants to your workspace knowledge, skills, and work tools.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceGives Claude access to multiple AI models (Gemini, OpenAI, OpenRouter, Ollama) for enhanced development capabilities including extended reasoning, collaborative development, code review, and advanced debugging.-
- FlicenseNot gradedqualityNot gradedmaintenanceEnables Claude to delegate tasks to IBM watsonx.ai foundation models (Granite, Llama, Mistral) for text generation, chat, embeddings, and document analysis. Supports two-agent architectures where Claude can leverage IBM's enterprise AI capabilities for specialized workloads.1-
- AlicenseNot gradedqualityDmaintenanceEnables Claude Code to consult Gemini for complex coding problems with session management, file attachments, and conversation persistence.106MIT
- FlicenseNot gradedqualityAmaintenanceEnables Claude Code to escalate complex code analysis to Google's Gemini AI for multi-model workflows, including AI-to-AI conversational debugging, execution tracing, cross-system impact analysis, performance bottleneck detection, and hypothesis testing over large codebases and traces.-