devin-workflow
Version:
~Devin AI workflow automation
200 lines (153 loc) • 4.6 kB
Markdown
# MCP Client Configuration Guide
This guide shows you how to configure various MCP clients to work with the Devin Workflow MCP Server.
## Claude Desktop Configuration
### 1. Install Claude Desktop
Download from: https://claude.ai/desktop
### 2. Configure MCP Server
Add this configuration to your Claude Desktop settings:
**Location**: `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)
```json
{
"mcpServers": {
"devin-workflow": {
"command": "node",
"args": ["src/index.js"],
"cwd": "/Users/telvin/Documents/www/devin-mind",
"env": {
"NODE_ENV": "production"
}
}
}
}
```
### 3. Restart Claude Desktop
After adding the configuration, restart Claude Desktop to load the MCP server.
### 4. Test the Connection
In Claude Desktop, you should now see the Devin Workflow tools available. Try:
```
Can you show me the available MCP tools?
```
## VS Code with MCP Extension
### 1. Install MCP Extension
Search for "Model Context Protocol" in VS Code extensions.
### 2. Configure Workspace
Create `.vscode/settings.json` in your project:
```json
{
"mcp.servers": {
"devin-workflow": {
"command": "node",
"args": ["src/index.js"],
"cwd": "${workspaceFolder}",
"env": {
"NODE_ENV": "development"
}
}
}
}
```
## Cursor IDE Configuration
### 1. Open Cursor Settings
Go to Settings > Extensions > MCP
### 2. Add Server Configuration
```json
{
"devin-workflow": {
"command": "node src/index.js",
"cwd": "/Users/telvin/Documents/www/devin-mind"
}
}
```
## Manual Testing with MCP Client
### 1. Install MCP Inspector (Development Tool)
```bash
npm install -g @modelcontextprotocol/inspector
```
### 2. Test Your Server
```bash
cd /Users/telvin/Documents/www/devin-mind
mcp-inspector src/index.js
```
This opens a web interface to test your MCP tools directly.
## Using the Tools
Once configured, you can use these tools in your MCP client:
### Parse a Workflow
```
Use the parse_workflow tool with this markdown:
## Step 1 ##
- Playbook: code-review
- Prompt: Review the security of this authentication system
- Handoff: Provide security assessment report
## Step 2 ##
- RelyPreviousStep: yes
- Prompt: Create fixes for any security issues found
- Handoff: Provide updated secure code
```
### Execute a Complete Workflow
```
Use the execute_workflow tool to run the entire workflow above with:
- api_key: "your-devin-api-key"
- polling_interval: 10
```
### Create Individual Sessions
```
Use create_devin_session with:
- api_key: "your-devin-api-key"
- prompt: "Review this pull request for security issues"
- playbook_id: "security-review"
- title: "PR Security Review"
```
## Environment Variables
You can set these environment variables for easier configuration:
```bash
export DEVIN_API_KEY="your-api-key-here"
export MCP_SERVER_PORT="3000"
export NODE_ENV="production"
```
## Troubleshooting
### Server Won't Start
1. Check Node.js version: `node --version` (needs >=18.0.0)
2. Verify dependencies: `npm install`
3. Check file permissions: `chmod +x src/index.js`
### Tools Not Appearing
1. Restart your MCP client completely
2. Check the configuration file syntax
3. Verify the file paths are correct
### API Connection Issues
1. Verify your Devin API key is valid
2. Check network connectivity
3. Use mock mode for testing: See test section below
## Testing Mode
For testing without a real Devin API key:
### 1. Start Mock Server
```bash
npm run mock-api
```
### 2. Run Tests
```bash
npm test
```
### 3. Configure for Mock Mode
When using the MCP tools, the server will automatically detect if the mock API is running and switch to mock mode.
## Example Workflow in Claude Desktop
Once configured, you can ask Claude:
> "I need to review a pull request for security issues and then create documentation for any fixes. Can you help me set up a Devin workflow for this?"
Claude will then use the MCP tools to:
1. Parse your workflow requirements
2. Create the structured workflow
3. Execute it using Devin (or mock for testing)
4. Return the results
## Advanced Configuration
### Custom Polling Intervals
```
Use configure_polling tool:
- interval: 15 (seconds)
- timeout: 600 (seconds)
```
### Step-by-Step Execution
Instead of execute_workflow, you can run steps individually:
1. `create_devin_session` - Create session
2. `get_session_status` - Check completion
3. `chat_devin_session` - Send handoff instruction
4. `get_session_status` - Check final completion
This gives you more control over the workflow execution process.