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 的对话、代码、嵌入、分析和预测工具。