
theater mcp
An MCP server to interact with the Theater system
Repository Info
About This Server
An MCP server to interact with the Theater system
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Theater MCP Server
A Model Context Protocol (MCP) server for interfacing with the Theater WebAssembly actor system.
Overview
The Theater MCP Server provides a standardized interface for language models and MCP clients to interact with the Theater WebAssembly actor system. It implements the MCP protocol and exposes Theater actors, their state, and event history as resources, as well as providing tools for actor management, messaging, and channel operations.
Features
- Actor Resources: Access actor lists, details, and state via resources
- Event Resources: Access actor event history
- Actor Management Tools: Start, stop, and restart actors
- Message Tools: Send one-way messages and request-response messages
- Channel Tools: Open, send on, and close communication channels
Prerequisites
- Rust 1.70 or newer
- A running Theater server (typically on localhost:9000)
Installation
Clone the repository and build the server:
# Clone the repository
git clone https://github.com/yourusername/theater-mcp-server.git
cd theater-mcp-server
# Build the server
cargo build
Usage
Start the Theater MCP server, pointing it to your Theater server instance:
cargo run -- --theater-address 127.0.0.1:9000
Additional command line options:
--log-level <LEVEL>: Sets the log level (trace, debug, info, warn, error)--log-file <FILE>: Logs to a file instead of stderr
Client Example
The examples/simple_client.rs file demonstrates how to use a basic MCP client to interact with the Theater MCP server:
# Run the example client
cargo run --example simple_client
# To test sending a message to an actor, set the actor ID
THEATER_ACTOR_ID=your-actor-id cargo run --example simple_client
MCP Resources
The server exposes the following resources:
theater://actors: List of all running actorstheater://actor/{actor_id}: Detailed information about a specific actortheater://actor/{actor_id}/state: Current state of a specific actortheater://events/{actor_id}: Event history for a specific actor
MCP Tools
The server provides the following tools:
start_actor: Start a new actor from a manifeststop_actor: Stop a running actorrestart_actor: Restart a running actorsend_message: Send a one-way message to an actorrequest_message: Send a request to an actor and receive a responseopen_channel: Open a communication channel to an actorsend_on_channel: Send a message on an open channelclose_channel: Close an open channel
License
MIT
Quick Start
Clone the repository
git clone https://github.com/colinrozzi/theater-mcpInstall dependencies
cd theater-mcp
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.