]> us-delaporte.pagekite.me Git - matrix-shop-bot.git/commitdiff
WIP skill with llama-ui
authorEdward Delaporte <edward@delaporte.us>
Sun, 26 Jul 2026 23:57:37 +0000 (18:57 -0500)
committerEdward Delaporte <edward@delaporte.us>
Sun, 26 Jul 2026 23:57:37 +0000 (18:57 -0500)
README.md
skill.py

index 04caa1641847fb326aa6507c5280a86ae1932fcc..0b0ba5941d3deabce6345bcf3dc826a354665abf 100644 (file)
--- a/README.md
+++ b/README.md
@@ -84,3 +84,21 @@ As of the last update to this README, the expected End-of-Life date of this prod
 End-of-Life was decided upon based on these dependencies:
 
     - Python 3.12 (October 2028)
+
+## Use with as an MCP Skill with llama-ui
+
+Install with `mcp` support:
+
+    pip install -e ".[llm]"
+
+Set hostname as `MY_IP` environment variable, and run:
+
+Run:
+
+    MY_IP=192.168.68.0
+    python skill.py
+
+In Lamma UI, click `MCP Servers` / `+ Add New Server`.
+
+    192.168.68.0:9000
+
index 53bdf9ef052c008155ade4a63cd1b26320184ab0..82540b01157a7cf0886a78406cff6bdeec056cb3 100644 (file)
--- a/skill.py
+++ b/skill.py
@@ -1,6 +1,8 @@
 from fastmcp import FastMCP
 from matrix_shop_bot.db import Data
+import os
 
+MY_IP=os.environ.get('MY_IP')
 mcp = FastMCP("Shop Bot")
 
 @mcp.tool
@@ -42,4 +44,4 @@ def add_item(name: str) -> 'list[str]':
 #    return Data().list_purchases(store)
 
 if __name__ == "__main__":
-    mcp.run(transport="http", host="127.0.0.1", port=9000)
+    mcp.run(transport="http", host=MY_IP, port=9000)