IBM watsonx.ai Granite
io.github.nirholas由 GitHub 帳號 nirholas 發布v0.2.2更新於 Oct 24, 2026
IBM watsonx.ai MCP by three.ws: chat, text generation, embeddings, and tokenization.
發布方自己的服務:Granite
概覽
本機 MCP 伺服器,讓助理呼叫 IBM watsonx.ai Granite 模型進行對話、文字生成、向量嵌入、分詞與預測。
- 可以做什麼
- 使用 watsonx.ai 基礎模型進行對話與文字生成,支援解碼參數並回傳 token 用量。為最多 1000 段文字批次產生嵌入向量。依模型分詞器計算 token 數量,並可選擇回傳 token 清單。對帶時間戳的數值序列執行零樣本時間序列預測。列出帳戶與區域可用的基礎模型,可依功能篩選。
- 適用情境
- 當你已有開通 watsonx.ai 的 IBM Cloud 帳戶,希望助理直接呼叫 Granite 模型完成對話、生成、嵌入、token 計數或短期預測,而不經過中介服務時使用。
- 執行需求
- 透過 npx 在本機執行,需要 Node.js 20 或更新版本。需要已開通 watsonx.ai 的 IBM Cloud 帳戶,在 WATSONX_API_KEY 提供 IBM Cloud API 金鑰,並在 WATSONX_PROJECT_ID 提供專案 ID,或在 WATSONX_SPACE_ID 提供空間 ID。選用變數可設定區域主機、模型 ID、API 版本與逾時。需要連線至 IBM Cloud 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 IBM watsonx.ai Granite,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
@three-ws/ibm-watsonx-mcp
MCP server for IBM watsonx.ai — chat, generation, embeddings, tokenization, forecasting, and model discovery, on your own IBM Cloud account.
[npm] [downloads] [license] [node] [MCP Registry] [three.ws]
Install · Quick start · Tools · Requirements · three.ws
A Model Context Protocol server that exposes IBM watsonx.ai — IBM Granite foundation models and anything else in your account — to MCP clients such as Claude Desktop, Claude Code, and Cursor. It talks directly to the watsonx.ai as-a-Service REST API with your own IBM Cloud credentials: it mints an IAM bearer token from your API key, caches it until just before expiry, and scopes every call to your project. No intermediary backend, no telemetry, no mock data.
Community-built and not affiliated with IBM. Registry name:
io.github.nirholas/ibm-watsonx.
Install
Run it directly with npx (no install needed):
Or install globally to get the ibm-watsonx-mcp binary on your PATH:
Quick start
With Claude Code, one command:
Or add the server to your MCP client config (claude_desktop_config.json, Cursor's mcp.json):
Restart the client and the six tools below appear. Inspect the surface manually with the MCP Inspector:
Tools
Every tool is a read-only model-inference call — nothing in your environment or IBM account is modified — and declares MCP tool annotations (readOnlyHint, openWorldHint, idempotentHint) so clients can reason about side effects.
Input parameters
watsonx_chat — messages (required: array of { role, content }, roles system/user/assistant), model, max_tokens (1–4096), temperature (0–2), top_p (0–1).
watsonx_generate — input (required), model, max_new_tokens (1–4096), temperature (0–2), decoding_method (greedy/sample), stop_sequences.
watsonx_embed — inputs (required: 1–1000 texts), model.
watsonx_tokenize — input (required), model, return_tokens (boolean).
watsonx_forecast — timestamps (required: ISO-8601, uniform cadence, oldest first), values (required: numeric, same length), freq (required: pandas cadence, e.g. 1h, 15min, 1D), model, target_column, prediction_length (1–96).
watsonx_list_models — filter (e.g. function_text_generation, function_embedding), limit (1–200, default 100).
Example calls
How auth works
WATSONX_API_KEY is exchanged for a short-lived IAM bearer token at https://iam.cloud.ibm.com/identity/token (grant_type=urn:ibm:params:oauth:grant-type:apikey). The token is cached in-process and refreshed about five minutes before it expires. Your API key never leaves your machine except in that single IAM exchange.
Requirements
- Node.js >= 20.
- An IBM Cloud account with watsonx.ai provisioned — sign up (free tier available).
- An IBM Cloud API key — create one at https://cloud.ibm.com/iam/apikeys.
- Your watsonx.ai project id — open the project → Manage → General → Project ID (or a deployment space id).
Environment variables
Regional hosts: us-south, eu-de, eu-gb, jp-tok, au-syd, ca-tor — e.g. https://eu-de.ml.cloud.ibm.com.
Related
@three-ws/ibm-x402-mcp— the same IBM Granite tools as pay-per-use x402 endpoints (USDC on Solana), so callers need no IBM account of their own.
Links
- Homepage: https://three.ws
- Changelog: https://three.ws/changelog
- Issues: https://github.com/nirholas/three.ws/issues
- License: Apache-2.0, see LICENSE
Part of the three.ws SDK suite — 3D AI agents, on-chain identity, and agent payments.
Website · Changelog · GitHub
來源:packages/ibm-watsonx-mcp/README.md,提交 c8f2cde
工具
0版本歷史
2- v0.2.2最新Oct 10, 2026
- v0.2.1Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Granite 整合
Granite
md.granite官方發布者
加密的 Markdown 筆記與團隊知識庫。在你允許的庫中搜索、閱讀和寫入筆記。AI 翻譯
IBM Granite x402 Remote
由 GitHub 帳號 nirholas 發布
遠端 MCP 伺服器,透過 x402 協定按次以 USDC 付費,提供 IBM Granite 對話、程式碼、嵌入、分析與預測工具。
IBM Granite via x402
由 GitHub 帳號 nirholas 發布
一個本機 MCP 伺服器,透過 x402 以 Solana 上的 USDC 按次計費,提供 IBM Granite 的對話、程式碼、嵌入、分析與預測工具。