The Wordware MCP (Model Context Protocol) server enables you to run Wordware apps locally, integrating powerful AI flows directly into your development environment for easier testing and development of applications that use Wordware's capabilities.
The easiest way to get started is using the interactive installation process:
npx wordware-mcp
This guided process will help you:
After configuration, start the MCP server with:
npx wordware-mcp
If you prefer a permanent installation:
# Install globally
npm install -g wordware-mcp
# Or install locally in your project
npm install wordware-mcp
Before using this package, you need:
# Interactive mode with prompts
npx wordware-mcp
# With command line parameters
npx wordware-mcp --api-key your-api-key --port 3000
# Start the server after configuration
npx wordware-mcp start
If installed globally:
# Using a .env file in your current directory
wordware-mcp
# Or passing parameters directly
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();
Configure the MCP server using one of these methods:
Create a .env
file with:
WORDWARE_API_KEY=your-api-key
PORT=3000
wordware-mcp -k your-api-key -p 3000
Sign up at wordware.ai to create an account
https://app.wordware.ai/explore/apps/{app_id}
To integrate with Claude Desktop:
~/Library/Application\ Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"wordware": {
"command": "wordware-mcp"
}
}
}
# Run interactive setup
npx wordware-mcp
# Follow the prompts for configuration
# Start the server
npx wordware-mcp start
Once the server is running, access your Wordware apps at:
http://localhost:3000/api/run/{app_id}
Call your Wordware app via HTTP requests:
// 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({
prompt: "Your prompt to the AI model",
// Additional parameters your app needs
}),
});
const result = await response.json();
console.log(result);
}
Command Not Found After Installation
# Ensure the package is installed globally
npm install -g wordware-mcp
# Check your npm global path is in your PATH
npm config get prefix
# Add the resulting path + /bin to your PATH if needed
Configuration Not Detected
# Check if .env file exists
ls -la .env
# Run with explicit parameters
npx wordware-mcp --api-key your-api-key
Connection Refused Errors
# Check if server is running
lsof -i :3000
# Restart with verbose logging
npx wordware-mcp start --verbose
Permissions Issues
# Fix npm permissions
chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "wordware" '{"command":"wordware-mcp"}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"wordware": {
"command": "wordware-mcp"
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"wordware": {
"command": "wordware-mcp"
}
}
}
3. Restart Claude Desktop for the changes to take effect