jack4241 commited on
Commit
a957f90
·
1 Parent(s): 1cdd296

Claude Code

Browse files
Files changed (1) hide show
  1. tests/test_mcp.py +17 -0
tests/test_mcp.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastmcp import FastMCPClient
2
+
3
+ # Endpoint SSE público de tu Space
4
+ MCP_URL = "https://iberley-iberleyia.hf.space/sse"
5
+
6
+ client = FastMCPClient(MCP_URL)
7
+
8
+ # Probar search
9
+ result_search = client.search("Derecho mercantil")
10
+ print("SEARCH RESULT:")
11
+ print(result_search)
12
+
13
+ # Probar fetch
14
+ # Sustituye "document-id" por un id válido si lo tienes
15
+ result_fetch = client.fetch("document-id")
16
+ print("FETCH RESULT:")
17
+ print(result_fetch)