Skip to content

MCP server

Let an AI assistant read a school's directory data through the Model Context Protocol. The server wraps the read-only operations of the API as tools.

Read-onlyCredentials required

What it is

A small program your MCP client (Claude Desktop, Claude Code or any other) starts on your own machine. It makes no decisions of its own: every tool call sends one GET request to the API with the access token you give it, and returns the answer unchanged. The assistant therefore sees exactly what that user sees in the product, and nothing more. It cannot create, change or delete anything.

Get access

The server needs the same credentials as the API. Flux issues them, and provides the server package with them: write to flux-support@fluxstudentdirectory.com to ask. Read the guide first for how access works.

Connect your client

Add the server to your MCP client's configuration (for Claude Desktop and Claude Code, an mcpServers block in its settings file):

{
  "mcpServers": {
    "flux-student-directory": {
      "command": "npx",
      "args": ["tsx", "/absolute/path/to/mcp-server/src/index.ts"],
      "env": {
        "FLUX_API_TOKEN": "<the access token issued for your application>",
        "FLUX_API_BASE_URL": "https://studentdirectory.app"
      }
    }
  }
}
  • FLUX_API_TOKEN is required. Without it the server refuses to start; it never makes an anonymous request.
  • FLUX_API_BASE_URL is the bare site address, https://studentdirectory.app; the server adds /api/v1. It must use https (only localhost may use plain http), so the token is never sent unencrypted.
  • The server speaks MCP over standard input and output; your client starts and stops it.

Authentication

The token is a user's access token, the same credential the API reference describes, and it is sent as Authorization: Bearer on each request. Keep it in your client's local configuration only, never in a repository: it is as sensitive as that user's password. Tokens expire and the server does not refresh them. When calls start returning not_authenticated, supply a fresh token and restart the server (most clients do this when you restart them).

Errors

A refused call comes back as the API's error body, {"error":{"code":"...","message":"..."}}, so the assistant can explain why: for example not_authorized when the user may not see that school, or not_found when a feature is turned off for the school. Tools that take no arguments still expect an explicit empty arguments: {} if you script raw JSON-RPC calls; MCP clients do this for you.

Tools

One tool per operation. Each links to its entry in the API reference, which describes parameters and results. School and student identifiers come from get_me and the list tools.

ToolWhat it returnsAPI operation
get_meThe signed-in user, the schools they belong to and their role at each.GET /me
get_my_contactThe user's own contact information.GET /me/contact
list_studentsThe school roster, optionally filtered by name or graduation year; set full to "true" for the complete payload.GET /schools/{schoolId}/students
get_studentOne student's detail: contact information, guardians, and the caller's own star and note state.GET /students/{studentId}
get_student_noteThe caller's own private note on a student.GET /students/{studentId}/note
list_map_markersMap pins for the school, honoring each guardian's profile-visibility choice.GET /schools/{schoolId}/map-markers
list_listsThe caller's own custom lists at a school.GET /schools/{schoolId}/lists
get_listOne of the caller's lists and its members.GET /lists/{listId}
get_student_photo_urlA short-lived (five minute) signed URL for a student's photo.GET /students/{studentId}/photo/download-url
get_parent_photo_urlA short-lived (five minute) signed URL for a parent's photo.GET /parents/{parentId}/photo/download-url
list_menusEvery menu entry for the school.GET /schools/{schoolId}/menus
get_menus_weekOne week's menus; start is a Sunday as YYYY-MM-DD.GET /schools/{schoolId}/menus/week
get_menus_dayOne day's menus, all meal types; date is YYYY-MM-DD.GET /schools/{schoolId}/menus/day
list_calendarEvery calendar event of the school.GET /schools/{schoolId}/calendar
list_staffThe school's staff directory.GET /schools/{schoolId}/staff
list_documentsThe Document Library entries visible to the caller.GET /schools/{schoolId}/documents
list_noticesThe notices currently visible to the caller.GET /schools/{schoolId}/notices
get_school_featuresWhich features the school has turned on.GET /schools/{schoolId}/features