Wordware主控程序服务器添加福利群:解决AI开发者的「MCP实战痛点」Wordware MCP(主控程序)服务器允许您在本地运行Wordware应用程序。这使您可以直接将Wordware强大的AI流程集成到本地开发环境中,从而更轻松地测试和开发利用Wordware功能的应用程序。
npx wordware-mcp进行交互式安装过程最简单的方法是使用npx进行交互式安装过程:
npx wordware-mcp
这将引导您完成以下步骤:
npx命令将:
运行npx命令后,您可以使用以下命令启动MCP服务器:
npx wordware-mcp
如果您希望永久安装此软件包:
# Install globally from npm registry
npm install -g wordware-mcp
# Or install locally in your project
npm install wordware-mcp
# Or clone this repository and install globally
git clone https://github.com/yuhuangou/wordware-mcp.git
cd wordware-mcp
npm run install-global

在使用此软件包之前,您需要:
您可以不先安装就直接通过npx运行wordware-mcp:
# Interactive mode - will prompt for required information
npx wordware-mcp
# Or with command line parameters
npx wordware-mcp --api-key your-api-key --port 3000
# Start MCP server after configuration
npx wordware-mcp start

如果已全局安装,可以通过以下两种方式之一运行:
# Option 1: Create an .env file in your current directory first (see Configuration section)
wordware-mcp
# Option 2: Pass parameters directly via command line
wordware-mcp --api-key your-api-key --port 3000

Options: --api-key, -k <key> Wordware API key (required unless in .env file) --port, -p <port> Port to run the server on (default: 3000) --help, -h Show this help message
// In your script
import { startMCP } from "wordware-mcp";
// Start the MCP server
startMCP();

您可以采用以下两种方式之一配置MCP服务器:
创建一个包含以下变量的.env文件:
WORDWARE_API_KEY=your-api-key PORT=3000
运行命令时直接传递配置:
wordware-mcp -k your-api-key -p 3000
首先,您需要一个Wordware账户。前往wordware.ai,登录并创建账户。
为了让您的Wordware流程能够通过MCP访问,您需要创建一个API密钥。为此,请点击右上角的个人资料图片 > API keys > 创建新密钥 > 复制您的密钥。
现在是时候发挥创意了。为实现您的目标创建一个Wordware应用,或者随意从探索页面(https://app.wordware.ai/explore)分叉一个应用。
为了使您的应用能够被MCP触发,您需要将其部署。为此,请转到您的应用。您应该能在右上角看到一个“Deploy”按钮。然后转到部署页面。
app_id请注意,原文中具体的命令示例(如#0, #1等)没有给出具体的内容,所以在翻译时保持了这些占位符不变。如果有具体的命令内容,可以进一步补充完整。
在部署页面上,您会看到您的部署 URL:https://app.wordware.ai/explore/apps/{app_id}。从那里获取您的 app_id。
要将此 MCP 服务器与 Claude Desktop 一起使用:
确保已安装 Claude for Desktop
修改位于以下位置的 Claude 桌面配置文件:
~/Library/Application\ Support/Claude/claude_desktop_config.json
在文件中添加以下内容:
{
"mcpServers": {
"wordware": {
"command": "wordware-mcp"
}
}
}

这里是一个完整的工作流示例,以帮助您快速启动并运行:
# Run the interactive setup
npx wordware-mcp
# Follow the prompts to:
# - Enter your Wordware API key
# - Configure Claude integration (if desired)
# Once configured, start the server
npx wordware-mcp start

启动 MCP 服务器后,您的 Wordware 应用程序将在以下位置访问:
http://localhost:3000/api/run/{app_id}
您可以使用 HTTP 请求触发您的 Wordware 流程:
// Example: Calling your Wordware app from JavaScript
async function callWordwareApp() {
const response = await fetch("http://localhost:3000/api/run/your-app-id", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
// Your input data here
prompt: "Your prompt to the AI model",
// Any other parameters your Wordware app expects
}),
});
const result = await response.json();
console.log(result);
}

在开发过程中,您对 Wordware 应用程序所做的任何更改都会立即生效 - 只需刷新您的应用程序或发出新的 API 调用即可。
如果您想为这个包做出贡献:
# Clone the repository
git clone https://github.com/yuhuangou/wordware-mcp.git
cd wordware-mcp
# Install dependencies
npm install
# Build the package
npm run build
# Run in development mode
npm run dev

MIT
安装后出现“命令未找到”
如果您在使用 npx 安装后看到 command not found:
# 确保全局安装了该包
npm install -g wordware-mcp
# 检查您的 npm 全局路径是否在 PATH 中
npm config get prefix
# 如有需要,将结果路径 + /bin 添加到您的 PATH 中

配置问题
如果您的配置未被检测到:
# 检查当前目录下是否存在 .env 文件
ls -la .env
# 手动带参数运行以绕过 .env
npx wordware-mcp --api-key your-api-key

连接被拒绝错误
如果在尝试使用您的应用程序时遇到连接错误:
# 检查服务器是否正在运行
lsof -i :3000
# 以详细日志模式重启服务器
npx wordware-mcp start --verbose

权限问题
如果您遇到 npx 的权限错误:
# 使用 sudo 运行(不推荐作为永久解决方案)
sudo npx wordware-mcp
# 修复 npm 权限
chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

如需更多帮助,请在我们的 GitHub 仓库中提交一个问题。
可以在 .env 文件中设置以下环境变量:
PORT - 服务器运行的端口(默认:3000)WORDWARE_API_KEY - 您的 Wordware API 密钥