- Build all:
npm run build - Build client:
npm run build-client - Build server:
npm run build-server - Development mode:
npm run dev(usenpm run dev:windowson Windows) - Production mode:
npm run start(with authentication enabled) - Format code:
npm run prettier-fix - Client lint:
cd client && npm run lint
Procedure for publishing new versions:
- Update version:
npm run update-version -- <version>(e.g.,0.1.3)- This updates all package.json files and rebuilds
- Publish:
npm run publish-all- Publishes all workspace packages and the root package
- Commit and tag:
git add -A && git commit -m "chore: bump version to <version>" git tag v<version> git push && git push --tags
- Test: Wait ~1 minute for NPM CDN, then test with
bunx @bryan-thompson/dashboard@latest
IMPORTANT: Always test with npm run start (auth enabled) before publishing, not just npm run dev (no auth).
Feature: Enhanced server cards with transport type, tool count, and connection details.
Implementation Details:
- Backend: Enhanced
getStatusSummary()to includetransport,connectionInfo, andtoolCount - Tool Discovery: Automatic tool discovery on connection using
transport.send()directly - Frontend: Server cards display transport badge, tool count, and connection details
Key Technical Decisions:
-
Tool Discovery Method:
- Initially tried
client.listTools()but it timed out (60 second timeout) - Switched to direct
transport.send()with manual message handler - Used 5-second timeout for faster feedback
- Pattern matches the working API endpoint approach
- Initially tried
-
Connection Info Display:
- STDIO: Shows command path (e.g.,
node build/index.js) - SSE/HTTP: Shows server URL (e.g.,
http://localhost:10650/mcp) - Displayed in monospace code block for clarity
- STDIO: Shows command path (e.g.,
-
Edit Server Functionality:
- Added edit button to each server card
- Dual-mode dialog (Add/Edit) with form pre-population
- Smart reconnection: only disconnects/reconnects if transport/command/URL changes
- Added
GET /api/dashboard/servers/:idendpoint for fetching full config - Added
PUT /api/dashboard/servers/:idendpoint for updates - Changes persisted to dashboard-config.json
Testing Notes:
- Verified with STDIO, SSE, and Streamable HTTP transports
- Tool count works correctly for all transport types
- chroma-http: 19 tools, qdrant-http: 6 tools (verified)
Key Takeaway: When implementing tool discovery, use the direct transport.send() approach with manual message handling rather than high-level client methods for better timeout control and reliability.
Issue: Dashboard worked in dev mode (npm run dev --no-auth) but failed with "Connection error" when running with authentication enabled (bunx @bryan-thompson/dashboard).
Root Cause:
- Server authentication middleware requires
x-mcp-proxy-authheader on all API requests - Client was only sending token with SSE connections (via query parameter)
- All REST API endpoints (
/api/dashboard/*) were returning 401 Unauthorized
Solution:
- Added
getAuthHeaders()helper in client components - Updated all
fetch()calls to includex-mcp-proxy-authheader - Token priority: URL param (
MCP_PROXY_AUTH_TOKEN) → localStorage → empty string - Added automatic localStorage clearing on 401 errors
Key Takeaway: When adding authentication to a REST API + SSE system, ensure ALL endpoints (not just SSE) receive the auth token in the correct format for each transport (headers for REST, query params for SSE).
- Use TypeScript with proper type annotations
- Follow React functional component patterns with hooks
- Use ES modules (import/export) not CommonJS
- Use Prettier for formatting (auto-formatted on commit)
- Follow existing naming conventions:
- camelCase for variables and functions
- PascalCase for component names and types
- kebab-case for file names
- Use async/await for asynchronous operations
- Implement proper error handling with try/catch blocks
- Use Tailwind CSS for styling in the client
- Keep components small and focused on a single responsibility
The project is organized as a monorepo with workspaces:
client/: React frontend with Vite, TypeScript and Tailwindserver/: Express backend with TypeScriptcli/: Command-line interface for testing and invoking MCP server methods directly