@@ -20,7 +20,7 @@ coder login https://coder.example.com
20
20
21
21
# Configure Claude Desktop to use Coder MCP
22
22
coder exp mcp configure claude-desktop
23
- ```
23
+ ` ` ` txt
24
24
25
25
This command will:
26
26
- Locate your Claude Desktop configuration file
@@ -36,7 +36,7 @@ If automatic configuration doesn't work, you can manually set up MCP:
36
36
- ** Windows** : ` %APPDATA%\C laude\c laude_desktop_config.json`
37
37
- ** Linux** : ` ~/.config/Claude/claude_desktop_config.json`
38
38
39
- 2 . ** Add Coder MCP server configuration** :
39
+ 1 . ** Add Coder MCP server configuration** :
40
40
` ` ` json
41
41
{
42
42
" mcpServers" : {
@@ -49,7 +49,7 @@ If automatic configuration doesn't work, you can manually set up MCP:
49
49
}
50
50
```
51
51
52
- 3 . ** Restart Claude Desktop** to load the new configuration.
52
+ 1 . ** Restart Claude Desktop** to load the new configuration.
53
53
54
54
## Using Coder MCP with Claude Desktop
55
55
@@ -58,18 +58,21 @@ Once configured, Claude can interact with your Coder workspaces through MCP, pro
58
58
### Available Capabilities
59
59
60
60
** Workspace Management** :
61
+
61
62
- List and inspect your Coder workspaces
62
63
- Create new workspaces from templates
63
64
- Start, stop, and manage workspace lifecycle
64
65
- Monitor workspace status and resource usage
65
66
66
67
** Development Operations** :
68
+
67
69
- Execute commands in remote workspaces
68
70
- Run build scripts, tests, and deployment processes
69
71
- Install packages and manage dependencies
70
72
- Access workspace terminals and file systems
71
73
72
74
** AI-Assisted Development** :
75
+
73
76
- Analyze code in your actual development environments
74
77
- Generate code that works with your specific workspace setup
75
78
- Debug issues using live workspace context
@@ -78,43 +81,44 @@ Once configured, Claude can interact with your Coder workspaces through MCP, pro
78
81
### Example Interactions
79
82
80
83
** Project setup and initialization** :
81
- ```
84
+
85
+ ``` txt
82
86
You: "I need to set up a new Python web application with FastAPI. Can you create a workspace and set up the project structure?"
83
87
84
88
Claude: I'll help you create a new Coder workspace and set up a FastAPI project. Let me:
85
89
1. Create a new workspace using a Python template
86
- 2 . Install FastAPI and dependencies
87
- 3 . Set up the basic project structure
90
+ 1 . Install FastAPI and dependencies
91
+ 1 . Set up the basic project structure
88
92
4. Create a simple API endpoint to get you started
89
93
90
94
[Claude uses MCP to create workspace, install dependencies, and set up project]
91
- ```
95
+ ```txt
92
96
93
97
**Debugging and troubleshooting**:
94
- ```
98
+ ```txt
95
99
You: "My application in the backend workspace is failing to start. Can you help me debug it?"
96
100
97
101
Claude: I'll help you debug the startup issue. Let me:
98
102
1. Check the workspace status
99
- 2 . Examine the application logs
100
- 3 . Verify the configuration
103
+ 1 . Examine the application logs
104
+ 1 . Verify the configuration
101
105
4. Identify and fix the issue
102
106
103
107
[Claude uses MCP to access workspace, check logs, and diagnose the problem]
104
- ```
108
+ ```txt
105
109
106
110
**Code review and optimization**:
107
- ```
111
+ ```txt
108
112
You: "Can you review the code in my frontend workspace and suggest improvements?"
109
113
110
114
Claude: I'll review your frontend code and provide suggestions. Let me:
111
115
1. Access your workspace and examine the codebase
112
- 2 . Analyze the code structure and patterns
113
- 3 . Identify potential improvements
116
+ 1 . Analyze the code structure and patterns
117
+ 1 . Identify potential improvements
114
118
4. Suggest specific optimizations
115
119
116
120
[Claude uses MCP to access code and provide detailed review]
117
- ```
121
+ ```txt
118
122
119
123
## Claude Desktop-Specific Features
120
124
@@ -159,7 +163,7 @@ Customize the MCP server behavior for Claude Desktop:
159
163
}
160
164
}
161
165
}
162
- ```
166
+ ```txt
163
167
164
168
### Environment Variables
165
169
@@ -174,7 +178,7 @@ export CODER_MCP_TIMEOUT=120s
174
178
175
179
# Start Claude Desktop with custom environment
176
180
open -a "Claude Desktop"
177
- ```
181
+ ```txt
178
182
179
183
## Troubleshooting
180
184
@@ -186,54 +190,59 @@ open -a "Claude Desktop"
186
190
coder workspaces list
187
191
```
188
192
189
- 2 . ** Test MCP server manually** :
193
+ 1 . ** Test MCP server manually** :
194
+
190
195
``` bash
191
196
coder exp mcp server --log-level debug
192
197
```
193
198
194
- 3 . ** Check Claude Desktop configuration** :
199
+ 1 . ** Check Claude Desktop configuration** :
195
200
- Verify the configuration file exists and has correct syntax
196
201
- Ensure the file path is correct for your operating system
197
202
- Check Claude Desktop's logs for MCP-related errors
198
203
199
204
### Claude Not Recognizing MCP Tools
200
205
201
206
1 . ** Restart Claude Desktop** : A full restart is often needed after configuration changes
202
- 2 . ** Check MCP server status** : Ensure the MCP server is running and accessible
203
- 3 . ** Verify permissions** : Ensure Claude Desktop has necessary permissions to execute the Coder CLI
207
+ 1 . ** Check MCP server status** : Ensure the MCP server is running and accessible
208
+ 1 . ** Verify permissions** : Ensure Claude Desktop has necessary permissions to execute the Coder CLI
204
209
205
210
### Performance Issues
206
211
207
212
1 . ** Optimize workspace resources** : Ensure workspaces have adequate resources
208
- 2 . ** Check network connectivity** : Verify stable connection to your Coder deployment
209
- 3 . ** Monitor MCP timeouts** : Adjust timeout settings for long-running operations
213
+ 1 . ** Check network connectivity** : Verify stable connection to your Coder deployment
214
+ 1 . ** Monitor MCP timeouts** : Adjust timeout settings for long-running operations
210
215
211
216
### Authentication Problems
212
217
213
218
1 . ** Re-authenticate with Coder** :
219
+
214
220
``` bash
215
221
coder login https://coder.example.com
216
222
```
217
223
218
- 2 . ** Check token expiration** : Verify your Coder authentication token is still valid
219
- 3 . ** Verify permissions** : Ensure your user has appropriate workspace permissions
224
+ 1 . ** Check token expiration** : Verify your Coder authentication token is still valid
225
+ 1 . ** Verify permissions** : Ensure your user has appropriate workspace permissions
220
226
221
227
## Best Practices
222
228
223
229
### Security
230
+
224
231
- Keep your Coder CLI credentials secure and up to date
225
232
- Use workspace templates with appropriate security configurations
226
233
- Regularly review Claude's access to your workspaces
227
234
- Enable audit logging for compliance and monitoring
228
235
- Implement proper secret management in workspaces
229
236
230
237
### Effective AI Interaction
238
+
231
239
- Be specific about which workspace you want Claude to work with
232
240
- Provide context about your project goals and constraints
233
241
- Ask Claude to explain its actions when working with your workspaces
234
242
- Use iterative conversations to refine development tasks
235
243
236
244
### Development Workflow
245
+
237
246
- Create standardized workspace templates for different project types
238
247
- Use consistent naming conventions for workspaces and projects
239
248
- Establish clear boundaries for what Claude should and shouldn't modify
@@ -270,7 +279,7 @@ resource "coder_workspace" "claude_dev" {
270
279
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
271
280
EOF
272
281
}
273
- ```
282
+ ```txt
274
283
275
284
### Automated Workflows
276
285
@@ -293,7 +302,7 @@ coder ssh my-project -- 'echo "Workspace ready"'
293
302
coder ssh my-project -- 'git init && npm init -y'
294
303
295
304
echo "Project setup complete!"
296
- ```
305
+ ```txt
297
306
298
307
### Integration with Development Tools
299
308
@@ -315,8 +324,8 @@ Combine Claude Desktop with other development tools:
315
324
For Claude Desktop-specific MCP issues:
316
325
317
326
1. Check [Claude Desktop documentation](https://docs.anthropic.com/claude/docs/claude-desktop) for MCP support
318
- 2 . [ Contact Coder Support] ( https://coder.com/contact ) for Coder MCP server issues
319
- 3 . [ Join our Discord] ( https://discord.gg/coder ) for community support
327
+ 1 . [Contact Coder Support](https://coder.com/contact) for Coder MCP server issues
328
+ 1 . [Join our Discord](https://discord.gg/coder) for community support
320
329
4. [Report bugs](https://github.com/coder/coder/issues) on the Coder GitHub repository
321
330
5. Contact [Anthropic Support](https://support.anthropic.com/) for Claude Desktop-specific issues
322
331
0 commit comments