Skip to main content
Glama
priyankapsi

mern_chat_app MCP server

by priyankapsi

mern_chat_app MCP server

Generated from https://github.com/yogsgehlot/Mern-Chat-App (commit 21caed2360bb39358ee031eb29e521a1a1ae1c90).

Setup

  1. pip install -e . (or pip install -r requirements.txt if provided separately).

  2. Copy .env.example to .env and fill in the values below, or have your deployment platform inject them as environment variables directly - nothing here contains real credentials.

  3. Run: python server.py

Related MCP server: MCP CRUD Tools

Required environment variables

Variable

Secret?

Purpose

MERN_CHAT_APP_BASE_URL

no

Base URL of the running mern_chat_app API instance

MERN_CHAT_APP_BEARER_TOKEN

yes

Static bearer token

Transport

Two transports, selected via MCP_TRANSPORT:

  • stdio (default) - the standard subprocess transport most MCP hosts use.

  • streamable-http - hosts this server over HTTP/HTTPS at /mcp, so it can run as a standalone network service. Configure with:

    • HOST (default 0.0.0.0), PORT (default 8000)

    • MCP_TLS_CERTFILE / MCP_TLS_KEYFILE - set both to serve HTTPS directly; otherwise plain HTTP is served (fine behind a TLS-terminating proxy/ingress).

    Example: MCP_TRANSPORT=streamable-http PORT=8000 python server.py

Tools

  • register_user - Register a new user account (name, email, password, optional profile picture URL) and receive a JWT auth token.

  • login_user - Authenticate an existing user with email and password and receive a JWT auth token.

  • search_users - Get or search all users (by name/email keyword), excluding the currently authenticated user.

  • access_chat - Create a new one-to-one chat with another user by userId, or return the existing chat between them.

  • fetch_chats - Fetch all one-to-one and group chats that the authenticated user belongs to, sorted by most recently updated.

  • create_group_chat - Create a new group chat given a group name and a JSON-encoded array of at least 2 member user IDs (the requester is added automatically).

  • rename_group - Rename an existing group chat.

  • remove_from_group - Remove a user from a group chat by chatId and userId. Note: the controller has no server-side admin check despite the doc comment.

  • add_to_group - Add a user to a group chat by chatId and userId.

  • get_messages - Fetch all messages belonging to a given chat, with sender and chat populated.

  • send_message - Send a new message to a chat, updating that chat's latestMessage.

Related MCP Connectors

Related MCP Servers