io.github.ExpertVagabond/watsonx
编码与调试by expertvagabond
用于 Claude 集成的 IBM watsonx.ai MCP 服务器,帮助安全调用企业级 AI 能力。
什么是 io.github.ExpertVagabond/watsonx?
用于 Claude 集成的 IBM watsonx.ai MCP 服务器,帮助安全调用企业级 AI 能力。
README
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
Available Tools
| Tool | Description |
|---|---|
watsonx_generate | Generate text using watsonx.ai models |
watsonx_chat | Chat with watsonx.ai models |
watsonx_embeddings | Generate text embeddings |
watsonx_list_models | List available models |
Setup
1. Install Dependencies
cd ~/watsonx-mcp-server
npm install
2. 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 ID
Note: 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 alive
Available 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 Models
Two-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 Connect
Demo 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.sh
Embedding 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 stats
Batch 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 10
Categories: 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
常见问题
io.github.ExpertVagabond/watsonx 是什么?
用于 Claude 集成的 IBM watsonx.ai MCP 服务器,帮助安全调用企业级 AI 能力。
相关 Skills
网页构建器
by anthropics
面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。
✎ 在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。
前端设计
by anthropics
面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。
✎ 想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。
网页应用测试
by anthropics
用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。
✎ 借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。
相关 MCP Server
GitHub
编辑精选by GitHub
GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。
✎ 这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。
Context7 文档查询
编辑精选by Context7
Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。
✎ 它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。
by tldraw
tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。
✎ 这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。