@arikusi/deepseek-mcp-server 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,354 +1,469 @@
1
- # DeepSeek MCP Server
2
-
3
- [![npm version](https://img.shields.io/npm/v/@arikusi/deepseek-mcp-server.svg)](https://www.npmjs.com/package/@arikusi/deepseek-mcp-server)
4
- [![npm downloads](https://img.shields.io/npm/dm/@arikusi/deepseek-mcp-server.svg)](https://www.npmjs.com/package/@arikusi/deepseek-mcp-server)
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
- [![Node.js Version](https://img.shields.io/node/v/@arikusi/deepseek-mcp-server.svg)](https://nodejs.org/)
7
- [![TypeScript](https://img.shields.io/badge/TypeScript-5.7-blue.svg)](https://www.typescriptlang.org/)
8
- [![Build Status](https://github.com/arikusi/deepseek-mcp-server/workflows/CI/badge.svg)](https://github.com/arikusi/deepseek-mcp-server/actions)
9
-
10
- A Model Context Protocol (MCP) server that integrates DeepSeek AI models with MCP-compatible clients. Access DeepSeek's powerful chat and reasoning models directly from your development environment.
11
-
12
- **Compatible with:**
13
- - Claude Code CLI
14
- - Gemini CLI (if MCP support is available)
15
- - Any MCP-compatible client
16
-
17
- > **⚠️ Note**: This is an unofficial community project and is not affiliated with DeepSeek.
18
-
19
- ## Quick Start
20
-
21
- ### For Claude Code
22
-
23
- ```bash
24
- # Install and configure with API key (available in all projects)
25
- claude mcp add -s user deepseek npx @arikusi/deepseek-mcp-server -e DEEPSEEK_API_KEY=your-key-here
26
-
27
- # Or install for current project only
28
- claude mcp add deepseek npx @arikusi/deepseek-mcp-server -e DEEPSEEK_API_KEY=your-key-here
29
- ```
30
-
31
- **Scope options:**
32
- - `-s user`: Available in all your projects (recommended)
33
- - `-s local`: Only in current project (default)
34
- - `-s project`: Project-specific `.mcp.json` file
35
-
36
- ### For Gemini CLI
37
-
38
- ```bash
39
- # Install and configure with API key
40
- gemini mcp add deepseek npx @arikusi/deepseek-mcp-server -e DEEPSEEK_API_KEY=your-key-here
41
- ```
42
-
43
- **Get your API key:** [https://platform.deepseek.com](https://platform.deepseek.com)
44
-
45
- That's it! Your MCP client can now use DeepSeek models! 🎉
46
-
47
- ---
48
-
49
- ## Features
50
-
51
- - 🤖 **DeepSeek Chat**: Fast and capable general-purpose model
52
- - 🧠 **DeepSeek Reasoner (R1)**: Advanced reasoning with chain-of-thought explanations
53
- - 🔄 **Streaming Support**: Real-time response generation
54
- - 🛡️ **Type-Safe**: Full TypeScript implementation
55
- - 🎯 **MCP Compatible**: Works with any MCP-compatible CLI (Claude Code, Gemini CLI, etc.)
56
-
57
- ## Installation
58
-
59
- ### Prerequisites
60
-
61
- - Node.js 18+
62
- - A DeepSeek API key (get one at [https://platform.deepseek.com](https://platform.deepseek.com))
63
-
64
- ### Manual Installation
65
-
66
- If you prefer to install manually:
67
-
68
- ```bash
69
- npm install -g @arikusi/deepseek-mcp-server
70
- ```
71
-
72
- ### From Source
73
-
74
- 1. **Clone the repository**
75
-
76
- ```bash
77
- git clone https://github.com/arikusi/deepseek-mcp-server.git
78
- cd deepseek-mcp-server
79
- ```
80
-
81
- 2. **Install dependencies**
82
-
83
- ```bash
84
- npm install
85
- ```
86
-
87
- 3. **Build the project**
88
-
89
- ```bash
90
- npm run build
91
- ```
92
-
93
- ## Usage
94
-
95
- Once configured, your MCP client will have access to the `deepseek_chat` tool and can use DeepSeek models.
96
-
97
- **Example prompts:**
98
- ```
99
- "Use DeepSeek to explain quantum computing"
100
- "Ask DeepSeek Reasoner to solve: If I have 10 apples and buy 5 more..."
101
- ```
102
-
103
- Your MCP client will automatically call the `deepseek_chat` tool.
104
-
105
- ### Manual Configuration (Advanced)
106
-
107
- If your MCP client doesn't support the `add` command, manually add to your config file:
108
-
109
- ```json
110
- {
111
- "mcpServers": {
112
- "deepseek": {
113
- "command": "npx",
114
- "args": ["@arikusi/deepseek-mcp-server"],
115
- "env": {
116
- "DEEPSEEK_API_KEY": "your-api-key-here"
117
- }
118
- }
119
- }
120
- }
121
- ```
122
-
123
- **Config file locations:**
124
- - **Claude Code**: `~/.claude.json` (add to `projects["your-project-path"].mcpServers` section)
125
- - **Other MCP clients**: Check your client's documentation for config file location
126
-
127
- ## Available Tools
128
-
129
- ### `deepseek_chat`
130
-
131
- Chat with DeepSeek AI models.
132
-
133
- **Parameters:**
134
-
135
- - `messages` (required): Array of conversation messages
136
- - `role`: "system" | "user" | "assistant"
137
- - `content`: Message text
138
- - `model` (optional): "deepseek-chat" (default) or "deepseek-reasoner"
139
- - `temperature` (optional): 0-2, controls randomness (default: 1.0)
140
- - `max_tokens` (optional): Maximum tokens to generate
141
- - `stream` (optional): Enable streaming mode (default: false)
142
-
143
- **Example:**
144
-
145
- ```json
146
- {
147
- "messages": [
148
- {
149
- "role": "user",
150
- "content": "Explain the theory of relativity in simple terms"
151
- }
152
- ],
153
- "model": "deepseek-chat",
154
- "temperature": 0.7,
155
- "max_tokens": 1000
156
- }
157
- ```
158
-
159
- **DeepSeek Reasoner Example:**
160
-
161
- ```json
162
- {
163
- "messages": [
164
- {
165
- "role": "user",
166
- "content": "If I have 10 apples and eat 3, then buy 5 more, how many do I have?"
167
- }
168
- ],
169
- "model": "deepseek-reasoner"
170
- }
171
- ```
172
-
173
- The reasoner model will show its thinking process in `<thinking>` tags followed by the final answer.
174
-
175
- ## Models
176
-
177
- ### deepseek-chat
178
-
179
- - **Best for**: General conversations, coding, content generation
180
- - **Speed**: Fast
181
- - **Context**: 64K tokens
182
- - **Cost**: Most economical
183
-
184
- ### deepseek-reasoner (R1)
185
-
186
- - **Best for**: Complex reasoning, math, logic problems, multi-step tasks
187
- - **Speed**: Slower (shows thinking process)
188
- - **Context**: 64K tokens
189
- - **Special**: Provides chain-of-thought reasoning
190
- - **Output**: Both reasoning process and final answer
191
-
192
- ## Development
193
-
194
- ### Project Structure
195
-
196
- ```
197
- deepseek-mcp-server/
198
- ├── src/
199
- │ ├── index.ts # Main MCP server
200
- │ ├── deepseek-client.ts # DeepSeek API wrapper
201
- │ └── types.ts # TypeScript definitions
202
- ├── dist/ # Compiled JavaScript
203
- ├── package.json
204
- ├── tsconfig.json
205
- └── README.md
206
- ```
207
-
208
- ### Building
209
-
210
- ```bash
211
- npm run build
212
- ```
213
-
214
- ### Watch Mode (for development)
215
-
216
- ```bash
217
- npm run watch
218
- ```
219
-
220
- ### Testing Locally
221
-
222
- ```bash
223
- # Set API key
224
- export DEEPSEEK_API_KEY="your-key"
225
-
226
- # Run the server
227
- npm start
228
- ```
229
-
230
- The server will start and wait for MCP client connections via stdio.
231
-
232
- ## Troubleshooting
233
-
234
- ### "DEEPSEEK_API_KEY environment variable is not set"
235
-
236
- **Option 1: Use the correct installation command**
237
- ```bash
238
- # Make sure to include -e flag with your API key
239
- claude mcp add deepseek npx @arikusi/deepseek-mcp-server -e DEEPSEEK_API_KEY=your-key-here
240
- ```
241
-
242
- **Option 2: Manually edit the config file**
243
-
244
- If you already installed without the API key, edit your config file:
245
-
246
- 1. **For Claude Code**: Open `~/.claude.json` (Windows: `C:\Users\USERNAME\.claude.json`)
247
- 2. Find the `"mcpServers"` section under your project path
248
- 3. Add the `env` field with your API key:
249
- ```json
250
- "deepseek": {
251
- "type": "stdio",
252
- "command": "npx",
253
- "args": ["@arikusi/deepseek-mcp-server"],
254
- "env": {
255
- "DEEPSEEK_API_KEY": "your-api-key-here"
256
- }
257
- }
258
- ```
259
- 4. Save and restart Claude Code
260
-
261
- ### "Failed to connect to DeepSeek API"
262
-
263
- 1. Check your API key is valid
264
- 2. Verify you have internet connection
265
- 3. Check DeepSeek API status at [https://status.deepseek.com](https://status.deepseek.com)
266
-
267
- ### Server not appearing in your MCP client
268
-
269
- 1. Verify the path to `dist/index.js` is correct
270
- 2. Make sure you ran `npm run build`
271
- 3. Check your MCP client's logs for errors
272
- 4. Restart your MCP client completely
273
-
274
- ### Permission Denied on macOS/Linux
275
-
276
- Make the file executable:
277
-
278
- ```bash
279
- chmod +x dist/index.js
280
- ```
281
-
282
- ## Publishing to npm
283
-
284
- To share this MCP server with others:
285
-
286
- 1. Run `npm login`
287
- 2. Run `npm publish --access public`
288
-
289
- Users can then install with:
290
-
291
- ```bash
292
- npm install -g @arikusi/deepseek-mcp-server
293
- ```
294
-
295
- ## Contributing
296
-
297
- Contributions are welcome! Please read our [Contributing Guidelines](CONTRIBUTING.md) before submitting PRs.
298
-
299
- ### Reporting Issues
300
-
301
- Found a bug or have a feature request? Please [open an issue](https://github.com/arikusi/deepseek-mcp-server/issues/new/choose) using our templates.
302
-
303
- ### Development
304
-
305
- ```bash
306
- # Clone the repo
307
- git clone https://github.com/arikusi/deepseek-mcp-server.git
308
- cd deepseek-mcp-server
309
-
310
- # Install dependencies
311
- npm install
312
-
313
- # Build in watch mode
314
- npm run watch
315
-
316
- # Run tests
317
- npm test
318
-
319
- # Lint
320
- npm run lint
321
- ```
322
-
323
- ## Changelog
324
-
325
- See [CHANGELOG.md](CHANGELOG.md) for version history and updates.
326
-
327
- ## License
328
-
329
- MIT License - see [LICENSE](LICENSE) file for details
330
-
331
- ## Support
332
-
333
- - 📖 [Documentation](https://github.com/arikusi/deepseek-mcp-server#readme)
334
- - 🐛 [Bug Reports](https://github.com/arikusi/deepseek-mcp-server/issues)
335
- - 💬 [Discussions](https://github.com/arikusi/deepseek-mcp-server/discussions)
336
- - 📧 Contact: [GitHub Issues](https://github.com/arikusi/deepseek-mcp-server/issues)
337
-
338
- ## Resources
339
-
340
- - [DeepSeek Platform](https://platform.deepseek.com) - Get your API key
341
- - [Model Context Protocol](https://modelcontextprotocol.io) - MCP specification
342
- - [DeepSeek API Documentation](https://api-docs.deepseek.com) - API reference
343
-
344
- ## Acknowledgments
345
-
346
- - Built with [Model Context Protocol SDK](https://github.com/modelcontextprotocol/typescript-sdk)
347
- - Uses [OpenAI SDK](https://github.com/openai/openai-node) for API compatibility
348
- - Created for the MCP community
349
-
350
- ---
351
-
352
- **Made with ❤️ by [@arikusi](https://github.com/arikusi)**
353
-
354
- This is an unofficial community project and is not affiliated with DeepSeek.
1
+ # DeepSeek MCP Server
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@arikusi/deepseek-mcp-server.svg)](https://www.npmjs.com/package/@arikusi/deepseek-mcp-server)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@arikusi/deepseek-mcp-server.svg)](https://www.npmjs.com/package/@arikusi/deepseek-mcp-server)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+ [![Node.js Version](https://img.shields.io/node/v/@arikusi/deepseek-mcp-server.svg)](https://nodejs.org/)
7
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.7-blue.svg)](https://www.typescriptlang.org/)
8
+ [![Build Status](https://github.com/arikusi/deepseek-mcp-server/workflows/CI/badge.svg)](https://github.com/arikusi/deepseek-mcp-server/actions)
9
+
10
+ A Model Context Protocol (MCP) server that integrates DeepSeek AI models with MCP-compatible clients. Access DeepSeek's powerful chat and reasoning models directly from your development environment.
11
+
12
+ **Compatible with:**
13
+ - Claude Code CLI
14
+ - Gemini CLI (if MCP support is available)
15
+ - Any MCP-compatible client
16
+
17
+ > **Note**: This is an unofficial community project and is not affiliated with DeepSeek.
18
+
19
+ ## Quick Start
20
+
21
+ ### For Claude Code
22
+
23
+ ```bash
24
+ # Install and configure with API key (available in all projects)
25
+ claude mcp add -s user deepseek npx @arikusi/deepseek-mcp-server -e DEEPSEEK_API_KEY=your-key-here
26
+
27
+ # Or install for current project only
28
+ claude mcp add deepseek npx @arikusi/deepseek-mcp-server -e DEEPSEEK_API_KEY=your-key-here
29
+ ```
30
+
31
+ **Scope options:**
32
+ - `-s user`: Available in all your projects (recommended)
33
+ - `-s local`: Only in current project (default)
34
+ - `-s project`: Project-specific `.mcp.json` file
35
+
36
+ ### For Gemini CLI
37
+
38
+ ```bash
39
+ # Install and configure with API key
40
+ gemini mcp add deepseek npx @arikusi/deepseek-mcp-server -e DEEPSEEK_API_KEY=your-key-here
41
+ ```
42
+
43
+ **Get your API key:** [https://platform.deepseek.com](https://platform.deepseek.com)
44
+
45
+ That's it! Your MCP client can now use DeepSeek models!
46
+
47
+ ---
48
+
49
+ ## Features
50
+
51
+ - **DeepSeek Chat**: Fast and capable general-purpose model
52
+ - **DeepSeek Reasoner (R1)**: Advanced reasoning with chain-of-thought explanations
53
+ - **Function Calling**: OpenAI-compatible tool use with up to 128 tool definitions
54
+ - **Cost Tracking**: Automatic cost calculation for every request (USD)
55
+ - **Configurable**: Environment-based configuration with validation
56
+ - **12 Prompt Templates**: Pre-built templates for debugging, code review, function calling, and more
57
+ - **Streaming Support**: Real-time response generation
58
+ - **Tested**: 85 tests with 80%+ code coverage
59
+ - **Type-Safe**: Full TypeScript implementation
60
+ - **MCP Compatible**: Works with any MCP-compatible CLI (Claude Code, Gemini CLI, etc.)
61
+
62
+ ## Installation
63
+
64
+ ### Prerequisites
65
+
66
+ - Node.js 18+
67
+ - A DeepSeek API key (get one at [https://platform.deepseek.com](https://platform.deepseek.com))
68
+
69
+ ### Manual Installation
70
+
71
+ If you prefer to install manually:
72
+
73
+ ```bash
74
+ npm install -g @arikusi/deepseek-mcp-server
75
+ ```
76
+
77
+ ### From Source
78
+
79
+ 1. **Clone the repository**
80
+
81
+ ```bash
82
+ git clone https://github.com/arikusi/deepseek-mcp-server.git
83
+ cd deepseek-mcp-server
84
+ ```
85
+
86
+ 2. **Install dependencies**
87
+
88
+ ```bash
89
+ npm install
90
+ ```
91
+
92
+ 3. **Build the project**
93
+
94
+ ```bash
95
+ npm run build
96
+ ```
97
+
98
+ ## Usage
99
+
100
+ Once configured, your MCP client will have access to the `deepseek_chat` tool and can use DeepSeek models.
101
+
102
+ **Example prompts:**
103
+ ```
104
+ "Use DeepSeek to explain quantum computing"
105
+ "Ask DeepSeek Reasoner to solve: If I have 10 apples and buy 5 more..."
106
+ ```
107
+
108
+ Your MCP client will automatically call the `deepseek_chat` tool.
109
+
110
+ ### Manual Configuration (Advanced)
111
+
112
+ If your MCP client doesn't support the `add` command, manually add to your config file:
113
+
114
+ ```json
115
+ {
116
+ "mcpServers": {
117
+ "deepseek": {
118
+ "command": "npx",
119
+ "args": ["@arikusi/deepseek-mcp-server"],
120
+ "env": {
121
+ "DEEPSEEK_API_KEY": "your-api-key-here"
122
+ }
123
+ }
124
+ }
125
+ }
126
+ ```
127
+
128
+ **Config file locations:**
129
+ - **Claude Code**: `~/.claude.json` (add to `projects["your-project-path"].mcpServers` section)
130
+ - **Other MCP clients**: Check your client's documentation for config file location
131
+
132
+ ## Available Tools
133
+
134
+ ### `deepseek_chat`
135
+
136
+ Chat with DeepSeek AI models with automatic cost tracking and function calling support.
137
+
138
+ **Parameters:**
139
+
140
+ - `messages` (required): Array of conversation messages
141
+ - `role`: "system" | "user" | "assistant" | "tool"
142
+ - `content`: Message text
143
+ - `tool_call_id` (optional): Required for tool role messages
144
+ - `model` (optional): "deepseek-chat" (default) or "deepseek-reasoner"
145
+ - `temperature` (optional): 0-2, controls randomness (default: 1.0)
146
+ - `max_tokens` (optional): Maximum tokens to generate
147
+ - `stream` (optional): Enable streaming mode (default: false)
148
+ - `tools` (optional): Array of tool definitions for function calling (max 128)
149
+ - `tool_choice` (optional): "auto" | "none" | "required" | `{type: "function", function: {name: "..."}}`
150
+
151
+ **Response includes:**
152
+ - Content with formatting
153
+ - Function call results (if tools were used)
154
+ - Request information (tokens, model, cost in USD)
155
+ - Structured data with `cost_usd` and `tool_calls` fields
156
+
157
+ **Example:**
158
+
159
+ ```json
160
+ {
161
+ "messages": [
162
+ {
163
+ "role": "user",
164
+ "content": "Explain the theory of relativity in simple terms"
165
+ }
166
+ ],
167
+ "model": "deepseek-chat",
168
+ "temperature": 0.7,
169
+ "max_tokens": 1000
170
+ }
171
+ ```
172
+
173
+ **DeepSeek Reasoner Example:**
174
+
175
+ ```json
176
+ {
177
+ "messages": [
178
+ {
179
+ "role": "user",
180
+ "content": "If I have 10 apples and eat 3, then buy 5 more, how many do I have?"
181
+ }
182
+ ],
183
+ "model": "deepseek-reasoner"
184
+ }
185
+ ```
186
+
187
+ The reasoner model will show its thinking process in `<thinking>` tags followed by the final answer.
188
+
189
+ **Function Calling Example:**
190
+
191
+ ```json
192
+ {
193
+ "messages": [
194
+ {
195
+ "role": "user",
196
+ "content": "What's the weather in Istanbul?"
197
+ }
198
+ ],
199
+ "tools": [
200
+ {
201
+ "type": "function",
202
+ "function": {
203
+ "name": "get_weather",
204
+ "description": "Get current weather for a location",
205
+ "parameters": {
206
+ "type": "object",
207
+ "properties": {
208
+ "location": {
209
+ "type": "string",
210
+ "description": "City name"
211
+ }
212
+ },
213
+ "required": ["location"]
214
+ }
215
+ }
216
+ }
217
+ ],
218
+ "tool_choice": "auto"
219
+ }
220
+ ```
221
+
222
+ When the model decides to call a function, the response includes `tool_calls` with the function name and arguments. You can then send the result back using a `tool` role message with the matching `tool_call_id`.
223
+
224
+ ## Available Prompts
225
+
226
+ Pre-built prompt templates for common tasks (12 total):
227
+
228
+ ### Core Reasoning
229
+ - **debug_with_reasoning**: Debug code with step-by-step analysis
230
+ - **code_review_deep**: Comprehensive code review (security, performance, quality)
231
+ - **research_synthesis**: Research topics and create structured reports
232
+ - **strategic_planning**: Create strategic plans with reasoning
233
+ - **explain_like_im_five**: Explain complex topics in simple terms
234
+
235
+ ### Advanced
236
+ - **mathematical_proof**: Prove mathematical statements rigorously
237
+ - **argument_validation**: Analyze arguments for logical fallacies
238
+ - **creative_ideation**: Generate creative ideas with feasibility analysis
239
+ - **cost_comparison**: Compare LLM costs for tasks
240
+ - **pair_programming**: Interactive coding with explanations
241
+
242
+ ### Function Calling
243
+ - **function_call_debug**: Debug function calling issues with tool definitions and messages
244
+ - **create_function_schema**: Generate JSON Schema for function calling from natural language
245
+
246
+ Each prompt is optimized for the DeepSeek Reasoner model to provide detailed reasoning.
247
+
248
+ ## Models
249
+
250
+ ### deepseek-chat
251
+
252
+ - **Best for**: General conversations, coding, content generation
253
+ - **Speed**: Fast
254
+ - **Context**: 64K tokens
255
+ - **Cost**: Most economical
256
+
257
+ ### deepseek-reasoner (R1)
258
+
259
+ - **Best for**: Complex reasoning, math, logic problems, multi-step tasks
260
+ - **Speed**: Slower (shows thinking process)
261
+ - **Context**: 64K tokens
262
+ - **Special**: Provides chain-of-thought reasoning
263
+ - **Output**: Both reasoning process and final answer
264
+
265
+ ## Configuration
266
+
267
+ The server is configured via environment variables. All settings except `DEEPSEEK_API_KEY` are optional.
268
+
269
+ | Variable | Default | Description |
270
+ |----------|---------|-------------|
271
+ | `DEEPSEEK_API_KEY` | (required) | Your DeepSeek API key |
272
+ | `DEEPSEEK_BASE_URL` | `https://api.deepseek.com` | Custom API endpoint |
273
+ | `SHOW_COST_INFO` | `true` | Show cost info in responses |
274
+ | `REQUEST_TIMEOUT` | `60000` | Request timeout in milliseconds |
275
+ | `MAX_RETRIES` | `2` | Maximum retry count for failed requests |
276
+
277
+ **Example with custom config:**
278
+ ```bash
279
+ claude mcp add -s user deepseek npx @arikusi/deepseek-mcp-server \
280
+ -e DEEPSEEK_API_KEY=your-key \
281
+ -e SHOW_COST_INFO=false \
282
+ -e REQUEST_TIMEOUT=30000
283
+ ```
284
+
285
+ ## Development
286
+
287
+ ### Project Structure
288
+
289
+ ```
290
+ deepseek-mcp-server/
291
+ ├── src/
292
+ │ ├── index.ts # Main MCP server, tool & prompt registration
293
+ │ ├── deepseek-client.ts # DeepSeek API wrapper (OpenAI SDK)
294
+ │ ├── config.ts # Centralized config with Zod validation
295
+ │ ├── cost.ts # Cost calculation and formatting
296
+ │ ├── schemas.ts # Zod input validation schemas
297
+ │ ├── types.ts # TypeScript type definitions
298
+ │ ├── config.test.ts # Config tests
299
+ │ ├── cost.test.ts # Cost tests
300
+ │ ├── schemas.test.ts # Schema validation tests
301
+ │ ├── deepseek-client.test.ts # Client tests
302
+ │ └── function-calling.test.ts # Function calling tests
303
+ ├── dist/ # Compiled JavaScript
304
+ ├── vitest.config.ts # Test configuration
305
+ ├── package.json
306
+ ├── tsconfig.json
307
+ └── README.md
308
+ ```
309
+
310
+ ### Building
311
+
312
+ ```bash
313
+ npm run build
314
+ ```
315
+
316
+ ### Watch Mode (for development)
317
+
318
+ ```bash
319
+ npm run watch
320
+ ```
321
+
322
+ ### Testing
323
+
324
+ ```bash
325
+ # Run all tests
326
+ npm test
327
+
328
+ # Watch mode
329
+ npm run test:watch
330
+
331
+ # With coverage report
332
+ npm run test:coverage
333
+ ```
334
+
335
+ ### Testing Locally
336
+
337
+ ```bash
338
+ # Set API key
339
+ export DEEPSEEK_API_KEY="your-key"
340
+
341
+ # Run the server
342
+ npm start
343
+ ```
344
+
345
+ The server will start and wait for MCP client connections via stdio.
346
+
347
+ ## Troubleshooting
348
+
349
+ ### "DEEPSEEK_API_KEY environment variable is not set"
350
+
351
+ **Option 1: Use the correct installation command**
352
+ ```bash
353
+ # Make sure to include -e flag with your API key
354
+ claude mcp add deepseek npx @arikusi/deepseek-mcp-server -e DEEPSEEK_API_KEY=your-key-here
355
+ ```
356
+
357
+ **Option 2: Manually edit the config file**
358
+
359
+ If you already installed without the API key, edit your config file:
360
+
361
+ 1. **For Claude Code**: Open `~/.claude.json` (Windows: `C:\Users\USERNAME\.claude.json`)
362
+ 2. Find the `"mcpServers"` section under your project path
363
+ 3. Add the `env` field with your API key:
364
+ ```json
365
+ "deepseek": {
366
+ "type": "stdio",
367
+ "command": "npx",
368
+ "args": ["@arikusi/deepseek-mcp-server"],
369
+ "env": {
370
+ "DEEPSEEK_API_KEY": "your-api-key-here"
371
+ }
372
+ }
373
+ ```
374
+ 4. Save and restart Claude Code
375
+
376
+ ### "Failed to connect to DeepSeek API"
377
+
378
+ 1. Check your API key is valid
379
+ 2. Verify you have internet connection
380
+ 3. Check DeepSeek API status at [https://status.deepseek.com](https://status.deepseek.com)
381
+
382
+ ### Server not appearing in your MCP client
383
+
384
+ 1. Verify the path to `dist/index.js` is correct
385
+ 2. Make sure you ran `npm run build`
386
+ 3. Check your MCP client's logs for errors
387
+ 4. Restart your MCP client completely
388
+
389
+ ### Permission Denied on macOS/Linux
390
+
391
+ Make the file executable:
392
+
393
+ ```bash
394
+ chmod +x dist/index.js
395
+ ```
396
+
397
+ ## Publishing to npm
398
+
399
+ To share this MCP server with others:
400
+
401
+ 1. Run `npm login`
402
+ 2. Run `npm publish --access public`
403
+
404
+ Users can then install with:
405
+
406
+ ```bash
407
+ npm install -g @arikusi/deepseek-mcp-server
408
+ ```
409
+
410
+ ## Contributing
411
+
412
+ Contributions are welcome! Please read our [Contributing Guidelines](CONTRIBUTING.md) before submitting PRs.
413
+
414
+ ### Reporting Issues
415
+
416
+ Found a bug or have a feature request? Please [open an issue](https://github.com/arikusi/deepseek-mcp-server/issues/new/choose) using our templates.
417
+
418
+ ### Development
419
+
420
+ ```bash
421
+ # Clone the repo
422
+ git clone https://github.com/arikusi/deepseek-mcp-server.git
423
+ cd deepseek-mcp-server
424
+
425
+ # Install dependencies
426
+ npm install
427
+
428
+ # Build in watch mode
429
+ npm run watch
430
+
431
+ # Run tests
432
+ npm test
433
+
434
+ # Lint
435
+ npm run lint
436
+ ```
437
+
438
+ ## Changelog
439
+
440
+ See [CHANGELOG.md](CHANGELOG.md) for version history and updates.
441
+
442
+ ## License
443
+
444
+ MIT License - see [LICENSE](LICENSE) file for details
445
+
446
+ ## Support
447
+
448
+ - [Documentation](https://github.com/arikusi/deepseek-mcp-server#readme)
449
+ - [Bug Reports](https://github.com/arikusi/deepseek-mcp-server/issues)
450
+ - [Discussions](https://github.com/arikusi/deepseek-mcp-server/discussions)
451
+ - Contact: [GitHub Issues](https://github.com/arikusi/deepseek-mcp-server/issues)
452
+
453
+ ## Resources
454
+
455
+ - [DeepSeek Platform](https://platform.deepseek.com) - Get your API key
456
+ - [Model Context Protocol](https://modelcontextprotocol.io) - MCP specification
457
+ - [DeepSeek API Documentation](https://api-docs.deepseek.com) - API reference
458
+
459
+ ## Acknowledgments
460
+
461
+ - Built with [Model Context Protocol SDK](https://github.com/modelcontextprotocol/typescript-sdk)
462
+ - Uses [OpenAI SDK](https://github.com/openai/openai-node) for API compatibility
463
+ - Created for the MCP community
464
+
465
+ ---
466
+
467
+ **Made by [@arikusi](https://github.com/arikusi)**
468
+
469
+ This is an unofficial community project and is not affiliated with DeepSeek.