Logotipo de N Lobby

N Lobby

Comunidad
minagishl

CLI and MCP server for N Lobby school portal

Editorminagishl
Repositorionlobby-cli
IdiomaTypeScript
Forks
4
Estrellas
6
Herramientas disponibles
0
Tipo de transportestdio
Categorías
LicenciaMIT
Enlaces
  • Conecta herramientas a flujos de trabajo con IA

    N Lobby ofrece funciones MCP que pueden usar los clientes y agentes de IA compatibles.

  • 0 herramientas disponibles

    Explora a continuación las acciones que se pueden invocar, con sus nombres y descripciones cuando el servidor los proporcione.

  • Configuración lista para copiar

    Usa los ejemplos de instalación para configurar este servidor en tu cliente MCP preferido.

  • Indicadores de interés en el código abierto

    6 estrellas y 4 forks en el repositorio enlazado.

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.

Instalación

TypingMind
Requisitos:

Node.js 18+

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

Usa el MCP de N Lobby con varios modelos de IA

TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que, una vez conectado N Lobby, puedes usarlo con distintos modelos de IA en TypingMind sin tener que configurarlo por separado para cada modelo. Esta integración MCP se ejecuta localmente en tu dispositivo a través del conector MCP de TypingMind.

Guía de configuración para usar el conector local

Usa esta opción si el servidor MCP necesita acceder a archivos locales, aplicaciones o recursos privados de tu ordenador.

1

Abre los ajustes de MCP

En TypingMind, ve a Ajustes, luego a Ajustes avanzados y a Model Context Protocol, y elige Configurar conector.

  1. Abre TypingMind en tu navegador.
  2. Haz clic en el icono de Ajustes.
  3. Ve a Ajustes avanzados.
  4. Abre la sección Model Context Protocol.
  5. Haz clic en Configurar conector y elige Este dispositivo.
Pantalla de configuración del conector MCP de TypingMind con «Este dispositivo» seleccionado
2

Ejecuta el comando del conector

Elige Este dispositivo, copia el comando de TypingMind y ejecútalo en Terminal. Mantén el proceso en ejecución mientras uses MCP.

  1. Copia el comando de configuración que muestra TypingMind.
  2. Abre Terminal en macOS o Windows Terminal en Windows.
  3. Pega y ejecuta el comando.
  4. Acepta la instalación del paquete si Terminal te pide confirmación para continuar.
  5. Mantén el proceso en ejecución en la ventana de Terminal mientras uses las herramientas MCP.
3

Añade N Lobby como servidor

Cuando el estado del conector sea «Listo», haz clic en «Edita servidores» y pega la configuración del servidor MCP.

  1. Espera hasta que el estado del conector indique «Listo».
  2. Haz clic en Edita servidores.
  3. Pega la configuración del servidor MCP de N Lobby.
  4. Guarda la lista de servidores.
  5. Actualiza para comprobar que el conector sigue listo.
Ajustes de MCP de TypingMind con un servidor activo y el botón «Edita servidores»
{
  "mcpServers": {
    "n-lobby": {
      "command": "npx",
      "args": [
        "-y",
        "nlobby-mcp"
      ]
    }
  }
}
4

Úsala con distintos modelos

Guarda la lista de servidores, abre Plugins, activa las herramientas MCP de N Lobby y selecciona cualquier modelo de IA compatible en TypingMind para usar las herramientas en el chat o asignárselas a un agente de IA.

  1. Abre la página Plugins en TypingMind.
  2. Activa las herramientas MCP de N Lobby.
  3. Inicia un chat y elige el modelo de IA que quieras usar.
  4. Usa las herramientas MCP en el chat o asígnalas a un agente de IA.
  5. Cambia a otro modelo de IA cuando lo necesites sin volver a conectar MCP.
Chat de TypingMind que usa herramientas MCP activadas con un modelo de IA seleccionado
¿Puedes usar N Lobby para ayudarme con esta tarea?
N Lobby
Claro. Lo he leído.
Esto he encontrado usando N Lobby.

Preguntas frecuentes

¿Para qué sirve el servidor MCP N Lobby?

N Lobby es un servidor MCP que permite a los clientes de IA compatibles conectarse a herramientas y contexto externos. En TypingMind, basta con añadir este servidor MCP una vez para que sus herramientas estén disponibles en tu espacio de trabajo de IA.

¿Puedo usar el servidor MCP N Lobby con varios modelos de IA en TypingMind?

Sí. TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que puedes usar N Lobby con distintos modelos de IA, como Claude, ChatGPT, Gemini u otros que hayas configurado en TypingMind, sin configurar el servidor MCP por separado para cada modelo.

¿Por qué usar el conector MCP de N Lobby con TypingMind?

TypingMind es una de las mejores interfaces de chat con LLM porque reúne varios modelos de IA, prompts, plugins, agentes de IA, claves de API y herramientas MCP en un solo espacio de trabajo. Con N Lobby conectado, puedes usar sus herramientas MCP con tus modelos preferidos y mantener organizado tu flujo de trabajo de chat en TypingMind.

¿Cómo conecto el servidor MCP N Lobby a TypingMind?

N Lobby funciona a través del conector MCP local de TypingMind. Es la mejor opción cuando el servidor MCP necesita acceder a archivos locales, aplicaciones de escritorio, herramientas de línea de comandos o recursos privados de tu ordenador.

¿Qué herramientas ofrece el servidor MCP N Lobby en TypingMind?

N Lobby ofrece funciones MCP que puedes activar desde la página Plugins de TypingMind y usar en el chat o asignar a agentes de IA.

¿Tengo que compartir mis claves de API con TypingMind para usar el servidor MCP N Lobby?

No. TypingMind prioriza el funcionamiento local y te permite mantener el control de tus proveedores de modelos, claves de API, prompts y configuración MCP. Si N Lobby requiere autenticación, añade las cabeceras, los ajustes de OAuth o la configuración local necesarios para ese servidor MCP al crear la conexión.

Servidores MCP relacionados

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