Skip to content

Commit 416edfb

Browse files
authored
Merge pull request #5 from smithery-ai/smithery/config-fs11
Deployment: Dockerfile and Smithery config
2 parents c2c3f87 + b8f8e55 commit 416edfb

File tree

2 files changed

+81
-0
lines changed

2 files changed

+81
-0
lines changed

Dockerfile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
2+
# Use the Node.js image with the required version for the project
3+
FROM node:18-alpine AS builder
4+
5+
# Set working directory
6+
WORKDIR /app
7+
8+
# Copy package files to the working directory
9+
COPY package.json package-lock.json ./
10+
11+
# Install dependencies
12+
RUN npm install
13+
14+
# Copy all files to the working directory
15+
COPY . .
16+
17+
# Build the TypeScript files
18+
RUN npm run build
19+
20+
# Create the final release image
21+
FROM node:18-alpine AS release
22+
23+
# Set working directory
24+
WORKDIR /app
25+
26+
# Copy built files and necessary package information
27+
COPY --from=builder /app/build /app/build
28+
COPY --from=builder /app/package.json /app/package-lock.json /app/node_modules ./
29+
30+
# Environment configuration for runtime (configured externally)
31+
ENV REST_BASE_URL=""
32+
ENV AUTH_BASIC_USERNAME=""
33+
ENV AUTH_BASIC_PASSWORD=""
34+
ENV AUTH_BEARER=""
35+
ENV AUTH_APIKEY_HEADER_NAME=""
36+
ENV AUTH_APIKEY_VALUE=""
37+
ENV REST_ENABLE_SSL_VERIFY="true"
38+
ENV REST_RESPONSE_SIZE_LIMIT="10000"
39+
40+
# Command to run the server
41+
ENTRYPOINT ["node", "build/index.js"]

smithery.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
- restBaseUrl
10+
properties:
11+
restBaseUrl:
12+
type: string
13+
description: The base URL for the REST API.
14+
authBasicUsername:
15+
type: string
16+
description: The username for Basic Authentication.
17+
authBasicPassword:
18+
type: string
19+
description: The password for Basic Authentication.
20+
authBearer:
21+
type: string
22+
description: The bearer token for authentication.
23+
authApiKeyHeaderName:
24+
type: string
25+
description: The header name for API Key Authentication.
26+
authApiKeyValue:
27+
type: string
28+
description: The API key value for API Key Authentication.
29+
restEnableSslVerify:
30+
type: boolean
31+
default: true
32+
description: Enable or disable SSL verification.
33+
restResponseSizeLimit:
34+
type: number
35+
default: 10000
36+
description: The maximum response size limit in bytes.
37+
commandFunction:
38+
# A function that produces the CLI command to start the MCP on stdio.
39+
|-
40+
config => ({ command: 'node', args: ['build/index.js'], env: { REST_BASE_URL: config.restBaseUrl, AUTH_BASIC_USERNAME: config.authBasicUsername, AUTH_BASIC_PASSWORD: config.authBasicPassword, AUTH_BEARER: config.authBearer, AUTH_APIKEY_HEADER_NAME: config.authApiKeyHeaderName, AUTH_APIKEY_VALUE: config.authApiKeyValue, REST_ENABLE_SSL_VERIFY: config.restEnableSslVerify.toString(), REST_RESPONSE_SIZE_LIMIT: config.restResponseSizeLimit.toString() } })

0 commit comments

Comments
 (0)