MAL User MCP Server
Allows AI assistants to interact with MyAnimeList user accounts for list management, progress tracking, and personalized anime recommendations.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MAL User MCP Server I just finished watching Death Note, mark it completed with score 9"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MAL User MCP Server
A Model Context Protocol (MCP) server that enables AI assistants to interact with MyAnimeList user accounts for list management, progress tracking, and personalized anime recommendations.
Features
π Secure Authentication
OAuth 2.0 with PKCE for secure MyAnimeList authentication
Automatic token refresh and management
Multi-user support with secure token storage
π List Management
View Lists: Get user's anime lists (watching, completed, on-hold, dropped, plan-to-watch)
Update Progress: Mark episodes watched, update scores, change status
Bulk Operations: Update multiple anime at once with natural language
Smart Updates: "I watched episodes 1-5 of Attack on Titan, score it 8/10"
π Personal Analytics
User statistics and viewing patterns
Genre and studio preferences analysis
Personalized recommendations based on watch history
Compare preferences with other users
π€ AI Integration
Natural language anime list updates
Context-aware recommendations during conversations
Automatic status tracking based on discussion
Preference analysis for better suggestions
Related MCP server: mal-mcp
How It Works
This project consists of two separate servers that work together:
π MCP Server (build/server.js)
Purpose: Provides MCP tools for AI assistants to interact with MAL API
Usage: Runs in background, connects to Claude Code or other MCP clients
Authentication: Reads stored tokens from
tokens.json
π Authentication Server (auth-server.js)
Purpose: Web interface for easy MyAnimeList OAuth authentication
Usage: Visit
http://localhost:3006to login and manage tokensOutput: Saves authentication tokens to
tokens.jsonfor MCP server use
π Workflow
Start Auth Server:
node auth-server.jsβ Visitlocalhost:3006β Login with MALUse MCP Server: Add to Claude Code β Use tools like
mal_get_user_listTokens Shared: Both servers use the same
tokens.jsonfile
Recommended Companion
Anime Search MCP Server
For best results, use alongside the anime-search-mcp server to:
Search and discover anime with detailed information
Get MyAnimeList anime IDs needed for list management
Access comprehensive anime metadata before adding to your list
Quick Start
Prerequisites
Node.js 18+
TypeScript
A MyAnimeList account
Registered MAL API application
Installation
Clone and setup:
git clone <repository>
cd mal-user-mcp
npm installConfigure environment:
cp .env.example .env
# Edit .env with your MAL API credentialsBuild the project:
npm run buildTwo-Step Setup
Step 1: Authenticate (Web Interface)
# Start the authentication server
node auth-server.js
# Visit http://localhost:3006 in your browser
# Click "Login with MyAnimeList"
# Complete OAuth flow
# Tokens are saved to tokens.jsonStep 2: Use MCP Server
# The MCP server is now ready to use with stored tokens
# Add to your MCP client configuration (see below)MCP Integration
Add to your MCP client configuration:
{
"mcpServers": {
"mal-user": {
"command": "node",
"args": ["/path/to/mal-user-mcp/build/server.js"],
"env": {
"MAL_CLIENT_ID": "your_client_id",
"MAL_CLIENT_SECRET": "your_client_secret"
}
}
}
}Testing & Development
MCP Inspector (Recommended)
Test all tools before integrating with Claude Code:
# Start the MCP Inspector
npx @modelcontextprotocol/inspector node build/server.js
# Visit the provided URL (e.g., http://localhost:6274/?MCP_PROXY_AUTH_TOKEN=...)
# Test tools in this order:
# 1. mal_get_auth_status - Check if authenticated
# 2. mal_authenticate - Get authentication instructions
# 3. Complete authentication at http://localhost:3006
# 4. mal_get_user_info - Test API connection
# 5. mal_get_user_list - View your anime listAuthentication Testing
# Test OAuth flow independently
node test-oauth.js
# Or run the full auth server
node auth-server.js
# Visit http://localhost:3006Usage Examples
With Claude Code
# Check authentication status (gets login instructions if needed)
"Check my MAL authentication status"
# After authentication through web interface:
"I just finished watching Death Note, mark it completed with score 9"
# Bulk updates
"I watched these anime: Attack on Titan (completed, 8/10), Naruto (episode 50, still watching)"
# Get your stats
"Show me my anime statistics and what genres I prefer"
# View your list
"Show me what anime I'm currently watching"Available MCP Tools
Authentication
mal_authenticate- Start OAuth flow and store credentialsmal_get_auth_status- Check authentication statusmal_revoke_auth- Remove stored credentials
List Management
mal_get_anime_list- Retrieve user's anime list with filtersmal_add_anime- Add anime to list with status/scoremal_update_anime- Update anime progress, status, or scoremal_remove_anime- Remove anime from listmal_bulk_update- Update multiple anime at once
User Information
mal_get_user_stats- Get user statistics and preferencesmal_get_user_info- Get basic user profile informationmal_search_user_list- Search within user's anime list
Analytics
mal_analyze_preferences- Analyze genre/studio preferencesmal_get_watching_history- Get recently updated entriesmal_compare_with_user- Compare lists with another user
Configuration
Environment Variables
# Required: MyAnimeList API credentials
MAL_CLIENT_ID=your_mal_client_id
MAL_CLIENT_SECRET=your_mal_client_secret
# Optional: Customize OAuth callback
MAL_REDIRECT_URI=http://localhost:8080/callback
MAL_CALLBACK_PORT=8080
# Optional: Token storage location
TOKEN_STORAGE_PATH=./tokens.json
# Optional: API settings
MAL_API_BASE_URL=https://api.myanimelist.net/v2
MAL_RATE_LIMIT_DELAY=1000Getting MAL API Credentials
Go to MyAnimeList API
Create a new application
Set redirect URI to
http://localhost:8080/callbackCopy Client ID and Client Secret to your
.envfile
Authentication Flow
The MCP server handles OAuth authentication automatically:
First Use: Call
mal_authenticateto start OAuth flowBrowser Opens: Complete authentication in browser
Tokens Stored: Access/refresh tokens saved securely
Auto-Refresh: Tokens refreshed automatically when needed
API Rate Limiting
The server automatically handles MyAnimeList API rate limits:
Maximum 3 requests per second
Automatic retry with exponential backoff
Graceful error handling for rate limit exceeded
Security
OAuth 2.0 with PKCE prevents authorization code interception
Tokens stored locally and encrypted
No sensitive data logged or transmitted
Automatic token cleanup on revocation
Development
Building from Source
# Install dependencies
npm install
# Development mode with auto-reload
npm run dev
# Build for production
npm run build
# Run tests
npm test
# Type checking
npm run type-checkProject Structure
src/
βββ server.ts # Main MCP server
βββ auth/
β βββ oauth.ts # OAuth 2.0 flow handler
β βββ token-store.ts # Secure token storage
βββ api/
β βββ mal-client.ts # MyAnimeList API client
β βββ endpoints.ts # API endpoint definitions
βββ tools/
β βββ auth-tools.ts # Authentication MCP tools
β βββ list-tools.ts # List management MCP tools
β βββ stats-tools.ts # Statistics MCP tools
βββ types/
βββ mal-types.ts # TypeScript type definitionsTroubleshooting
Server Architecture Issues
Problem: "Connection Error" in MCP Inspector
Solution: Make sure only the MCP server (
build/server.js) is running, not the auth serverExplanation: MCP Inspector connects to the MCP server, not the auth server
Problem: "Not authenticated" errors
Solution:
Start auth server:
node auth-server.jsVisit
http://localhost:3006and loginVerify
tokens.jsonfile existsRestart MCP client to pick up new tokens
Problem: Port conflicts
Auth server: Uses port 3006 (configurable via
MAL_CALLBACK_PORT)MCP Inspector: Uses ports 6274/6277 (managed automatically)
Solution: Make sure ports are available or change in
.env
Authentication Issues
Ensure MAL API credentials are correct in
.envCheck redirect URI is
http://localhost:3006/callbackin MAL app settingsVerify auth server is accessible at
http://localhost:3006
API Errors
Check
tokens.jsonexists and contains valid tokensVerify internet connectivity to MyAnimeList API
Tokens auto-refresh, but may need re-authentication if refresh token expires
Rate Limiting
Server automatically handles MAL's 3 requests/second limit
If persistent issues, avoid concurrent MCP tool calls
Contributing
Fork the repository
Create feature branch (
git checkout -b feature/amazing-feature)Commit changes (
git commit -m 'Add amazing feature')Push to branch (
git push origin feature/amazing-feature)Open Pull Request
License
MIT License - see LICENSE file for details
Support
Report bugs via GitHub Issues
Feature requests welcome
Documentation improvements appreciated
Note: This MCP server requires a MyAnimeList account and API application. Ensure you comply with MyAnimeList's API terms of service.
Available Tools
11 toolsmal_authenticateA
Get instructions for authenticating with MyAnimeList using the web interface
Inputs: no named parameters.
mal_bulk_add_animeB
Bulk add multiple anime to your list by their IDs
Inputs: anime_ids (required), score, status, dry_run.
mal_bulk_delete_animeB
Bulk delete anime from your list (by status or specific IDs)
Inputs: delete_by (required), limit, status, dry_run, +1 more.
mal_bulk_update_animeA
Bulk update anime status for multiple anime (useful for changing watchingβdropped/on_hold)
Inputs: to_status (required), from_status (required), limit, dry_run.
mal_debug_configA
Show current OAuth configuration for debugging
Inputs: no named parameters.
mal_get_auth_statusA
Check current authentication status and get login instructions
Inputs: no named parameters.
mal_get_user_infoB
Get basic user information and statistics
Inputs: no named parameters.
mal_get_user_listB
Get user's anime list with optional filters
Inputs: limit, offset, status.
mal_remove_animeB
Remove anime from user's list
Inputs: anime_id (required).
mal_revoke_authA
Revoke stored authentication tokens
Inputs: no named parameters.
mal_update_animeB
Update anime in user's list (status, score, episodes watched)
Inputs: anime_id (required), score, status, is_rewatching, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 11 tools
Each tool has a distinct purpose: authentication, user info, list retrieval, and CRUD operations on anime list entries are clearly separated. Bulk operations are distinct from single ones, and authentication tools cover different steps.
All tools follow the 'mal_verb_noun' pattern consistently. Verbs are descriptive and consistent (e.g., get_, update_, remove_, bulk_*). No mixing of styles.
11 tools is well-scoped for a MyAnimeList user list management server. Covers authentication, CRUD, bulk operations, and debugging without excess.
The set covers most lifecycle operations for anime list entries, but lacks a single-add tool (only bulk add). Also missing update for user profile, but that's minor. Agents can work around using bulk_add with a single ID.
Maintenance
Related MCP Connectors
Access and interact with anime and manga data seamlessly. Retrieve detailed information about yourβ¦
AniList MCP β wraps AniList GraphQL API (free, no auth)
The media memory layer for AI agents and their humans. Your AI client can search your collection, add and log what you've finished, update ratings and lists, and find patterns across everything you've read, watched, played, and listened to.
Accurate anime-song (anison) database for AI-built playlists β export to Spotify/Apple/YT Music
Related MCP Servers
- AlicenseAqualityDmaintenanceA smart AniList integration for the Model Context Protocol that provides AI assistants with tools for searching media, managing watchlists, and analyzing user anime or manga tastes. It goes beyond basic API calls by offering personalized recommendations, taste comparisons, and natural language profile summaries.55109 npm4MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides access to MyAnimeList's API for anime and manga data. It enables users to search, view rankings, manage their personal lists, and get recommendations through Claude and other MCP clients.86 npm2MIT
- AlicenseAqualityDmaintenanceExposes a user's MyAnimeList data (watch list, scores, statistics) as MCP tools for AI assistants to analyze taste, build statistics, and make recommendations.2012 PyPIMIT
- AlicenseAqualityDmaintenanceEnables AI clients to search, inspect, rank, and manage MyAnimeList anime and manga, including authenticated user list operations.15MIT