- TypeScript 99.1%
- CSS 0.4%
- JavaScript 0.3%
- HTML 0.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
## Problem
MCP server names with invalid characters (spaces, special chars, etc.)
caused tool routing failures when prefixed to tool names, as OpenRouter
API requires tool names to match pattern ^[a-zA-Z0-9_-]{1,64}$
## Solution
- **Added normalizeServerName utility**: Converts invalid characters to underscores
- **Centralized normalization logic**: Shared utility prevents code duplication
- **Fixed tool routing**: Agent loop now matches normalized server names correctly
- **Updated tool discovery**: MCP tools use normalized prefixes consistently
## Examples
- "My Weather Service\!" → "My_Weather_Service"
- "Test@Server#123" → "Test_Server_123"
- "Server...with...dots" → "Server_with_dots"
- " spaces_and__double__underscores " → "spaces_and_double_underscores"
## Technical Details
- Created /src/utils/mcpUtils.ts for shared normalization function
- Updated MCPConnectionManager to use normalized prefixes in tool names
- Fixed agent loop to match connections using normalized names
- Maintains original server names in UI while using normalized names for API
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
||
| docs | ||
| src | ||
| .eslintrc.cjs | ||
| .gitignore | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.js | ||
| README.md | ||
| tailwind.config.js | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
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
-
Install dependencies:
npm install -
Start the development server:
npm run dev -
Open http://localhost:3000 in your browser
Available Scripts
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLintnpm run test- Run testsnpm 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