vcluster-yaml-mcp-server 1.0.4 → 1.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vcluster-yaml-mcp-server",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "MCP server for querying vcluster YAML configurations using jq",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -30,6 +30,9 @@ const mcpRequestDuration = new promClient.Histogram({
30
30
 
31
31
  const app = express();
32
32
 
33
+ // Trust proxy (Cloudflare Tunnel)
34
+ app.set('trust proxy', true);
35
+
33
36
  // Security headers
34
37
  app.use((req, res, next) => {
35
38
  res.setHeader('X-Content-Type-Options', 'nosniff');
@@ -96,7 +99,8 @@ app.get('/', (_req, res) => {
96
99
  // MCP endpoint with Streamable HTTP transport
97
100
  const mcpHandler = async (req, res) => {
98
101
  const start = Date.now();
99
- console.log(`MCP ${req.method} request received`);
102
+ const clientIp = req.ip || req.headers['x-forwarded-for'] || req.socket.remoteAddress;
103
+ console.log(`MCP ${req.method} request from ${clientIp}`);
100
104
 
101
105
  try {
102
106
  // Create new transport per request to prevent ID collisions