Skip to main content
Glama
tuananhdta

RagBrain Auth MCP Server

by tuananhdta

RagBrain auth MCP server

Simple MCP server for:

  • POST /api/v1/auth/register

  • POST /api/v1/auth/login

  • GET /api/v1/auth/me

API base:

https://ragbrain-production.up.railway.app

Override with:

export RAGBRAIN_API_BASE="https://ragbrain-production.up.railway.app"

Setup

cd /home/mediax/research/mcp_research
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -r requirements.txt

Related MCP server: Brainbase MCP

Run streamable HTTP server

python ragbrain_auth_mcp_server.py

Default MCP endpoint:

http://127.0.0.1:8765/mcp

Override host, port, or path:

MCP_HOST=0.0.0.0 MCP_PORT=8765 MCP_PATH=/mcp python ragbrain_auth_mcp_server.py

Tools

ragbrain_register

Inputs:

  • email

  • password

  • full_name optional

ragbrain_login

Inputs:

  • email

  • password

Returns the API access_token and caches it in the server process.

ragbrain_me

Inputs:

  • access_token optional

If access_token is omitted, it uses the token cached by the latest successful ragbrain_login.

Streamable HTTP client config example

{
  "mcpServers": {
    "ragbrain-auth": {
      "url": "http://127.0.0.1:8765/mcp"
    }
  }
}

Start the server first:

cd /home/mediax/research/mcp_research
.venv/bin/python ragbrain_auth_mcp_server.py

Note: some clients only support local STDIO MCP servers. Use a client that supports MCP Streamable HTTP.

OpenAI Agents SDK client

This repo also includes a simple OpenAI Agents SDK agent that uses the MCP server above.

Start the MCP server:

cd /home/mediax/research/mcp_research
.venv/bin/python ragbrain_auth_mcp_server.py

In another terminal, verify the agent can see the MCP tools without calling OpenAI:

cd /home/mediax/research/mcp_research
.venv/bin/python ragbrain_auth_agent.py --list-tools

Run the agent with OpenAI:

cd /home/mediax/research/mcp_research
export OPENAI_API_KEY="..."
.venv/bin/python ragbrain_auth_agent.py "Login to RagBrain with email user@example.com and password ..."

Optional config:

export RAGBRAIN_MCP_URL="http://127.0.0.1:8765/mcp"
export OPENAI_AGENT_MODEL="gpt-5.6"

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables management of Brainbase agents, components, evals, tasks, and more via a remote MCP connection with OAuth authentication.
    2
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides authentication infrastructure for coding agents, enabling user pool management, encrypted secrets storage, and JWT token operations through MCP tools.
    22 npm
    -