Java (Programmatic Startup)
import org.tinystruct.ApplicationContext; import org.tinystruct.application.Context; import org.tinystruct.system.ApplicationManager; import org.tinystruct.system.Settings; import org.tinystruct.system.HttpServer;import org.tinystruct.system.TomcatServer;public class Main { public static void main(String[] args) { Context ctx = new ApplicationContext(); ctx.setAttribute("--server-port", "8080"); ApplicationManager.install(new org.tinystruct.mcp.GitHub()); ApplicationManager.install(new org.tinystruct.mcp.FileSystem()); ApplicationManager.install(new HttpServer());ApplicationManager.install(new TomcatServer());ApplicationManager.call("start", ctx); } }
CLI (Recommended for Most Users)
If you have the bin/dispatcher script (from the Tinystruct distribution), you can start the server directly from the command line:
To start the server with the built-in GitHub and FileSystem modules:
bin/dispatcher start --import org.tinystruct.system.HttpServer --import org.tinystruct.mcp.GitHub --import org.tinystruct.mcp.FileSystem --server-port 777bin/dispatcher start --import org.tinystruct.system.TomcatServer --import org.tinystruct.mcp.GitHub --import org.tinystruct.mcp.FileSystem --server-port 777
- You can add or remove imports to customize which modules and tools are loaded.
0 commit comments