obsidian-mcp-server 1.5.3 → 1.5.4
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/Dockerfile +62 -0
- package/README.md +2 -3
- package/env.json +42 -0
- package/package.json +6 -6
package/Dockerfile
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# ---- Builder Stage ----
|
|
2
|
+
FROM node:22-slim AS builder
|
|
3
|
+
|
|
4
|
+
# Set working directory
|
|
5
|
+
WORKDIR /app
|
|
6
|
+
|
|
7
|
+
# Install dependencies
|
|
8
|
+
# Copy package files first for better caching
|
|
9
|
+
COPY package.json package-lock.json* ./
|
|
10
|
+
# Install all dependencies (including devDependencies needed for build)
|
|
11
|
+
RUN npm install --production=false
|
|
12
|
+
|
|
13
|
+
# Copy source code
|
|
14
|
+
COPY . .
|
|
15
|
+
|
|
16
|
+
# Build the application
|
|
17
|
+
RUN npm run build
|
|
18
|
+
|
|
19
|
+
# Remove devDependencies after build
|
|
20
|
+
RUN npm prune --production
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
# ---- Final Stage ----
|
|
24
|
+
FROM node:22-slim
|
|
25
|
+
|
|
26
|
+
ENV NODE_ENV=production \
|
|
27
|
+
PATH="/home/service-user/.local/bin:${PATH}"
|
|
28
|
+
|
|
29
|
+
# Install mcp-proxy globally for runtime use
|
|
30
|
+
# Combine update, install, and clean in one layer
|
|
31
|
+
RUN apt-get update && \
|
|
32
|
+
apt-get install -y --no-install-recommends curl && \
|
|
33
|
+
npm install -g mcp-proxy@2.10.6 && \
|
|
34
|
+
npm cache clean --force && \
|
|
35
|
+
apt-get purge -y --auto-remove curl && \
|
|
36
|
+
apt-get clean && \
|
|
37
|
+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
38
|
+
|
|
39
|
+
# Create non-root user and group
|
|
40
|
+
# Create app directory and set permissions
|
|
41
|
+
RUN groupadd --system --gid 1987 service-user && \
|
|
42
|
+
useradd --system --uid 1987 --gid service-user -m service-user && \
|
|
43
|
+
mkdir -p /app && \
|
|
44
|
+
chown -R service-user:service-user /app
|
|
45
|
+
|
|
46
|
+
# Set working directory
|
|
47
|
+
WORKDIR /app
|
|
48
|
+
|
|
49
|
+
# Copy necessary artifacts from builder stage
|
|
50
|
+
COPY --from=builder --chown=service-user:service-user /app/package.json ./package.json
|
|
51
|
+
COPY --from=builder --chown=service-user:service-user /app/node_modules ./node_modules
|
|
52
|
+
COPY --from=builder --chown=service-user:service-user /app/build ./build
|
|
53
|
+
|
|
54
|
+
# Switch to non-root user
|
|
55
|
+
USER service-user
|
|
56
|
+
|
|
57
|
+
# Expose port if necessary (Update port number if your app uses a different one)
|
|
58
|
+
# EXPOSE 3000
|
|
59
|
+
|
|
60
|
+
# Define the command to run the application
|
|
61
|
+
# CMD ["mcp-proxy", "node", "build/index.js"] # Keep original for reference
|
|
62
|
+
CMD ["mcp-proxy", "node", "build/index.js"]
|
package/README.md
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
# Obsidian MCP Server
|
|
2
2
|
|
|
3
3
|
[](https://www.typescriptlang.org/)
|
|
4
|
-
[](https://opensource.org/licenses/Apache-2.0)
|
|
4
|
+
[](https://modelcontextprotocol.io/)
|
|
5
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
7
6
|
[]()
|
|
8
7
|
[](https://github.com/cyanheads/obsidian-mcp-server)
|
|
9
8
|
|
package/env.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"properties": {
|
|
3
|
+
"MAX_TOKENS": {
|
|
4
|
+
"default": "20000",
|
|
5
|
+
"description": "Maximum tokens per response",
|
|
6
|
+
"type": "string"
|
|
7
|
+
},
|
|
8
|
+
"NODE_ENV": {
|
|
9
|
+
"default": "production",
|
|
10
|
+
"description": "The Node.js environment setting",
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"OBSIDIAN_API_KEY": {
|
|
14
|
+
"description": "Your API key for the Obsidian MCP Server",
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"OBSIDIAN_VERIFY_SSL": {
|
|
18
|
+
"default": "false",
|
|
19
|
+
"description": "Enable SSL verification",
|
|
20
|
+
"type": "string"
|
|
21
|
+
},
|
|
22
|
+
"RATE_LIMIT_MAX_REQUESTS": {
|
|
23
|
+
"default": "200",
|
|
24
|
+
"description": "Max requests per rate limit window",
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"RATE_LIMIT_WINDOW_MS": {
|
|
28
|
+
"default": "900000",
|
|
29
|
+
"description": "Rate limit window in milliseconds (default: 15 minutes)",
|
|
30
|
+
"type": "string"
|
|
31
|
+
},
|
|
32
|
+
"TOOL_TIMEOUT_MS": {
|
|
33
|
+
"default": "60000",
|
|
34
|
+
"description": "Tool execution timeout in milliseconds",
|
|
35
|
+
"type": "string"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"required": [
|
|
39
|
+
"OBSIDIAN_API_KEY"
|
|
40
|
+
],
|
|
41
|
+
"type": "object"
|
|
42
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "obsidian-mcp-server",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.4",
|
|
4
4
|
"description": "Model Context Protocol (MCP) server designed for LLMs to interact with Obsidian vaults. Provides secure, token-aware tools for seamless knowledge base management through a standardized interface.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"tree": "npx ts-node --esm scripts/tree.ts"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
20
|
+
"@modelcontextprotocol/sdk": "^1.10.1",
|
|
21
21
|
"@types/node": "^22.14.1",
|
|
22
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
23
|
-
"@typescript-eslint/parser": "^8.
|
|
22
|
+
"@typescript-eslint/eslint-plugin": "^8.31.0",
|
|
23
|
+
"@typescript-eslint/parser": "^8.31.0",
|
|
24
24
|
"axios": "^1.8.4",
|
|
25
25
|
"dotenv": "^16.5.0",
|
|
26
|
-
"eslint": "^9.
|
|
26
|
+
"eslint": "^9.25.1",
|
|
27
27
|
"eslint-config-prettier": "^10.1.2",
|
|
28
28
|
"eslint-plugin-prettier": "^5.2.6",
|
|
29
29
|
"nanoid": "^5.1.5",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"typescript": "^5.8.3",
|
|
34
34
|
"winston": "^3.17.0",
|
|
35
35
|
"yaml": "^2.7.1",
|
|
36
|
-
"zod": "^3.24.
|
|
36
|
+
"zod": "^3.24.3"
|
|
37
37
|
},
|
|
38
38
|
"keywords": [
|
|
39
39
|
"mcp",
|