Logo di N Lobby

N Lobby

Community
minagishl

CLI and MCP server for N Lobby school portal

Autoreminagishl
Repositorynlobby-cli
LinguaTypeScript
Fork
4
Stelle
6
Strumenti disponibili
0
Tipo di trasportostdio
Categorie
LicenzaMIT
Link
  • Collega gli strumenti ai flussi di lavoro IA

    N Lobby mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • 0 strumenti disponibili

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni quando forniti dal server.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse open source

    6 stelle e 4 fork nel repository collegato.

N Lobby CLI

Note: The developer assumes no responsibility for any damages that may occur from using this tool. This software was developed for educational purposes and its operation is not guaranteed.

A dual-mode CLI and Model Context Protocol (MCP) server for accessing N Lobby school portal data. Use it interactively from the terminal with nlobby, or connect it to an AI assistant as an MCP server with nlobby serve.

Features

  • CLI Mode: Access N Lobby data directly from the terminal — news, schedule, courses, profile, and more
  • MCP Mode: Full MCP server compatible with Claude, Cursor, and other MCP-enabled AI assistants
  • Browser-based Authentication: Interactive login via automated Puppeteer browser window
  • Session Persistence: CLI mode saves cookies to ~/.nlobby/session for seamless subsequent use
  • School Information Access: Retrieve announcements, schedules, and learning resources
  • Required Courses Management: Access required course information and academic data
  • Multiple Calendar Types: Support for both personal and school calendars
  • User Role Support: Different access levels for students, parents, and staff

Installation

Option 1: Install from npm (Recommended)

bash
npm install -g nlobby-cli

Option 2: Development Installation

  1. Clone the repository:
bash
git clone https://github.com/minagishl/nlobby-cli.git
cd nlobby-cli
  1. Install dependencies:
bash
pnpm install
  1. Build the project:
bash
pnpm run build

Configuration

Create a .env file if you need to override defaults (optional):

env
NLOBBY_BASE_URL=https://nlobby.nnn.ed.jp
MCP_SERVER_NAME=nlobby-cli
MCP_SERVER_VERSION=1.0.0

CLI Usage

Authentication

bash
# Interactive browser login (recommended)
nlobby login

# Set cookies manually
nlobby cookies set "__Secure-next-auth.session-token=ey...;"

# Check current authentication status
nlobby cookies check

News

bash
# List latest news (default: 10, newest first)
nlobby news

# Filter and sort
nlobby news --limit 20 --category お知らせ --sort oldest --unread

# Show full article
nlobby news show 980

# Download the first attachment to /tmp
nlobby news download 980 --index 1 --output-dir /tmp

# Mark as read
nlobby news read 980

Schedule & Calendar

bash
# Today's schedule
nlobby schedule

# Specific date
nlobby schedule 2026-04-01

# This week's personal calendar
nlobby calendar

# School calendar for a date range
nlobby calendar --type school --from 2026-04-01 --to 2026-04-07

Courses

bash
# All required courses
nlobby courses

# Filter by grade / semester
nlobby courses --grade 2 --semester 2025

Profile & Health

bash
nlobby profile
nlobby health

MCP Server

bash
# Start MCP server (stdio transport)
nlobby serve
# or
nlobby mcp

All commands support --json to output raw JSON instead of formatted text.


MCP Usage

Cursor IDE Setup

Install MCP Server

Add the following to your Cursor settings (~/.cursor/config.json):

json
{
  "mcpServers": {
    "nlobby": {
      "command": "npx",
      "args": ["-y", "nlobby-cli", "serve"],
      "env": {
        "NLOBBY_BASE_URL": "https://nlobby.nnn.ed.jp"
      }
    }
  }
}

Claude Desktop Setup

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

json
{
  "mcpServers": {
    "nlobby": {
      "command": "npx",
      "args": ["-y", "nlobby-cli", "serve"],
      "env": {
        "NLOBBY_BASE_URL": "https://nlobby.nnn.ed.jp"
      }
    }
  }
}

Other MCP Clients

For any MCP-compatible client, use:

  • Command: nlobby serve (if installed globally) or node /path/to/dist/index.js serve
  • Protocol: stdio
  • Environment: Optional environment variables as listed in the Configuration section

MCP Resources

URIDescription
nlobby://newsSchool news and notices
nlobby://scheduleDaily class schedule and events
nlobby://required-coursesRequired courses and academic information
nlobby://user-profileCurrent user information

MCP Tools

Authentication

ToolDescription
interactive_loginOpen browser for manual login (recommended)
login_helpPersonalized login help and troubleshooting
set_cookiesManually set authentication cookies
check_cookiesCheck authentication cookie status
verify_authenticationVerify authentication status across all clients

News

ToolKey ParametersDescription
get_newscategory? limit? sort?Retrieve school news with filtering
get_news_detailnewsId markAsRead?Full detail for a specific article
mark_news_as_readids (array)Mark articles as read
get_unread_news_infoUnread count and important-news flags

Schedule & Calendar

