• TypeScript 99.1%
  • CSS 0.4%
  • JavaScript 0.3%
  • HTML 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jerome 253db5ebc1
Enhance logout to clear MCP OAuth tokens and disconnect all servers
## Problem
The logout button only cleared inference provider authentication, leaving
MCP OAuth tokens and server connections active. Users remained authenticated
to MCP servers after logging out.

## Solution
- **Clear MCP OAuth tokens**: Remove OAuth tokens and state for all MCP connections
- **Disconnect all servers**: Remove all MCP server connections on logout
- **Complete cleanup**: Comprehensive logout that clears all authentication state
- **Enhanced confirmation**: Updated dialog to inform users about MCP disconnection

## Technical Implementation
- Added MCP context integration to access connections and removal methods
- Clear OAuth tokens from localStorage for each OAuth-enabled connection
- Remove all MCP servers to properly disconnect and clean up connections
- Maintained existing inference provider logout functionality

## User Experience
- ✅ **Complete logout**: All authentication state cleared (inference + MCP)
- ✅ **Clean slate**: No residual authentication data after logout
- ✅ **Clear communication**: User informed about full scope of logout action
- ✅ **Security**: No orphaned authentication tokens left behind

## Data Cleared on Logout
- Inference provider API keys and OAuth tokens
- MCP OAuth tokens and authentication state
- Model selection preferences
- All active MCP server connections

Note: Conversation history remains intact as it's stored separately from auth data.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-12 15:04:08 +01:00
docs Update conversation system documentation for tool naming fix 2025-06-12 12:08:10 +01:00
src Enhance logout to clear MCP OAuth tokens and disconnect all servers 2025-06-12 15:04:08 +01:00
.eslintrc.cjs Implement complete InferenceProvider system with OpenRouter integration 2025-06-10 17:37:11 +01:00
.gitignore Implement complete InferenceProvider system with OpenRouter integration 2025-06-10 17:37:11 +01:00
index.html Implement complete InferenceProvider system with OpenRouter integration 2025-06-10 17:37:11 +01:00
package-lock.json Implement complete InferenceProvider system with OpenRouter integration 2025-06-10 17:37:11 +01:00
package.json Implement complete InferenceProvider system with OpenRouter integration 2025-06-10 17:37:11 +01:00
postcss.config.js Implement complete InferenceProvider system with OpenRouter integration 2025-06-10 17:37:11 +01:00
README.md Implement complete InferenceProvider system with OpenRouter integration 2025-06-10 17:37:11 +01:00
tailwind.config.js Implement complete InferenceProvider system with OpenRouter integration 2025-06-10 17:37:11 +01:00
tsconfig.json Implement improved auto-reconnect logic and fix TypeScript errors 2025-06-12 14:02:00 +01:00
tsconfig.node.json Implement complete InferenceProvider system with OpenRouter integration 2025-06-10 17:37:11 +01:00
vite.config.ts Implement complete InferenceProvider system with OpenRouter integration 2025-06-10 17:37:11 +01:00

Example Remote MCP Client

A React TypeScript application for connecting to multiple MCP (Model Context Protocol) servers and providing a conversational interface with tool calling capabilities.

Features

  • 🔗 Multi-server MCP connections (HTTP/SSE transports)
  • 🤖 Inference provider abstraction (starting with OpenRouter)
  • 💬 Conversational interface with agent loops
  • 🛠️ Real-time tool call visualization
  • 🔍 MCP debugging and message tracing
  • 📱 Responsive UI with left sidebar and chat interface

Development

Prerequisites

  • Node.js (v18 or higher)
  • npm, yarn, or pnpm

Getting Started

  1. Install dependencies:

    npm install
    
  2. Start the development server:

    npm run dev
    
  3. Open http://localhost:3000 in your browser

Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run preview - Preview production build
  • npm run lint - Run ESLint
  • npm run test - Run tests
  • npm run test:ui - Run tests with UI

Architecture

The application is built with a modular architecture using React hooks and providers:

  • InferenceProvider - Abstraction for LLM inference (OpenRouter, etc.)
  • MCPProvider - Multi-server MCP connection management
  • AgentLoop - Tool calling and conversation flow
  • UI Components - Modular, reusable interface components

Technology Stack

  • React 18 with TypeScript
  • Vite for build tooling
  • Tailwind CSS for styling
  • MCP TypeScript SDK for protocol implementation
  • Vitest for testing

Project Status

This is an active development project serving as both:

  • A public example implementation of MCP client features
  • A prototyping testbed for MCP protocol changes