Skip to content

PR for team review #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 32 commits into
base: jerome/pr-for-review
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
438ceb3
Implement complete InferenceProvider system with OpenRouter integration
jerome3o-anthropic Jun 10, 2025
12cb59e
Implement MCP OAuth authentication system
jerome3o-anthropic Jun 10, 2025
3a4a5cd
Implement complete conversation system with agent loops
jerome3o-anthropic Jun 11, 2025
aed7a25
Fix authentication state consistency across components
jerome3o-anthropic Jun 11, 2025
e689ace
Add comprehensive conversation system design documentation
jerome3o-anthropic Jun 11, 2025
0a06544
Fix MCP tool naming for OpenRouter API compatibility
jerome3o-anthropic Jun 12, 2025
d028846
Update conversation system documentation for tool naming fix
jerome3o-anthropic Jun 12, 2025
2038ea5
Implement auth token persistence and MCP connection improvements
jerome3o-anthropic Jun 12, 2025
763742e
Implement improved auto-reconnect logic and fix TypeScript errors
jerome3o-anthropic Jun 12, 2025
8c46e57
Implement comprehensive QoL improvements for MCP client
jerome3o-anthropic Jun 12, 2025
0266b48
Fix server name normalization for tool routing compatibility
jerome3o-anthropic Jun 12, 2025
e8197fb
Add persistent model selection with localStorage
jerome3o-anthropic Jun 12, 2025
d9e63a7
Fix model selector being empty after page refresh
jerome3o-anthropic Jun 12, 2025
a901e90
Fix agent loop UI bleeding between conversations
jerome3o-anthropic Jun 12, 2025
e5a16a1
Remove test tabs and simplify UI to conversation-only interface
jerome3o-anthropic Jun 12, 2025
c726e63
Add logout button to conversation sidebar
jerome3o-anthropic Jun 12, 2025
253db5e
Enhance logout to clear MCP OAuth tokens and disconnect all servers
jerome3o-anthropic Jun 12, 2025
6605fbc
Rename logout to reset and clear all localStorage
jerome3o-anthropic Jun 12, 2025
1ab5496
Add tabbed sidebar with MCP server management and resizable interface
jerome3o-anthropic Jun 12, 2025
91608a0
Fix MCP message monitor layout and add collapsible sections
jerome3o-anthropic Jun 13, 2025
4771d8f
Fix duplicate key warnings and improve inference message details
jerome3o-anthropic Jun 17, 2025
7872b5f
Using ping for the keep alive, doing it on a 10min cycle
jerome3o-anthropic Jun 18, 2025
728fea3
Simplify MCP connection handling and remove health checks
jerome3o-anthropic Jun 18, 2025
8ae2da5
Enable static site deployment with OAuth callback support
jerome3o-anthropic Jun 18, 2025
c9feacd
Reduce OAuth state timeout from 10 to 5 minutes for improved security
jerome3o-anthropic Jun 19, 2025
e53be9e
Add support for in-memory MCP servers
jerome3o-anthropic Jun 19, 2025
e746c42
Add documentation for creating in-memory MCP servers
jerome3o-anthropic Jun 19, 2025
496a0a3
Adding WIP notice
jerome3o-anthropic Jun 24, 2025
6b14864
Add GitHub Pages deployment workflow
jerome3o-anthropic Jul 3, 2025
0006f25
Fix TypeScript build errors
jerome3o-anthropic Jul 3, 2025
ccc21b1
Update Vite config for root domain hosting
jerome3o-anthropic Jul 4, 2025
6403c23
Revert Vite config to subdirectory hosting
jerome3o-anthropic Jul 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
},
}
49 changes: 49 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy to GitHub Pages

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist

deploy:
Comment on lines +11 to +34

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 4 days ago

To fix the issue, we need to add a permissions block to the build job in the workflow file. The permissions should be set to the least privilege required for the job to function correctly. Since the build job only needs to read the repository contents, we can set contents: read as the permission.

The changes will be made to the .github/workflows/deploy.yml file:

  1. Add a permissions block under the build job.
  2. Set contents: read as the permission for the build job.
Suggested changeset 1
.github/workflows/deploy.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -11,2 +11,4 @@
     runs-on: ubuntu-latest
+    permissions:
+      contents: read
     
EOF
@@ -11,2 +11,4 @@
runs-on: ubuntu-latest
permissions:
contents: read

Copilot is powered by AI and may make mistakes. Always verify output.
needs: build
runs-on: ubuntu-latest

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
72 changes: 72 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,73 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Dependency directories
node_modules/
.pnp
.pnp.js

# Build outputs
dist/
dist-ssr/
build/
.next/
out/

# Environment variables
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Coverage directory used by tools like istanbul
coverage/
*.lcov
.nyc_output/

# Vite
.vite/

# Testing
.vitest/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea/
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# OS generated files
Thumbs.db
ehthumbs.db

# Temporary files
*.tmp
*.temp
.cache/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Reference materials (keeping this as requested)
reference_info/
67 changes: 67 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# NOTE: this is a work in progress

# 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:
```bash
npm install
```

2. Start the development server:
```bash
npm run dev
```

3. Open [http://localhost:3000](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
Loading