MCPHub LabRegistryBabylonSocial/babylon
BabylonSocial

BabylonSocial/babylon

Built by BabylonSocial โ€ข 72 stars

What is BabylonSocial/babylon?

Managed MCP implementation.

How to use BabylonSocial/babylon?

1. Install a compatible MCP client (like Claude Desktop). 2. Open your configuration settings. 3. Add BabylonSocial/babylon using the following command: npx @modelcontextprotocol/babylonsocial-babylon 4. Restart the client and verify the new tools are active.
๐Ÿ›ก๏ธ Scoped (Restricted)
npx @modelcontextprotocol/babylonsocial-babylon --scope restricted
๐Ÿ”“ Unrestricted Access
npx @modelcontextprotocol/babylonsocial-babylon

Key Features

Native MCP Protocol Support
Real-time Tool Activation & Execution
Verified Standard Implementation
Secure Resource & Context Handling

Optimized Use Cases

Extending AI models with custom local capabilities
Automating system workflows via natural language
Connecting external data sources to LLM context windows

BabylonSocial/babylon FAQ

Q

Is BabylonSocial/babylon safe?

Yes, BabylonSocial/babylon follows the standardized Model Context Protocol security patterns and only executes tools with explicit user-granted permissions.

Q

Is BabylonSocial/babylon up to date?

BabylonSocial/babylon is currently active in the registry with 72 stars on GitHub, indicating its reliability and community support.

Q

Are there any limits for BabylonSocial/babylon?

Usage limits depend on the specific implementation of the MCP server and your system resources. Refer to the official documentation below for technical details.

Official Documentation

View on GitHub

๐ŸŽฎ Babylon

A real-time prediction market game with autonomous NPCs, perpetual futures, and gamified social mechanics.


โœ… Complete Feature Set

๐ŸŽฏ Prediction Markets

  • 15-20 active questions at all times
  • Auto-resolution after 1-7 days
  • AMM pricing (constant product market maker)
  • Buy YES/NO shares
  • Real-time odds display

๐Ÿ’ฐ Perpetual Futures

  • 32 company tickers with live prices
  • Long/short with 1-100x leverage
  • Funding rates (paid every 8h)
  • Automatic liquidations
  • Real-time PnL tracking

๐Ÿ“ฑ Question-Driven Feed

  • All posts relate to active prediction questions
  • Events generated by LLM specific to questions
  • Actor posts with real personalities
  • Time-aware clue strength (strengthens toward resolution)
  • Resolution events with definitive proof
  • Group chats discuss predictions
  • Stock prices hint at outcomes

๐ŸŽฎ Reply Guy Mechanics

  • Rate limiting: 1 reply/hour per NPC
  • Quality scoring: length + uniqueness + content
  • Following system: 5-80% probability
  • Group chat invites: 10-60% after being followed
  • Automatic sweeps of inactive/spammy users

๐Ÿ’ต Virtual Wallet

  • 1,000 Points starting balance
  • Transaction logging
  • Lifetime PnL tracking
  • Real-time balance updates
  • Insufficient balance validation

๐Ÿ” Authentication

  • Privy integration
  • EVM wallet support (MetaMask, Rabby, etc.)
  • Multi-provider: Wallet, Email, Farcaster
  • Multi-chain: Ethereum, Base, Optimism, Polygon, Arbitrum
  • Profile setup wizard
  • Farcaster Mini App: Automatic login via Farcaster SDK

๐Ÿค– Agent Infrastructure (ERC-8004 + Agent0)

  • Universal Registration: All entities (game, users, agents) registered on-chain
  • Permissionless Discovery: External agents discover Babylon through Agent0 registry
  • A2A Protocol: Real-time agent-to-agent communication via WebSocket
  • MCP Server: Model Context Protocol endpoint for tool discovery
  • IPFS Metadata: Decentralized agent card storage
  • Reputation System: On-chain reputation tracking and aggregation

๐Ÿš€ Quick Start

# 1. Install
bun install

# 2. Configure environment
cp .env.example .env.local
# Edit .env.local with your Privy credentials + GROQ_API_KEY

# 3. Setup database
bun run prisma:generate
bun run prisma:migrate
bun run prisma:seed

# 4. (Optional) Enable Agent0 Integration
# Add to .env.local:
# AGENT0_ENABLED=true
# BASE_SEPOLIA_RPC_URL=...
# BABYLON_GAME_PRIVATE_KEY=...
# Then register Babylon: bun run scripts/register-babylon-game.ts

