Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ae8abe8

Browse files
Merge pull request #1 from jinzcdev/smithery/config-atnx
Deployment: Dockerfile and Smithery config
2 parents 9a9a465 + 6570ded commit ae8abe8

File tree

4 files changed

+72
-0
lines changed

4 files changed

+72
-0
lines changed

‎.husky/pre-commit‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "0ドル")/_/husky.sh"
3+
14
npx lint-staged
25
npm run build

‎Dockerfile‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
2+
FROM node:lts-alpine
3+
4+
# Create app directory
5+
WORKDIR /app
6+
7+
# Copy package.json and package-lock.json
8+
COPY package*.json ./
9+
10+
# Install dependencies, ignoring any prepare scripts
11+
RUN npm install --ignore-scripts
12+
13+
# Copy the rest of the application code
14+
COPY . .
15+
16+
# Build the application
17+
RUN npm run build
18+
19+
ENV LEETCODE_SITE=global \
20+
LEETCODE_SESSION=
21+
22+
# Expose any port if needed (MCP uses stdio, so not required for now)
23+
24+
# Set the default command
25+
CMD node build/index.js \
26+
--site ${LEETCODE_SITE:-global} \
27+
--session ${LEETCODE_SESSION}

‎README.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![NPM Version](https://img.shields.io/npm/v/@jinzcdev/leetcode-mcp-server.svg)](https://www.npmjs.com/package/@jinzcdev/leetcode-mcp-server)
44
[![GitHub License](https://img.shields.io/github/license/jinzcdev/leetcode-mcp-server.svg)](https://img.shields.io/github/license/jinzcdev/leetcode-mcp-server.svg)
55
[![Stars](https://img.shields.io/github/stars/jinzcdev/leetcode-mcp-server)](https://github.com/jinzcdev/leetcode-mcp-server)
6+
[![smithery badge](https://smithery.ai/badge/@jinzcdev/leetcode-mcp-server)](https://smithery.ai/server/@jinzcdev/leetcode-mcp-server)
67

78
The LeetCode MCP Server is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that provides seamless integration with LeetCode APIs, enabling advanced automation and intelligent interaction with LeetCode's programming problems, contests, solutions, and user data.
89

@@ -21,6 +22,16 @@ The LeetCode MCP Server is a [Model Context Protocol (MCP)](https://modelcontext
2122

2223
## Installation
2324

25+
### Installing via Smithery
26+
27+
To install leetcode-mcp-server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@jinzcdev/leetcode-mcp-server):
28+
29+
```bash
30+
npx -y @smithery/cli install @jinzcdev/leetcode-mcp-server --client claude
31+
```
32+
33+
### Manual Installation
34+
2435
```bash
2536
# Install from npm
2637
npm install @jinzcdev/leetcode-mcp-server -g

‎smithery.yaml‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml
2+
3+
startCommand:
4+
type: stdio
5+
configSchema:
6+
# JSON Schema defining the configuration options for the MCP.
7+
type: object
8+
properties:
9+
site:
10+
type: string
11+
default: global
12+
description: "LeetCode site to target: 'global' for leetcode.com, or 'cn' for leetcode.cn"
13+
session:
14+
type: string
15+
description: Optional session cookie to authenticate with LeetCode API
16+
commandFunction:
17+
# A JS function that produces the CLI command based on the given config to start the MCP on stdio.
18+
|-
19+
(config) => {
20+
const args = ['build/index.js', '--site', config.site];
21+
if (config.session && config.session.trim() !== '') {
22+
args.push('--session', config.session);
23+
}
24+
return {
25+
command: 'node',
26+
args
27+
};
28+
}
29+
exampleConfig:
30+
site: global
31+
session: leetcode_session_cookie_value

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /