Labsco
mcpmessenger logo

MCP Messenger

β˜… 3

from mcpmessenger

Like n8n for developers

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedAccount requiredNeeds API keys

SlashMCP

MCP-powered AI workspace for document intelligence, multi-agent orchestration, and dynamic MCP server management.

Live Demo: slashmcp.vercel.app | Repository: github.com/mcpmessenger/slashmcp

  • πŸš€ Dynamic MCP Server Registry - Manage and invoke Model Context Protocol servers from the chat interface
  • πŸ“„ Document Intelligence - Drag-and-drop uploads with OCR via AWS Textract and vision analysis via GPT‑4o
  • πŸ“Š Financial Data - Stock quotes, charts, and prediction market data through integrated MCP servers
  • πŸ€– Multi-Agent Framework - Orchestrate multiple AI agents with standardized MCP tool access
  • πŸ”„ LLM Switching - Seamlessly switch between OpenAI, Anthropic, and Gemini providers at runtime

Project repo: https://github.com/mcpmessenger/slashmcp


At a Glance

  • Frontend: Vite + React + TypeScript + Tailwind + shadcn/ui
  • State & Data: TanStack Query, Supabase client
  • Workers / Integrations: Supabase Edge Functions (uploads, vision-worker, textract-worker, chat, job-status)
  • Cloud Services: AWS S3 + Textract, OpenAI GPT‑4o, Google Gemini (fallback), Supabase Postgres
  • Storage: S3 bucket arn:aws:s3:::tubbyai-products-catalog
  • Environment management: .env for Vite, Supabase function secrets for service keys

Key Features & Flow

  1. Upload & Job Tracking

    • src/components/ui/chat-input.tsx drives the menu actions (Upload Files, Document Analysis, Image OCR, Voice Assistant).
    • Frontend calls supabase/functions/uploads to create a processing_jobs row and receive an S3 presigned PUT URL.
    • Upload progress is surfaced in the UI; processing_jobs status transitions are polled via job-status function.
  2. Vision Analysis

    • vision-worker fetches the uploaded asset from S3 via presigned GET, submits to GPT‑4o (with JSON-structured prompt), and persists results to analysis_results.
    • Gemini fallback helpers exist and can be toggled back in if desired.
  3. Textract OCR

    • textract-worker uses AWS Textract (sync for images, async for PDFs) and stores the OCR text + raw response.
    • Frontend handles Textract errors gracefully (e.g., β€œNo text detected”) and falls back to vision summary.
  4. Supabase Schema

    • Migration supabase/migrations/20250108120000_create_processing_jobs.sql provisions:
      • processing_jobs: metadata for each upload
      • analysis_results: OCR + vision outputs (ensure the migration is run on the Supabase project)
      • analysis_results_job_id_unique unique index is required for onConflict: "job_id" upserts
  5. Future Scaffolding

    • Hooks and menu options exist for Whisper ASR and Google TTS pipelines.
    • Natural language prompts (or /imagine <prompt>) funnel through supabase/functions/image-generator, which now targets the Gemini 2.5 Flash Image ("Nano Banana") model for generation.
  6. Stock Quotes & Charts

    • Enter /quote AAPL, /stock MSFT 3m, or /ticker NVDA 1y in the chat input to fetch Alpha Vantage data.
    • The assistant renders a price card with daily trend chart, change metrics, and key stats.
    • MCP endpoint support is scaffolded so /alphavantage-mcp get_stock_chart symbol=NVDA uses the same rendering pipeline (Supabase edge function mcp).
    • Quotes are cached for 5 minutes and automatically fall back to Twelve Data (if TWELVEDATA_API_KEY is set) when Alpha Vantage hits premium/rate limits.
  7. Prediction Markets

    • Use /polymarket-mcp get_market_price market_id=us_election_2024 to pull live odds from Polymarket via the Supabase mcp function.
    • Responses include best bid/ask, implied probability, liquidity, and are cached for 2 minutes (configurable via POLYMARKET_CACHE_TTL_MS).
  8. Provider Switching

    • Use /model openai, /model anthropic, or /model gemini to switch the backing LLM at runtime (defaults to OpenAI).
    • Environment variables and Supabase function secrets (OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY) must be configured for each provider you plan to use.
  9. MCP Slash Commands & Registry

    • Authenticate via the header sign-in button (Google OAuth) or the fallback chat command /slashmcp login email=user@example.com password=secret.
    • Once signed in, manage servers with /slashmcp list, /slashmcp add <name> <https://gateway> (plus optional auth=/key= parameters), and /slashmcp remove <name|serverId>.
    • Provider shortcuts like /gemini or /playwright map to pre-defined presets and prompt for any required secrets.
    • Natural language detectors route common stock and Polymarket questions to the appropriate MCP server automatically when available.
    • Dynamic registry records are stored per-user in Supabase (mcp_servers table) and proxied through new edge functions (mcp-register, mcp-get-registry, mcp-remove, mcp-proxy).

Available Scripts

CommandDescription
npm run devStart Vite dev server
npm run buildProduction build
npm run build:devDevelopment-mode build (useful for staging)
npm run previewPreview built assets
npm run lintESLint across the project

Supabase Edge Functions can be deployed with:

npx supabase functions deploy <function-name> --project-ref <ref>

Directory Highlights

  • src/components β€” Landing page and UI components (Hero, Features, Architecture, CTA).
  • src/components/ui β€” shadcn/ui wrappers.
  • src/lib/api.ts β€” Frontend API client (uploads, Textract, vision).
  • supabase/functions/* β€” Edge functions for uploads, job status, Textract, GPT vision, and chat.
  • supabase/functions/_shared/database.types.ts β€” Generated Supabase typings shared across functions.
  • supabase/migrations β€” Database schema for job tracking + analysis results.

Security & Maintenance

  • Run npm audit (or npm audit --omit=dev) regularly; see β€œSecurity Scan” section below.
  • Restrict Supabase service-role key usage to server-side contexts only; never expose it to the browser.
  • Use AWS IAM roles with least-privilege access to Textract and the specific S3 bucket.
  • Consider setting up Supabase Row Level Security policies if multi-tenant support is required.

Roadmap / TODO

  • Wire up Whisper transcription pipeline with Supabase edge worker + queue status updates.
  • Integrate Google Cloud Text-to-Speech for voice responses.
  • Re-enable Gemini fallback with configurable provider selection and cost tracking.
  • Add automated testing (Cypress/Playwright) for upload + analysis flow.
  • Harden Supabase RLS and add auth once user accounts are introduced.