#
tokens: 1877/50000 5/5 files
lines: on (toggle) GitHub
raw markdown copy reset
# Directory Structure

```
├── .gitignore
├── package.json
├── pnpm-lock.yaml
├── README.md
├── src
│   ├── config.ts
│   └── index.ts
└── tsconfig.json
```

# Files

--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------

```
1 | node_modules/
2 | build/
3 | *.log
4 | .env*
```

--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------

```markdown
  1 | # @kazuph/mcp-devin MCP Server with Slack Integration
  2 | 
  3 | MCP server for Devin AI with Slack integration
  4 | 
  5 | This is a TypeScript-based MCP server that provides integration between Devin AI and Slack. The server enables:
  6 | 
  7 | - Creating Devin sessions and automatically posting tasks to Slack
  8 | - Sending messages to Devin sessions and the corresponding Slack threads
  9 | - Managing sessions with enhanced Slack integration
 10 | 
 11 | ## Features
 12 | 
 13 | ### Slack Integration
 14 | - Automatically posts Devin tasks to Slack with `@Devin` mentions
 15 | - Maintains thread context between Devin sessions and Slack threads
 16 | - Uses Slack Bot token for authentication
 17 | 
 18 | ### Tools
 19 | - `create_devin_session` - Create a new Devin session and post to Slack
 20 |   - Posts task to a designated Slack channel with `@Devin` mention
 21 |   - Returns session details and Slack message information
 22 | - `send_message_to_session` - Send a message to a Devin session with optional Slack thread
 23 |   - Can simultaneously post to the Slack thread when provided
 24 | - `get_devin_session` - Get session details with optional Slack message history
 25 | - `list_devin_sessions` - List all Devin sessions
 26 | - `get_organization_info` - Get information about your Devin organization
 27 | 
 28 | ## Development
 29 | 
 30 | Install dependencies:
 31 | ```bash
 32 | pnpm install
 33 | ```
 34 | 
 35 | Build the server:
 36 | ```bash
 37 | pnpm run build
 38 | ```
 39 | 
 40 | For development with auto-rebuild:
 41 | ```bash
 42 | pnpm run watch
 43 | ```
 44 | 
 45 | ## Configuration
 46 | 
 47 | ### MCP Server Configuration
 48 | 
 49 | The server is configured through the MCP server configuration file. Add the following to your configuration:
 50 | 
 51 | ```json
 52 | "devin-mono": {
 53 |   "command": "node",
 54 |   "args": ["/path/to/mcp-devin/build/index.js"],
 55 |   "env": {
 56 |     "DEVIN_API_KEY": "your-devin-api-key",
 57 |     "DEVIN_ORG_NAME": "Your Organization",
 58 |     "SLACK_BOT_TOKEN": "xoxb-your-slack-bot-token",
 59 |     "SLACK_DEFAULT_CHANNEL": "general"
 60 |   }
 61 | }
 62 | ```
 63 | 
 64 | ### Required Environment Variables
 65 | 
 66 | The following environment variables must be set in the `env` section:
 67 | 
 68 | - `DEVIN_API_KEY`: Your Devin API key
 69 | - `DEVIN_ORG_NAME`: (Optional) Your organization name, defaults to "Default Organization"
 70 | - `DEVIN_BASE_URL`: (Optional) Base URL for the Devin API, defaults to "https://api.devin.ai/v1"
 71 | - `SLACK_BOT_TOKEN`: Your Slack Bot User OAuth Token (starts with xoxb-)
 72 | - `SLACK_DEFAULT_CHANNEL`: The default Slack channel where messages will be posted. You can use either:
 73 |   - Channel ID (e.g. `C123ABC456`)
 74 |   - Channel name (e.g. `general` or `#general`)
 75 | 
 76 | ## Installation
 77 | 
 78 | To use with Claude Desktop, add the server config:
 79 | 
 80 | On MacOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
 81 | On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
 82 | 
 83 | ```json
 84 | {
 85 |   "mcpServers": {
 86 |     "@kazuph/mcp-devin": {
 87 |       "command": "/path/to/@kazuph/mcp-devin/build/index.js"
 88 |     }
 89 |   }
 90 | }
 91 | ```
 92 | 
 93 | ### Debugging
 94 | 
 95 | Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector), which is available as a package script:
 96 | 
 97 | ```bash
 98 | pnpm run inspector
 99 | ```
100 | 
101 | The Inspector will provide a URL to access debugging tools in your browser.
102 | 
```

--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "compilerOptions": {
 3 |     "target": "ES2022",
 4 |     "module": "Node16",
 5 |     "moduleResolution": "Node16",
 6 |     "outDir": "./build",
 7 |     "rootDir": "./src",
 8 |     "strict": true,
 9 |     "esModuleInterop": true,
10 |     "skipLibCheck": true,
11 |     "forceConsistentCasingInFileNames": true
12 |   },
13 |   "include": ["src/**/*"],
14 |   "exclude": ["node_modules"]
15 | }
16 | 
```

--------------------------------------------------------------------------------
/src/config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | /**
 2 |  * Default configuration for MCP Devin with Slack integration
 3 |  * 
 4 |  * This file contains the default configuration values.
 5 |  * Configuration is primarily sourced from environment variables.
 6 |  */
 7 | 
 8 | const config = {
 9 |   // Devin API settings
10 |   devin: {
11 |     apiKey: process.env.DEVIN_API_KEY,
12 |     orgName: process.env.DEVIN_ORG_NAME || "Default Organization",
13 |     baseUrl: process.env.DEVIN_BASE_URL || "https://api.devin.ai/v1"
14 |   },
15 |   // Slack API settings
16 |   slack: {
17 |     token: process.env.SLACK_BOT_TOKEN,
18 |     defaultChannel: process.env.SLACK_DEFAULT_CHANNEL
19 |   }
20 | };
21 | 
22 | export default config;
23 | 
```

--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "name": "@kazuph/mcp-devin",
 3 |   "version": "0.1.0",
 4 |   "description": "mcp server for devin with Slack integration",
 5 |   "private": true,
 6 |   "type": "module",
 7 |   "bin": {
 8 |     "@kazuph/mcp-devin": "./build/index.js"
 9 |   },
10 |   "files": [
11 |     "build"
12 |   ],
13 |   "scripts": {
14 |     "build": "tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\"",
15 |     "prepare": "pnpm run build",
16 |     "watch": "tsc --watch",
17 |     "inspector": "npx @modelcontextprotocol/inspector build/index.js"
18 |   },
19 |   "dependencies": {
20 |     "@modelcontextprotocol/sdk": "0.6.0",
21 |     "@slack/web-api": "^6.13.0",
22 |     "axios": "^1.8.4",
23 |     "zod": "^3.24.2"
24 |   },
25 |   "devDependencies": {
26 |     "@types/node": "^20.11.24",
27 |     "typescript": "^5.3.3"
28 |   }
29 | }
30 | 
```