ToolKey ParametersDescription
get_scheduledate?Schedule for a date (YYYY-MM-DD)
get_calendar_eventscalendar_type? from_date? to_date? period?Calendar events (personal/school)
test_calendar_endpointsfrom_date? to_date?Test both calendar endpoints
get_calendar_filtersLobby calendar filter definitions

Courses & Exams

ToolKey ParametersDescription
get_required_coursesgrade? semester? category?Required courses with progress tracking
check_exam_daydate?Check if a date is an exam day
finish_exam_day_modeEnd exam day mode
get_exam_otpGet one-time password for exam

Account & Navigation

ToolDescription
get_account_infoExtract account info from Next.js page
get_student_card_screenshotCapture student ID card screenshot
update_last_accessUpdate last access timestamp
get_navigation_menusMain navigation menu list
get_notificationsNotification messages
get_user_interestsUser interest tags (with optional icon data)
get_interest_weightsInterest weight scale definitions

Debugging

ToolKey ParametersDescription
health_checkTest N Lobby API connection
debug_connectionendpoint?Detailed connection debugging
test_page_contentendpoint? length?Page content retrieval testing
test_trpc_endpointmethod params?Test a specific tRPC endpoint

Authentication Flow

Method 1: Interactive Browser Login (Recommended)

CLI:

bash
nlobby login

MCP tool: interactive_login

A browser window opens automatically. Complete the N Lobby login, and cookies are extracted and saved.

Method 2: Manual Cookie Setup

  1. Log in to N Lobby in your web browser
  2. Open DevTools → Application / Storage → Cookies
  3. Copy all cookies as a string

CLI:

bash
nlobby cookies set "__Secure-next-auth.session-token=ey...;"

MCP tool: set_cookies cookies="__Secure-next-auth.session-token=ey...;"


User Types

The server supports three user types based on email domain:

TypeEmail Domain
Students@nnn.ed.jp
Staff@nnn.ac.jp
ParentsAny other registered email

Project Structure

src/
├── index.ts              # Entry point — CLI vs MCP mode detection
├── config.ts             # Configuration management
├── logger.ts             # Logging utilities
├── trpc-client.ts        # tRPC client for API calls
├── types.ts              # TypeScript type definitions
├── api/
│   ├── index.ts          # NLobbyApi facade + session persistence
│   ├── context.ts        # ApiContext interface
│   ├── shared.ts         # Shared utilities (fetchRenderedHtml, …)
│   ├── news.ts           # News functions
│   ├── schedule.ts       # Schedule / calendar functions
│   ├── courses.ts        # Course / exam functions
│   ├── account.ts        # Account info / student card functions
│   ├── navigation.ts     # Navigation / notification / interest functions
│   └── health.ts         # Health check / debug functions
├── auth/
│   ├── browser.ts        # Puppeteer browser authentication
│   ├── nextauth.ts       # NextAuth.js session handling
│   └── credentials.ts    # Credential validation and guidance
├── cli/
│   ├── index.ts          # Commander program wiring
│   ├── commands/         # login, news, schedule, courses, profile, health, serve
│   └── formatters/       # Human-readable output formatters
└── mcp/
    └── server.ts         # MCP server (28 tools, 4 resources)

Development

Scripts

bash
pnpm run build   # Build (esbuild bundle + tsc type declarations)
pnpm run dev     # Watch mode
pnpm run start   # Start MCP server
pnpm run lint    # Lint
pnpm run format  # Format

Security Notes

  • CLI cookies are stored in ~/.nlobby/session (plain text — protect accordingly)
  • MCP mode keeps all authentication tokens in memory only
  • Browser automation is used only for authentication, not data scraping
  • No sensitive data is logged

License

This project is licensed under the MIT License — see the LICENSE file for details.

Installazione

TypingMind
Prerequisiti:

Node.js 18+

{
  "mcpServers": {
    "nlobby": {
      "command": "npx",
      "args": [
        "-y",
        "nlobby-mcp"
      ],
      "env": {
        "NLOBBY_BASE_URL": "https://nlobby.nnn.ed.jp"
      }
    }
  }
}

Usa MCP N Lobby con più modelli IA

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso N Lobby, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura MCP.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura MCP e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con Questo dispositivo selezionato
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi N Lobby come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di N Lobby.
  4. Salva l'elenco dei server.
  5. Aggiorna per verificare che il connettore sia ancora pronto.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "n-lobby": {
      "command": "npx",
      "args": [
        "-y",
        "nlobby-mcp"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di N Lobby, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di N Lobby.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare N Lobby per aiutarmi con questa attività?
N Lobby
Certo. Ho letto.
Ecco cosa ho trovato con N Lobby.

Domande frequenti

A cosa serve il server MCP N Lobby?

N Lobby è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare N Lobby MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare N Lobby con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP N Lobby con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando N Lobby, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego N Lobby MCP a TypingMind?

N Lobby funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre N Lobby MCP in TypingMind?

N Lobby mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare N Lobby MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se N Lobby richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