Nintendo Switch Parental Controls
Project description
Nintendo Switch Parental Controls
An MCP (Model Context Protocol) server that exposes Nintendo Switch Parental Controls as AI-accessible tools. It wraps the pynintendoparental library and allows AI assistants to monitor and manage parental control settings on Nintendo Switch devices.
Features
- Authentication: Interactive Nintendo OAuth login flow via MCP tools, or pre-configured session token
- Device monitoring: List devices, view playtime, remaining time, sync status
- Playtime controls: Set daily limits, add extra time, configure per-day-of-week schedules
- Bedtime controls: Set bedtime alarms and end times
- Restriction controls: Set restriction mode (forced termination vs. alarm), content restriction levels
- Player tracking: View player profiles and today's app usage
- Application management: List apps, manage the allow-list (bypass content restrictions)
Prerequisites
- uv — install once, no Python or clone needed:
curl -LsSf https://astral.sh/uv/install.sh | sh
Authentication: Getting Your Nintendo Session Token
The server requires a Nintendo session token to access the Parental Controls API. You can obtain one in two ways:
Method 1: Interactive MCP Tool (Recommended for first-time setup)
- Start the MCP server (see below)
- Ask your AI assistant to call
nintendo_get_login_url - Open the returned URL in your browser
- Log in with your Nintendo Account
- On the "Select this person" page, right-click the "Select this person" button and copy the link
- Ask your AI assistant to call
nintendo_complete_loginwith the copied URL - The tool will return your session token — save it!
Method 2: Manual (if you already have a token)
If you already have a session token, set it as an environment variable:
export NINTENDO_SESSION_TOKEN="your-token-here"
Saving Your Token
Once you have a session token, add it to your environment so you don't need to log in again:
# Add to your shell profile (~/.zshrc, ~/.bashrc, etc.)
export NINTENDO_SESSION_TOKEN="your-token-here"
# Or create a .env file (never commit this!)
echo 'NINTENDO_SESSION_TOKEN=your-token-here' >> .env
Note: Session tokens can expire. If you get authentication errors, repeat the login flow.
Running the Server
uvx --from switch-parental-controls mcp
No clone or install required — uvx fetches the package from PyPI and runs it in an isolated environment.
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
NINTENDO_SESSION_TOKEN |
No* | — | Nintendo session token |
NINTENDO_TIMEZONE |
No | Europe/London |
IANA timezone (e.g. America/New_York) |
NINTENDO_LANG |
No | en-GB |
Language code (e.g. en-US) |
*Required for any tool that accesses Nintendo data, unless you use the interactive login tools.
MCP Client Configuration
Add to your MCP client configuration (e.g. Claude Desktop claude_desktop_config.json):
{
"mcpServers": {
"nintendo": {
"command": "uvx",
"args": ["--from", "switch-parental-controls", "mcp"],
"env": {
"NINTENDO_SESSION_TOKEN": "your-token-here",
"NINTENDO_TIMEZONE": "America/New_York",
"NINTENDO_LANG": "en-US"
}
}
}
}
Available Tools
Authentication
| Tool | Description |
|---|---|
nintendo_get_login_url |
Generate the Nintendo login URL and step-by-step instructions |
nintendo_complete_login |
Complete login with the redirect URL from the browser |
Devices
| Tool | Description |
|---|---|
nintendo_list_devices |
List all Nintendo Switch devices on the account |
nintendo_get_device |
Get detailed status for a specific device |
nintendo_get_today_summary |
Get today's usage summary for a device |
nintendo_get_monthly_summary |
Get monthly usage summary (optionally for a specific month) |
Playtime Controls
| Tool | Description |
|---|---|
nintendo_set_daily_playtime_limit |
Set the daily playtime limit (0-360 min, or -1 to remove) |
nintendo_add_extra_time |
Add extra playtime for today |
nintendo_set_timer_mode |
Switch between DAILY and EACH_DAY_OF_THE_WEEK modes |
nintendo_set_day_restrictions |
Set per-day playtime and bedtime restrictions |
Restriction Controls
| Tool | Description |
|---|---|
nintendo_set_restriction_mode |
Set FORCED_TERMINATION or ALARM mode |
nintendo_set_content_restriction_level |
Set age-based content restrictions |
nintendo_set_bedtime_alarm |
Set the bedtime alarm time (16:00-23:00) |
nintendo_set_bedtime_end_time |
Set when bedtime ends (05:00-09:00) |
Players
| Tool | Description |
|---|---|
nintendo_list_players |
List all players on a device |
nintendo_get_player |
Get player details including apps played today |
Applications
| Tool | Description |
|---|---|
nintendo_list_applications |
List all tracked applications on a device |
nintendo_set_app_allow_list |
Add/remove an app from the content restriction allow-list |
Development
Requires mise:
# Install dependencies
mise run install
# Run tests
mise run test
# Run linter
mise run lint
# Fix lint issues
mise run lint-fix
# Open MCP Inspector (browser UI to test tools interactively)
mise run inspect
MCP Inspector
The inspect task launches the MCP Inspector — a browser-based UI for testing MCP tools interactively without needing a full AI client.
mise run inspect
This opens the inspector connected to the nintendo_mcp server. You can call any tool directly from the UI, which is useful for testing the authentication flow and verifying tool responses.
Testing with opencode locally
An example opencode config is provided at opencode.jsonc.example. To use it:
# 1. Copy the example config
cp opencode.jsonc.example opencode.jsonc
# 2. Optionally set NINTENDO_SESSION_TOKEN in opencode.jsonc
# 3. Open opencode in this project directory — it will pick up the local config
opencode
The local opencode.jsonc is gitignored so your session token stays private.
CI
Tests run automatically on pull requests via GitHub Actions. See .github/workflows/test.yml.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file switch_parental_controls-0.2.0.tar.gz.
File metadata
- Download URL: switch_parental_controls-0.2.0.tar.gz
- Upload date:
- Size: 25.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9dffc5529a88cec48c9bf8553153c80a1bde37a7a1cab391d61e7eac4482cfec
|
|
| MD5 |
9c1fb50e57709c3bea2ec652e11bfc6e
|
|
| BLAKE2b-256 |
125fa1c6bc0867c2c5ddbe240c0da40c1be80436f02fd795479f214edcb7d10c
|
Provenance
The following attestation bundles were made for switch_parental_controls-0.2.0.tar.gz:
Publisher:
publish.yml on udondan/switch-parental-controls
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
switch_parental_controls-0.2.0.tar.gz -
Subject digest:
9dffc5529a88cec48c9bf8553153c80a1bde37a7a1cab391d61e7eac4482cfec - Sigstore transparency entry: 1628303069
- Sigstore integration time:
-
Permalink:
udondan/switch-parental-controls@c1a4682ba5581cd39b12096a04b0ee92b384a49e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/udondan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c1a4682ba5581cd39b12096a04b0ee92b384a49e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file switch_parental_controls-0.2.0-py3-none-any.whl.
File metadata
- Download URL: switch_parental_controls-0.2.0-py3-none-any.whl
- Upload date:
- Size: 22.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e81bc8e380ddbf5737aa38b7a99ec0621fda35b9ed3082c43058d94f448d421
|
|
| MD5 |
bdd3b2fb573ce072f9d69c0cd2bc6e31
|
|
| BLAKE2b-256 |
03d1505601440f145602a651e75aaf9d27e8ac0851dca998cfdcbfc719090256
|
Provenance
The following attestation bundles were made for switch_parental_controls-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on udondan/switch-parental-controls
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
switch_parental_controls-0.2.0-py3-none-any.whl -
Subject digest:
0e81bc8e380ddbf5737aa38b7a99ec0621fda35b9ed3082c43058d94f448d421 - Sigstore transparency entry: 1628303615
- Sigstore integration time:
-
Permalink:
udondan/switch-parental-controls@c1a4682ba5581cd39b12096a04b0ee92b384a49e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/udondan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c1a4682ba5581cd39b12096a04b0ee92b384a49e -
Trigger Event:
workflow_dispatch
-
Statement type: