Skip to main content

nsai-auth

MCP server generated from API documentation

Generated by MCP Server Generator (simple style).

Installation

Prerequisites

  • Python 3.10+

Run with uvx (no install)

Once published to PyPI, the server can be launched directly:

uvx nsai-auth

Pass env via your shell or your MCP client config (see below).

Install from PyPI

pip install nsai-auth
nsai-auth                 # console script
python -m nsai_auth       # equivalent

Local development

pip install -e ".[dev]"
cp .env.example .env      # set BASE_URL and API_KEY
nsai-auth                 # or: python -m nsai_auth

The server uses stdio transport (no HTTP). Connect your MCP client to this process.

Connecting to MCP Clients

Add to your MCP config (e.g. claude_desktop_config.json or Cursor's MCP settings):

{
  "mcpServers": {
    "nsai-auth": {
      "command": "uvx",
      "args": ["nsai-auth"],
      "env": {
        "BASE_URL": "https://auth.nervesparks.com",
        "API_KEY": "Bearer your_token_here"
      }
    }
  }
}

A ready-to-edit copy of this config lives at mcp.json.

Windows: make sure uvx is on PATH (install via pipx install uv or winget install astral-sh.uv). On first launch uvx downloads the package; subsequent launches are cached.

Alternative: pinned version

{
  "mcpServers": {
    "nsai-auth": {
      "command": "uvx",
      "args": ["nsai-auth==0.1.0"],
      "env": { "BASE_URL": "...", "API_KEY": "..." }
    }
  }
}

Alternative: installed console script

{
  "mcpServers": {
    "nsai-auth": {
      "command": "nsai-auth",
      "env": { "BASE_URL": "...", "API_KEY": "..." }
    }
  }
}

Alternative: local development checkout

{
  "mcpServers": {
    "nsai-auth": {
      "command": "uv",
      "args": ["--directory", "C:\\path\\to\\nsai_auth", "run", "python", "-m", "nsai_auth"]
    }
  }
}

Configuration

Set in .env:

  • BASE_URL – Base URL of your API (e.g. https://api.example.com)
  • API_KEY – API token (sent as ?token=...)

Authentication & API Key Setup

This server connects to the Nerve Sparks API and requires a Bearer Token.

  1. Obtain your Bearer Token by signing up or logging into the Nerve Sparks platform.
  2. The Bearer Token is typically found in your account settings or developer dashboard.
  3. Ensure your token has the necessary permissions to access user authentication and management features.
  4. Add it to your .env file:
BASE_URL=https://auth.nervesparks.com
AUTH_TOKEN=Bearer xxxxxxxxxxxxxxxxxxxx

⚠️ Never commit your .env file to version control. Add .env to your .gitignore.


Available Tools

register_user

Registers a new user.

Parameter Type Required Description
email string Yes The email address of the user.
password string Yes The password for the user.
display_name string Yes The display name for the user.
tenant_id string Yes The ID of the tenant.

login_user

Logs in a user.

Parameter Type Required Description
email string Yes The email address of the user.
password string Yes The password for the user.
tenant_id string Yes The ID of the tenant.

refresh_token

Refreshes the access token.

Parameter Type Required Description
refresh_token string Yes The refresh token to be used.

logout_user

Logs out a user.

Parameter Type Required Description
refresh_token string Yes The refresh token to log out.

get_current_user

Retrieves the current user's information.

Parameter Type Required Description
This tool takes no parameters.

forgot_password

Initiates a password reset.

Parameter Type Required Description
email string Yes The email address of the user.
tenant_id string Yes The ID of the tenant.

get_user_claims

Retrieves claims for a specific user.

Parameter Type Required Description
uid string Yes The unique ID of the user.
tenant_id string Yes The ID of the tenant.

update_user_claims

Updates claims for a user identified by email.

Parameter Type Required Description
email string Yes The email address of the user.
tenant_id string Yes The ID of the tenant.
role string Yes The role to be assigned.

whitelist_api_key

Creates a partner API key.

Parameter Type Required Description
name string Yes The name for the API key.
expires_in_days integer Yes The number of days until expiration.

verify_partner_token

Verifies a whitelist API key.

Parameter Type Required Description
This tool takes no parameters.

Publishing to PyPI (for maintainers)

  1. Bump version in pyproject.toml and nsai_auth/__init__.py.

  2. Clean and build:

    rm -rf dist build *.egg-info
    uv build           # or: python -m build
    
  3. Sanity-check the wheel runs as uvx:

    uvx --from ./dist/nsai_auth-0.1.0-py3-none-any.whl nsai-auth
    
  4. Upload (test first, then prod):

    twine upload --repository testpypi dist/*
    uvx --index-url https://test.pypi.org/simple/ nsai-auth   # smoke test
    twine upload dist/*
    
  5. After release, anyone can run:

    uvx nsai-auth
    

Make sure your PyPI token is configured in ~/.pypirc or via TWINE_USERNAME=__token__ / TWINE_PASSWORD=pypi-....


Generated by MCP Server Generator

Metadata

Release files for nsai-auth 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nsai-auth 0.1.1
File Size Uploaded Provenance Actions
nsai_auth-0.1.1.tar.gz 8.1 kB Without provenance Details for nsai_auth-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nsai-auth 0.1.1
File Interpreter ABI Platform Actions
nsai_auth-0.1.1-py3-none-any.whl Python 3 none any Details for nsai_auth-0.1.1-py3-none-any.whl

Total release size: 17.5 kB

Release files / nsai_auth-0.1.1.tar.gz

Download URL nsai_auth-0.1.1.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c4d90724fc7b8e6ef4730a70314e2276fd1218a03542cce19b0d37bd416b43df
BLAKE2b-256 checksum
How to use checksums
8196edf90aadaa2a1ba3f55be481fd7b28ce90d83dbe34f207e64252643bb7a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / nsai_auth-0.1.1-py3-none-any.whl

Download URL nsai_auth-0.1.1-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
297201867db9be64fb46fe4b73b2942ce089e4aec0c15710cc8ade775ea9f1a0
BLAKE2b-256 checksum
How to use checksums
124fa8ebfceb193ee755510d258efdc4975c929d1913eab88001402b3d8a4c1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Security for nsai-auth 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page