MCP Server Configuration

Anish Reghu
Kilo Sage

Dear all,

 

I am trying to configure a MCP Server.

 

I tried my best, but I am failing, not sure why. (Attached are the MCP Server connection logs as well)

 

I am trying to use the nowaikit which is open source MCP Server.

I configured everything via the terminal as well as tried entering those configurations into the claude_desktop_config file as well, but it still throws error.

The JSON code is as below:


{
  "mcpServers": {
    "webpage-mcp": {
      "command": "cmd.exe",
      "args": [
        "/c",
        "npx",
        "-y",
        "-p",
        "webpage-mcp@latest",
        "webpage-mcp-stdio"
      ]
    },
    "nowaikit": {
      "command": "npx",
      "args": [
        "-y",
        "nowaikit"
      ],
      "env": {
        "SERVICENOW_INSTANCE_URL": "https://dev*****.service-now.com",
        "SERVICENOW_BASIC_USERNAME": "mcp_admin",
        "SERVICENOW_BASIC_PASSWORD": "*THE_PASSWORD",
        "WRITE_ENABLED": "true",
        "SCRIPTING_ENABLED": "true"
      }
    }
  },
  "coworkUserFilesPath": "C:\\Users\\AnishReghuKumaranNai\\Claude",
  "preferences": {
    "launchPreviewPersistedWorkspaces": [],
    "launchPreviewSessionScopedSessions": [],
    "coworkScheduledTasksEnabled": false,
    "coworkHipaaRestricted": false,
    "ccdScheduledTasksEnabled": false,
    "bypassPermissionsGateByAccount": {
      "eb4efa2c-d675-43ba-a986-48d24c44df66": false
    },
    "coworkWebSearchEnabled": true,
    "coworkModelAutoFallbackByAccount": {
      "eb4efa2c-d675-43ba-a986-48d24c44df66": true
    },
    "remoteToolsDeviceName": "rcchn0259",
    "epitaxyPrefs": {
      "starred-local-code-sessions": [],
      "starred-cowork-spaces": [],
      "starred-session-groups": [],
      "dframe-group-scopes": {},
      "dframe-local-slice": {
        "pinnedOrder": [],
        "homeProjectsPinnedOrder": []
      },
      "ccd-sessions-filter": {
        "state": {
          "selectedProjects": []
        },
        "version": 0
      },
      "desktop-frame.paneStore.v1": {
        "state": {
          "extraPanesByMode": {},
          "colWeightsByMode": {},
          "rowSplit": 0.5,
          "draftNonce": 0
        },
        "version": 4
      }
    }
  }
}

 

But still this doesn't connect the MCP Server, it fails. Please help.
I created a wrapper script as well and modified the JSON point to that as well.

 

const { spawn } = require('child_process');

const child = spawn('npx', ['-y', 'nowaikit'], {
  env: process.env,
  stdio: ['inherit', 'pipe', 'inherit']
});

child.stdout.on('data', (data) => {
  const lines = data.toString().split('\n');
  for (const line of lines) {
    const trimmed = line.trim();
    if (trimmed.startsWith('{') && trimmed.endsWith('}')) {
      process.stdout.write(line + '\n');
    }
  }
});

child.on('exit', (code) => {
  process.exit(code);
});
{
  "mcpServers": {
    "webpage-mcp": {
      "command": "cmd.exe",
      "args": [
        "/c",
        "npx",
        "-y",
        "-p",
        "webpage-mcp@latest",
        "webpage-mcp-stdio"
      ]
    },
    "nowaikit": {
      "command": "node",
      "args": [
        "C:\\Users\\USERPROFILE_NAMEi\\nowaikit-wrapper.js"
      ],
      "env": {
        "SERVICENOW_INSTANCE_URL": "https://dev*****.service-now.com",
        "SERVICENOW_BASIC_USERNAME": "mcp_admin",
        "SERVICENOW_BASIC_PASSWORD": "THE_PASSWORD",
        "WRITE_ENABLED": "true",
        "SCRIPTING_ENABLED": "true"
      }
    }
  }
}

 

Still the nowaikit fails to run.

 

NOTE - mcp_admin is configured with Identity type = Machine and Internal Integration User - checked.

Please help.

Request - Once again, requesting specific answers that can troubleshoot the issue, no article links, product documentation links, etc.

 

Regards,

Anish

1 ACCEPTED SOLUTION

Hardik Benani
Mega Sage

Your diagnosis is exactly right, the banner and help text on stdout corrupts the JSON-RPC stream. This was an edge case and it's fixed that at the source in nowaikit@4.7.1: when it's launched by an MCP client (no subcommand, piped stdio) it starts the server directly and prints nothing to stdout. So you can delete the wrapper script, it's no longer needed.

 

The reason your retries kept failing, including the setup wizard, is npx caching. You've run npx nowaikit many times, so npx has the old banner-printing build cached and keeps reusing it for the bare package name. The fix is to force the new version:

 

1. Set the package to nowaikit@latest (this is what makes npx fetch 4.7.1):

 

"nowaikit": {
"command": "npx",
"args": ["-y", "nowaikit@latest"],
   "env": {
       "SERVICENOW_INSTANCE_URL": "https://devXXXXX.service-now.com",
       "SERVICENOW_BASIC_USERNAME": "mcp_admin",
       "SERVICENOW_BASIC_PASSWORD": "your-password",
       "WRITE_ENABLED": "true",
       "SCRIPTING_ENABLED": "true"
     }
}


2. Kill the lingering processes as you did before (taskkill /f /im node.exe and taskkill /f /im Claude.exe), then reopen Claude Desktop.

 

If it still runs an old copy, clear the npx cache once and reopen: delete the folder %LocalAppData%\npm-cache\_npx (or run npm cache clean --force).

 

I verified this end to end against the published 4.7.1: npx -y nowaikit@latest returns a clean JSON-RPC handshake with no banner, so it connects.

 

One last thing once it's connected: your note says mcp_admin is a Machine / Internal Integration User. So confirm mcp_admin actually has a password set and that basic auth is allowed for it, I guess with latest release you have to add the user to one of the role to allow basic auth, otherwise you'll get 401s once the server is talking, in which case set a password on that user or switch to OAuth. 

 

Let me know how it goes.

View solution in original post

12 REPLIES 12

Anish Reghu
Kilo Sage

FINALLY, IT'S SOLVED!

BIG LESSON LEARNT - NEVER WRITE DIRECTLY INTO THE CONFIG FILE, WRITE IT VIA THE CMD PROMPT.

npx nowaikit setup //ON THE COMMAND PROMPT

 

AND FOLLOW THE INSTRUCTIONS.

 

ONCE SETUP IS COMPLETE, EXIT.

 

THANK YOU, HARDIK FOR YOUR COMMENTS AND TIME!

AnishReghu_0-1785259813708.png

 

AnishReghu_1-1785259907371.png

AnishReghu_2-1785259987089.png

 

Good luck everyone!
Enjoy with the MCP Servers... Playtime starts now 🙂

Regards,

Anish

chan_I
ServiceNow Employee

Hello @Anish Reghu super happy you were able to get this resolved. I was reading/following along and this is just an amazing example of how great this community is!!! Have fun and thanks for sharing. 🚀🚀🚀

Thank you, Chan.

 

Indeed, ServiceNow as a community and as a platform has maintained its charm throughout. ❤️

 

Regards,

Anish