# 5. Start development
bun run dev   # โ† Automatically starts web + game engine!

Visit http://localhost:3000 - everything runs and generates content automatically!

Development Modes

Default Mode (Recommended):

bun run dev   # โ† Web + Game Engine (both automatically!)

Runs both web server AND game daemon. Content generates every 60 seconds.

Web Only (No Content Generation):

bun run dev:web-only   # Just Next.js, no daemon

Use if you're only working on frontend and don't need live content.

Serverless Mode (Test Vercel Cron Locally):

bun run dev:cron-mode   # Web + Cron simulator (not daemon)

Tests the serverless cron endpoint instead of daemon. Good for verifying Vercel behavior.

Real-Time Updates

The application uses Server-Sent Events (SSE) for real-time updates (Vercel-compatible):

  • Feed updates (new posts)
  • Market price changes
  • Breaking news
  • Chat messages

For Production (Vercel): Optionally set up Redis for cross-instance broadcasting:

# Add to Vercel environment variables
UPSTASH_REDIS_REST_URL=https://your-redis-url.upstash.io
UPSTASH_REDIS_REST_TOKEN=your-token

๐Ÿ“ฑ Farcaster Mini App Setup

Babylon is configured as a Farcaster Mini App with automatic authentication. Users opening your app from Farcaster/Warpcast are logged in automatically!

Prerequisites

  • Privy account with Farcaster enabled
  • Production deployment at https://babylon.market

Configuration Steps

1. Configure Privy Dashboard (10 min)

Visit https://dashboard.privy.io/ and configure:

Enable Farcaster:

  • Navigate to: User management โ†’ Authentication โ†’ Socials
  • Enable Farcaster

โš ๏ธ CRITICAL: Add Allowed Domains:

  • Navigate to: Configuration โ†’ App settings โ†’ Domains
  • Add these domains:
    • โœ… https://babylon.market (your production domain)
    • โš ๏ธ https://farcaster.xyz โ† REQUIRED for Mini Apps!
    • โœ… http://localhost:3000 (for development)

Why https://farcaster.xyz? Required for iframe-in-iframe support that Farcaster Mini Apps use.

Set Callback URL:

  • Add: https://babylon.market/api/auth/farcaster/callback

2. Verify Environment Variables

Ensure these are set in production:

NEXT_PUBLIC_PRIVY_APP_ID=your_privy_app_id
PRIVY_APP_SECRET=your_privy_app_secret

3. Deploy

vercel --prod

4. Test in Farcaster

Create a cast in Warpcast:

Check out Babylon! ๐Ÿ›๏ธ

https://babylon.market

Click to launch โ†’ Users are automatically logged in! โœจ

How It Works

  1. Mini App SDK detects Farcaster context
  2. Auto-login triggers via Privy + @farcaster/miniapp-sdk
  3. User approves once
  4. Instant authentication - no forms or passwords!

Using Mini App Context in Code

import { useFarcasterMiniApp } from '@/components/providers/FarcasterFrameProvider'

function MyComponent() {
  const { isMiniApp, fid, username } = useFarcasterMiniApp()

  if (isMiniApp) {
    return <div>Welcome from Farcaster, {username}!</div>
  }

  return <div>Welcome to Babylon!</div>
}

Key Resources



๐Ÿงช Testing - Complete E2E Coverage

Complete Synpress testing implementation covering every page, button, and feature!

Quick Verification

# Verify tests work NOW (no setup):
bun test tests/unit/
# โœ… 19/19 PASS

Your Tested Features

All your requirements are tested in tests/synpress/00-critical-path.spec.ts:

โœ… Load feed
โœ… Comment on feed
โœ… Post to feed
โœ… Like feed items
โœ… Visit markets
โœ… Buy/sell all market types
โœ… Leaderboard + ALL buttons
โœ… Rewards + ALL actions

Complete Coverage

  • โœ… 21+ pages tested (every page in app)
  • โœ… Every button tested (automatic discovery)
  • โœ… All features tested (50+ features)
  • โœ… Bulletproof error detection (any error = crash)

Test Commands

bun run test:critical   # Your requirements (5 min)
bun run test:complete   # All pages + buttons (15 min)
bun run test           # Everything (40 min)

See START_TESTING_NOW.md for quick start!


Global Ranking

7.2
Trust ScoreMCPHub Index

Based on codebase health & activity.

Manual Config

{ "mcpServers": { "babylonsocial-babylon": { "command": "npx", "args": ["babylonsocial-babylon"] } } }