mcp-servicenex-v2
v0.4.6MCP 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
.envor in your shell or host environment..envand.env.*are in.gitignore. .env.exampleis committed. It must contain placeholders only, such asyour-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..pypircis also in.gitignoreas a safeguard. - Before committing, run
git statusandgit diff --cachedand confirm that no.envfile 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-v2project over account-wide tokens.
License
MIT