Skip to content

Commit 6ae9307

Browse files
authored
Merge pull request #1 from ALAPI-SDK/smithery/config-jahb
Deployment: Dockerfile and Smithery config
2 parents d889c2d + 6800ed1 commit 6ae9307

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed

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 golang:1.24-alpine AS builder
3+
4+
# Install git since it might be needed for go mod
5+
RUN apk add --no-cache git
6+
7+
WORKDIR /app
8+
9+
# Copy go mod and sum files first for caching
10+
COPY go.mod go.sum ./
11+
RUN go mod tidy
12+
13+
# Copy the rest of the application
14+
COPY . .
15+
16+
# Build the application
17+
RUN CGO_ENABLED=0 go build -o mcp-alapi-cn .
18+
19+
# Final stage
20+
FROM alpine:latest
21+
WORKDIR /app
22+
23+
# Copy the built binary from builder
24+
COPY --from=builder /app/mcp-alapi-cn ./
25+
26+
# Run the MCP server
27+
CMD ["./mcp-alapi-cn"]

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ALAPI MCP Server
22

3+
[![smithery badge](https://smithery.ai/badge/@ALAPI-SDK/mcp-alapi-cn)](https://smithery.ai/server/@ALAPI-SDK/mcp-alapi-cn)
4+
35
这是一个基于 [ALAPI](https://www.alapi.cn) 的 MCP (Model Control Protocol) 服务器实现,可以通过MCP协议直接调用ALAPI的接口
46

57
## 功能特点
@@ -18,6 +20,14 @@
1820

1921
## 安装
2022

23+
### Installing via Smithery
24+
25+
To install mcp-alapi-cn for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@ALAPI-SDK/mcp-alapi-cn):
26+
27+
```bash
28+
npx -y @smithery/cli install @ALAPI-SDK/mcp-alapi-cn --client claude
29+
```
30+
2131
### 构建安装
2232
```bash
2333
#Github

smithery.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
required:
9+
- alapiToken
10+
properties:
11+
alapiToken:
12+
type: string
13+
description: ALAPI token for authentication
14+
alapiId:
15+
type: string
16+
description: Optional ALAPI API ID to specify which API to load
17+
commandFunction:
18+
# A JS function that produces the CLI command based on the given config to start the MCP on stdio.
19+
|-
20+
(config) => ({ command: './mcp-alapi-cn', env: { ALAPI_TOKEN: config.alapiToken, ALAPI_ID: config.alapiId || '' } })
21+
exampleConfig:
22+
alapiToken: your-alapi-token-here
23+
alapiId: "0"

0 commit comments

Comments
 (0)