diff --git a/nostr_dvm/interfaces/dvmtaskinterface.py b/nostr_dvm/interfaces/dvmtaskinterface.py index 2e50b9b..e6bd014 100644 --- a/nostr_dvm/interfaces/dvmtaskinterface.py +++ b/nostr_dvm/interfaces/dvmtaskinterface.py @@ -137,6 +137,7 @@ class DVMTaskInterface: nip89.PK = self.PRIVATE_KEY nip89.DTAG = nip89config.DTAG nip89.CONTENT = nip89config.CONTENT + nip89.EXTRA_TAGS = nip89config.EXTRA_TAGS return nip89 async def is_input_supported(self, tags, client=None, dvm_config=None) -> bool: diff --git a/nostr_dvm/utils/nip89_utils.py b/nostr_dvm/utils/nip89_utils.py index 0fa92c3..ec7ffea 100644 --- a/nostr_dvm/utils/nip89_utils.py +++ b/nostr_dvm/utils/nip89_utils.py @@ -34,7 +34,7 @@ async def nip89_announce_tasks(dvm_config, client): keys = Keys.parse(dvm_config.NIP89.PK) content = dvm_config.NIP89.CONTENT - tags += dvm_config.EXTRA_TAGS + tags += dvm_config.NIP89.EXTRA_TAGS event = EventBuilder(EventDefinitions.KIND_ANNOUNCEMENT, content).tags(tags).sign_with_keys(keys) diff --git a/tests/mcp_dvm_client.py b/tests/mcp_dvm_client.py index 2ecdb80..d4357b1 100644 --- a/tests/mcp_dvm_client.py +++ b/tests/mcp_dvm_client.py @@ -90,8 +90,8 @@ async def nostr_client(): await client.subscribe(mcp_filter, None) #await nostr_client_test_mcp_get_tools() - #await nostr_client_test_mcp_execute_tool(tool_name="get-crypto-price", tool_parameters={"symbol": "BTC"}) - await nostr_client_test_mcp_execute_tool(tool_name="echo_tool", tool_parameters={"message": "Hello"}) + await nostr_client_test_mcp_execute_tool(tool_name="get-crypto-price", tool_parameters={"symbol": "BTC"}) + #await nostr_client_test_mcp_execute_tool(tool_name="echo_tool", tool_parameters={"message": "Hello"}) class NotificationHandler(HandleNotification): diff --git a/tests/mcp_server_config.json b/tests/mcp_server_config.json index b87ab48..db8e544 100644 --- a/tests/mcp_server_config.json +++ b/tests/mcp_server_config.json @@ -7,7 +7,18 @@ "mcp-crypto-price": { "command": "node", "args": [ - "/Volumes/Home/~/Documents/mcp-crypto-price/build/index.js" + "../../mcp-crypto-price/build/index.js" + ] + }, + "Echo": { + "command": "uv", + "args": [ + "run", + "--with", + "mcp[cli]", + "mcp", + "run", + "tests/mcp_server.py" ] } } diff --git a/tests/mcp_test.py b/tests/mcp_test.py index 8c2da32..942ea63 100644 --- a/tests/mcp_test.py +++ b/tests/mcp_test.py @@ -102,4 +102,4 @@ if __name__ == '__main__': else: raise FileNotFoundError(f'.env file not found at {env_path} ') - playground(announce=False) + playground(announce=True)