mcp-servicenex-v2

v0.4.6
mcp-servicenex-v2 Checked 2 days ago Published 3 days ago

MCP server for the ServiceNEX REST API: tickets, workflows, knowledge, services, users, and resources

A Model Context Protocol (MCP) server for the ServiceNEX REST API. It exposes tickets, knowledge articles, services, users, and MCP resources to AI clients such as Claude Desktop. Set credentials, then start the stdio server: Copy .env.example to .env for local development. Host environment variables still take precedence.

Summary extracted from the README.

mcp-servicenex-v2

A Model Context Protocol (MCP) server for the ServiceNEX REST API. It exposes tickets, knowledge articles, services, users, and MCP resources to AI clients such as Claude Desktop.

Install

Requires Python 3.10+.

pip install mcp-servicenex-v2

Set credentials, then start the stdio server:

export SERVICENEX_API_BASE="https://your-instance.example.com"
export SERVICENEX_API_KEY="your-api-key"
mcp-servicenex-v2

Or with uvx (no global install):

uvx mcp-servicenex-v2

You can also run the module directly:

python -m mcp_servicenex_v2

Copy .env.example to .env for local development. Host environment variables still take precedence.

Claude Desktop

{
  "mcpServers": {
    "servicenex": {
      "command": "uvx",
      "args": ["mcp-servicenex-v2"],
      "env": {
        "SERVICENEX_API_BASE": "https://your-instance.example.com",
        "SERVICENEX_API_KEY": "your-api-key"
      }
    }
  }
}

If installed with pip, use "command": "mcp-servicenex-v2" and omit args.

Environment

Variable Required Description
SERVICENEX_API_BASE Yes ServiceNEX base URL (no trailing slash required)
SERVICENEX_API_KEY Yes Tenant API key (X-API-Key)
SERVICENEX_API_TIMEOUT No HTTP timeout in seconds (default 120)
LOG_LEVEL No Logging level (default INFO)
TWINE_USERNAME Publish Always __token__ for API tokens
TEST_PYPI_TOKEN Publish to TestPyPI Token from test.pypi.org
PYPI_TOKEN Publish to PyPI Token from pypi.org

Publish

Tokens are read from the repo-root .env (never committed). Copy the publish keys from .env.example if they are missing.

macOS / Linux (or Git Bash on Windows):

./scripts/package.sh
./scripts/publish.sh testpypi
./scripts/publish.sh pypi

Windows PowerShell:

.\scripts\package.ps1
.\scripts\publish.ps1 testpypi
.\scripts\publish.ps1 pypi

Any OS, calling Python directly:

python scripts/release.py package
python scripts/release.py publish testpypi
python scripts/release.py publish pypi

The scripts need Python 3.10+ with python-dotenv installed (it is a runtime dependency, so the project .venv already has it).

publish.sh pypi asks you to type the package name unless you pass --yes. Build tools are installed into .venv-build/ so the runtime .venv is unchanged.

Secrets

Never commit secrets. This covers SERVICENEX_API_KEY, PYPI_TOKEN, TEST_PYPI_TOKEN, and any other key or password.

  • Keep real values only in the repo-root .env or in your shell or host environment. .env and .env.* are in .gitignore.
  • .env.example is committed. It must contain placeholders only, such as your-api-key-here, and never real values.
  • Do not put tokens in code, README examples, commit messages, or PR descriptions. If you use a .pypirc, keep it in your home directory, not in the repo. .pypirc is also in .gitignore as a safeguard.
  • Before committing, run git status and git diff --cached and confirm that no .env file or token is staged.
  • If a secret is committed or pushed, revoke it at once and create a new one (pypi.org → Account settings → API tokens, or the ServiceNEX tenant settings). Deleting the commit is not enough, because the value stays in git history and in any clones.
  • Prefer PyPI tokens scoped to the mcp-servicenex-v2 project over account-wide tokens.

License

MIT