Skip to content

Conversation

@sam-at-luther
Copy link

@sam-at-luther sam-at-luther commented Oct 25, 2025

Summary

This PR adds support for installing and running servicenow-mcp via uvx and associated tools (such assupergateway).

Problem

Currently, when installing with uvx the config/tool_packages.yaml file is not included in the installation, resulting in 0 tools being loaded. The server logs show:

ERROR: Tool package config file not found at /root/.cache/uv/archive-v0/.../config/tool_packages.yaml
WARNING: MCP_TOOL_PACKAGE 'full' is not a valid package name. Valid packages: []. Loading 'none' package.
INFO: Loading package 'none' with 0 tools.

Changes

  1. Moved config/ into the package: config/src/servicenow_mcp/config/
  2. Updated pyproject.toml: Added hatchling config to include YAML files in wheel
  3. Updated server.py:
    • Added importlib.resources support to load config from package resources
    • Maintains backward compatibility with file path loading for development
    • Supports Python 3.9+ (importlib.resources.files) and older versions (pkg_resources)

Benefits

✅ Works with uvx servicenow-mcp (once published to PyPI)
✅ Works with uvx --from git+https://github.com/echelon-ai-labs/servicenow-mcp.git servicenow-mcp
✅ Works with standard pip install
✅ Still works in development mode (file path fallback)

Testing

Tested with:

  • Local development (file path fallback works)
  • Package installation via uvx from Git (config loads from package resources)
  • connectorhub with supergateway integration

Related Issue

Resolves issue where uvx installations load 0 tools due to missing config files.


Note: This enables users to run:

# e.g., With supergateway
docker run -p 8000:8000 supercorp/supergateway:3.4.3-uvx \
  --stdio "uvx --from git+https://github.com/echelon-ai-labs/servicenow-mcp.git servicenow-mcp" \
  --outputTransport streamableHttp --port 8000

Once published to PyPI, it will work even simpler:

uvx servicenow-mcp

@sam-at-luther sam-at-luther changed the title feat: Add uvx and supergateway compatibility feat: Add uvx compatibility Oct 25, 2025
Changes:
- Move config/ directory into src/servicenow_mcp/ package
- Update pyproject.toml to include config files in wheel distribution
- Update server.py to load config from package resources using importlib.resources
- Add fallback to file path for development mode
- Support both Python 3.9+ (importlib.resources.files) and older versions (pkg_resources)

This allows the package to work with:
- uvx installation from PyPI or Git
- supergateway with uvx
- Standard pip install
- Development mode

Fixes config file loading when installed via uvx, which previously
resulted in 0 tools being loaded due to missing config/tool_packages.yaml

Tested with:
- Local development (file path fallback)
- Package resource loading (uvx/pip)
@sam-at-luther sam-at-luther force-pushed the feat/uvx-supergateway-compatibility branch from 27e1598 to 3daaed0 Compare October 25, 2025 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant