@trayai/mcp-setup
v1.1.1
Published
Setup script for Tray.ai MCP server with Claude Desktop, Cursor, VS Code and Windsurf
Readme
Tray.ai MCP Setup
Setup script for configuring the Tray.ai MCP (Model Context Protocol) server with Claude Desktop.
Installation & Usage
Method 1: Interactive Step-by-Step Setup (Recommended)
Run the command without arguments for a guided step-by-step setup:
npx @trayai/mcp-setupThis will:
- Prompt you for your Tray.ai Workspace ID
- Validate the UUID format
- Prompt you for your Tray.ai API Token
- Ask you to choose a server name (or use the default)
- Configure Claude Desktop automatically
- Remind you to restart Claude Desktop
This will:
- Prompt you for your Tray.ai Workspace ID
- Prompt you for your Tray.ai API Token
- Optionally let you customize the server name
- Automatically configure Claude Desktop
- Remind you to restart Claude Desktop
Method 2: Simple Setup Command
Use a simple setup command similar to Rube's format:
npx @trayai/mcp-setup setup <WORKSPACE_ID> <API_TOKEN> [SERVER_NAME]Example:
npx @trayai/mcp-setup setup 12345678-abcd-1234-ef56-0123456789ab myApiToken my-workspaceMethod 3: CLI Mode (Advanced)
For automation or scripting, use CLI mode with named arguments:
npx @trayai/mcp-setup --workspace-id <UUID> --api-token <TOKEN>CLI Options:
--workspace-id, -w: Your Tray.ai Workspace ID (required)--api-token, -t: Your Tray.ai API Token (required)--name, -n: Custom server name (default:tray-workspace)--client, -c: Target client (currently onlyclaudesupported)--help, -h: Show help message
Example:
npx @trayai/mcp-setup \
--workspace-id 12345678-abcd-1234-ef56-0123456789ab \
--api-token tray_api_token_xxxxx \
--name my-workspaceMethod 4: Clone and Run Locally
git clone https://github.com/tray-ai/mcp-setup.git
cd mcp-setup
# Interactive mode
node index.js
# CLI mode
node cli.js --workspace-id <UUID> --api-token <TOKEN>Verify Your Setup
After running the setup, verify your configuration:
npx @trayai/mcp-setup test [SERVER_NAME]Or if cloned locally:
npm testPrerequisites
- Node.js: Version 14 or higher
- Claude Desktop: Installed on your system
- Tray.ai Account: With API access
Getting Your Credentials
Workspace ID
Your Workspace ID is the UUID found in your Tray.ai workspace URL:
https://app.tray.io/workspaces/12345678-abcd-1234-ef56-0123456789ab/...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is your Workspace IDAPI Token
To generate an API token:
- Log in to your Tray.ai account
- Navigate to Settings → API Tokens
- Click "Generate New Token"
- Copy the token (you won't be able to see it again)
Configuration Details
The setup script adds the following configuration to your Claude Desktop config file:
{
"mcpServers": {
"tray-workspace": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://api.tray.io/core/v1/workspaces/{WORKSPACE_ID}/mcp",
"--header",
"Authorization: Bearer ${TRAY_API_TOKEN}"
],
"env": {
"TRAY_API_TOKEN": "your-api-token"
}
}
}
}Config File Locations
The script automatically detects your operating system and updates the config file at:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
Features
- ✅ Interactive prompts for workspace ID and API token
- ✅ UUID validation for workspace ID
- ✅ Custom server name support
- ✅ Automatic config file detection
- ✅ Overwrites protection (asks before overwriting existing config)
- ✅ Cross-platform support (macOS, Windows, Linux)
- ✅ Creates config directory if it doesn't exist
Example Usage
$ npx @trayai/mcp-setup
🚀 Tray.ai MCP Server Setup
This script will configure the Tray.ai MCP server for Claude Desktop.
Enter your Tray.ai Workspace ID (UUID from URL): 12345678-abcd-1234-ef56-0123456789ab
Enter your Tray.ai API Token: tray_api_token_xxxxxxxxxxxxx
Enter a name for this MCP server (default: tray-workspace): my-tray-workspace
📝 Configuration file: /Users/username/Library/Application Support/Claude/claude_desktop_config.json
✅ Configuration successfully updated!
📦 Server "my-tray-workspace" has been added to your Claude Desktop config.
⚠️ Please restart Claude Desktop for the changes to take effect.Troubleshooting
"Invalid UUID format" error
Make sure you're entering the complete UUID from your workspace URL. It should be in the format:
12345678-abcd-1234-ef56-0123456789ab"Could not read existing config file" warning
This is normal if you haven't configured any MCP servers yet. The script will create a new config file for you.
Changes not taking effect
Make sure to restart Claude Desktop completely after running the setup script.
Permission errors
If you encounter permission errors when writing the config file, make sure you have write access to the Claude Desktop config directory.
Manual Configuration
If you prefer to configure manually, add the following to your claude_desktop_config.json:
{
"mcpServers": {
"tray-workspace": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://api.tray.io/core/v1/workspaces/YOUR_WORKSPACE_ID/mcp",
"--header",
"Authorization: Bearer ${TRAY_API_TOKEN}"
],
"env": {
"TRAY_API_TOKEN": "your-api-token-here"
}
}
}
}Replace:
YOUR_WORKSPACE_IDwith your actual workspace UUIDyour-api-token-herewith your actual API token
Security Notes
- Your API token is stored locally in the Claude Desktop config file
- The token is used as an environment variable and passed to the MCP server
- Never commit your
claude_desktop_config.jsonfile to version control - Keep your API token secure and rotate it regularly
Support
For issues related to:
- This setup script: Open an issue on GitHub
- Tray.ai MCP server: Contact Tray.ai support
- Claude Desktop: Contact Anthropic support
Future Enhancements
- [ ] Support for other MCP clients (beyond Claude Desktop)
- [ ] OAuth2 authentication support
- [ ] Multiple workspace configuration
- [ ] Environment-specific configurations
- [ ] Config validation and testing
License
MIT
