VibeSpace Ternary MCP server

Enables real-time streaming of contextual information through NATS with ternary data representation, featuring configurable privacy controls and JSON-RPC methods for collaborative virtual environments.
Back to servers
Setup instructions
Provider
Barton Rhodes
Release date
Mar 20, 2025
Language
Go

This MCP server enables managing "vibes" (emotional atmospheres) and "worlds" (physical or virtual spaces) with real-time NATS streaming. It provides custom URI schemes for resource access and supports comprehensive data management with streaming capabilities.

Installation

You can add this package to your Go project using:

go get github.com/bmorphism/vibespace-mcp-go

Running the Server

To run the server with the Just command runner:

just run

Or build and run manually:

just build
./bin/vibespace-mcp

NATS Subscriber Example

You can use the included NATS subscriber to listen for world moments:

cd examples
./run_nats_subscriber.sh [nats-url] [stream-id] [user-id]

Parameters:

  • nats-url: NATS server URL (defaults to nats://nonlocal.info:4222)
  • stream-id: Stream ID for subject namespacing (defaults to ies)
  • user-id: Optional user ID for user-specific streams

Using the MCP Server

Available Resources

The server provides these resources:

  • vibe://list - List all vibes
  • vibe://{id} - Access a specific vibe
  • world://list - List all worlds
  • world://{id} - Access a specific world
  • world://{id}/vibe - Access a world's vibe

Vibe Management

Create, update, and delete vibes using these tools:

// Create a new vibe
const response = await mcp.tools.create_vibe({
  name: "Focused Calm",
  description: "A calm atmosphere for focused work",
  sensorData: {
    temperature: 21,
    humidity: 45,
    light: 70,
    sound: 30,
    movement: 10
  }
});

// Update a vibe
await mcp.tools.update_vibe({
  id: "vibe-id-123",
  name: "Deep Focus",
  sensorData: {
    sound: 20 // Only update the sound level
  }
});

// Delete a vibe
await mcp.tools.delete_vibe({
  id: "vibe-id-123"
});

World Management

Create, update, and manage worlds:

// Create a new world
const worldResponse = await mcp.tools.create_world({
  name: "Creative Studio",
  description: "A virtual space for creative collaboration",
  type: "virtual", // Options: "physical", "virtual", "hybrid"
  features: ["whiteboards", "audio-chat", "screen-sharing"]
});

// Update a world
await mcp.tools.update_world({
  id: "world-id-456",
  name: "Creative Studio Plus",
  features: ["whiteboards", "audio-chat", "screen-sharing", "3d-models"]
});

// Associate a vibe with a world
await mcp.tools.set_world_vibe({
  worldId: "world-id-456",
  vibeId: "vibe-id-123"
});

// Delete a world
await mcp.tools.delete_world({
  id: "world-id-456"
});

Real-time Streaming

The server supports real-time streaming of world moments via NATS:

// Start streaming
await mcp.tools.streaming_startStreaming({
  url: "nats://nonlocal.info:4222",
  streamId: "my-stream",
  worldId: "world-id-456",
  userId: "user-123" // Optional
});

// Stream a world moment
await mcp.tools.streaming_streamWorld({
  worldId: "world-id-456",
  userId: "user-123",
  customData: {
    action: "user_joined",
    details: "User joined the creative session"
  }
});

// Get streaming status
const status = await mcp.tools.streaming_status();
console.log(`Connected users: ${status.connectedUsers.length}`);

// Update streaming configuration
await mcp.tools.streaming_updateConfig({
  rateLimit: 30, // Messages per second
  qualityIndicators: true
});

// Stop streaming
await mcp.tools.streaming_stopStreaming();

Binary Data Support

You can include binary data in your streams with multiple encoding formats:

// Stream with binary data
await mcp.tools.streaming_streamWorld({
  worldId: "world-id-456",
  userId: "user-123",
  customData: {
    action: "share_document"
  },
  binaryData: {
    data: "SGVsbG8gV29ybGQ=", // Base64 encoded data
    format: "text/plain"
  }
});

// Using balanced ternary encoding for efficient numerical representation
const ternaryEncoding = "10T01T001T10T01"; // Balanced ternary 
await mcp.tools.streaming_streamWorld({
  worldId: "world-id-456",
  userId: "user-123",
  customData: {
    action: "share_mathematical_model"
  },
  balancedTernaryData: ternaryEncoding
});

Example Use Case: Team Collaboration

Here's how a team can use the vibespace MCP server:

// Create a shared team world
const response = await mcp.tools.create_world({
  name: "Team Workspace",
  description: "A shared space for our team",
  type: "hybrid",
  features: ["presence-indication", "research-sharing", "distributed-computation"],
  sharingSettings: {
    isPublic: false,
    allowedUsers: ["alice", "bob", "carol"],
    contextLevel: "full"
  }
});

// Set the team vibe
await mcp.tools.set_world_vibe({
  worldId: response.id,
  vibeId: "productive-flow"
});

// Start real-time collaboration
await mcp.tools.streaming_startStreaming({
  url: "nats://nonlocal.info:4222",
  streamId: "team-alpha",
  worldId: response.id,
  userId: "alice"
});

Team members can now share updates, collaborate in real-time, and maintain awareness of each other's activities across different tools and interfaces.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "vibespace-ternary" '{"command":"npx","args":["-y","github:bmorphism/vibespace-mcp-go-ternary"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "vibespace-ternary": {
            "command": "npx",
            "args": [
                "-y",
                "github:bmorphism/vibespace-mcp-go-ternary"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "vibespace-ternary": {
            "command": "npx",
            "args": [
                "-y",
                "github:bmorphism/vibespace-mcp-go-ternary"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later