aigurletov commited on
Commit
2dc1766
·
1 Parent(s): 8ee3703
Files changed (3) hide show
  1. app.py +12 -0
  2. config.json +16 -0
  3. mcp_debug.log +83 -0
app.py CHANGED
@@ -17,6 +17,18 @@ import httpx
17
  import websockets
18
  from pathlib import Path
19
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  # Configure logging
21
  logging.basicConfig(level=logging.INFO)
22
  logger = logging.getLogger(__name__)
 
17
  import websockets
18
  from pathlib import Path
19
 
20
+ import logging
21
+
22
+ # Настройка детального логирования
23
+ logging.basicConfig(
24
+ level=logging.DEBUG,
25
+ format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
26
+ handlers=[
27
+ logging.FileHandler('mcp_debug.log'),
28
+ logging.StreamHandler()
29
+ ]
30
+ )
31
+
32
  # Configure logging
33
  logging.basicConfig(level=logging.INFO)
34
  logger = logging.getLogger(__name__)
config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "servers": [
3
+ {
4
+ "name": "production-server",
5
+ "endpoint": "https://api.example.com",
6
+ "protocol": "http",
7
+ "auth_token": "your-token-here",
8
+ "capabilities": ["tools", "resources", "prompts"]
9
+ }
10
+ ],
11
+ "ai_settings": {
12
+ "response_max_length": 500,
13
+ "enable_suggestions": true,
14
+ "auto_analyze": false
15
+ }
16
+ }
mcp_debug.log ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-07-14 19:59:19,024 - asyncio - DEBUG - Using proactor: IocpProactor
2
+ 2025-07-14 19:59:19,052 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443
3
+ 2025-07-14 19:59:19,347 - asyncio - DEBUG - Using proactor: IocpProactor
4
+ 2025-07-14 19:59:19,388 - httpcore.connection - DEBUG - connect_tcp.started host='api.gradio.app' port=443 local_address=None timeout=3 socket_options=None
5
+ 2025-07-14 19:59:19,426 - urllib3.connectionpool - DEBUG - https://huggingface.co:443 "HEAD /api/telemetry/gradio/initiated HTTP/1.1" 200 0
6
+ 2025-07-14 19:59:19,452 - httpcore.connection - DEBUG - connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x0000020421198440>
7
+ 2025-07-14 19:59:19,452 - httpcore.connection - DEBUG - start_tls.started ssl_context=<ssl.SSLContext object at 0x000002042010EF00> server_hostname='api.gradio.app' timeout=3
8
+ 2025-07-14 19:59:19,971 - httpcore.connection - DEBUG - start_tls.complete return_value=<httpcore._backends.sync.SyncStream object at 0x000002042118C190>
9
+ 2025-07-14 19:59:19,971 - httpcore.http11 - DEBUG - send_request_headers.started request=<Request [b'GET']>
10
+ 2025-07-14 19:59:19,972 - httpcore.http11 - DEBUG - send_request_headers.complete
11
+ 2025-07-14 19:59:19,972 - httpcore.http11 - DEBUG - send_request_body.started request=<Request [b'GET']>
12
+ 2025-07-14 19:59:19,972 - httpcore.http11 - DEBUG - send_request_body.complete
13
+ 2025-07-14 19:59:19,972 - httpcore.http11 - DEBUG - receive_response_headers.started request=<Request [b'GET']>
14
+ 2025-07-14 19:59:20,150 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Mon, 14 Jul 2025 16:59:20 GMT'), (b'Content-Type', b'application/json'), (b'Content-Length', b'21'), (b'Connection', b'keep-alive'), (b'Server', b'nginx/1.18.0'), (b'Access-Control-Allow-Origin', b'*')])
15
+ 2025-07-14 19:59:20,151 - httpx - INFO - HTTP Request: GET https://api.gradio.app/pkg-version "HTTP/1.1 200 OK"
16
+ 2025-07-14 19:59:20,151 - httpcore.http11 - DEBUG - receive_response_body.started request=<Request [b'GET']>
17
+ 2025-07-14 19:59:20,151 - httpcore.http11 - DEBUG - receive_response_body.complete
18
+ 2025-07-14 19:59:20,152 - httpcore.http11 - DEBUG - response_closed.started
19
+ 2025-07-14 19:59:20,152 - httpcore.http11 - DEBUG - response_closed.complete
20
+ 2025-07-14 19:59:20,152 - httpcore.connection - DEBUG - close.started
21
+ 2025-07-14 19:59:20,152 - httpcore.connection - DEBUG - close.complete
22
+ 2025-07-14 20:01:24,443 - asyncio - DEBUG - Using proactor: IocpProactor
23
+ 2025-07-14 20:01:24,455 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443
24
+ 2025-07-14 20:01:24,740 - asyncio - DEBUG - Using proactor: IocpProactor
25
+ 2025-07-14 20:01:24,796 - urllib3.connectionpool - DEBUG - https://huggingface.co:443 "HEAD /api/telemetry/gradio/initiated HTTP/1.1" 200 0
26
+ 2025-07-14 20:01:24,832 - httpcore.connection - DEBUG - connect_tcp.started host='api.gradio.app' port=443 local_address=None timeout=3 socket_options=None
27
+ 2025-07-14 20:01:24,882 - httpcore.connection - DEBUG - connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x0000023E0319FE00>
28
+ 2025-07-14 20:01:24,883 - httpcore.connection - DEBUG - start_tls.started ssl_context=<ssl.SSLContext object at 0x0000023E0190EF00> server_hostname='api.gradio.app' timeout=3
29
+ 2025-07-14 20:01:25,115 - httpcore.connection - DEBUG - connect_tcp.started host='localhost' port=7860 local_address=None timeout=None socket_options=None
30
+ 2025-07-14 20:01:25,415 - httpcore.connection - DEBUG - start_tls.complete return_value=<httpcore._backends.sync.SyncStream object at 0x0000023E031CF4D0>
31
+ 2025-07-14 20:01:25,415 - httpcore.http11 - DEBUG - send_request_headers.started request=<Request [b'GET']>
32
+ 2025-07-14 20:01:25,416 - httpcore.http11 - DEBUG - send_request_headers.complete
33
+ 2025-07-14 20:01:25,416 - httpcore.http11 - DEBUG - send_request_body.started request=<Request [b'GET']>
34
+ 2025-07-14 20:01:25,416 - httpcore.http11 - DEBUG - send_request_body.complete
35
+ 2025-07-14 20:01:25,416 - httpcore.http11 - DEBUG - receive_response_headers.started request=<Request [b'GET']>
36
+ 2025-07-14 20:01:25,597 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Mon, 14 Jul 2025 17:01:25 GMT'), (b'Content-Type', b'application/json'), (b'Content-Length', b'21'), (b'Connection', b'keep-alive'), (b'Server', b'nginx/1.18.0'), (b'Access-Control-Allow-Origin', b'*')])
37
+ 2025-07-14 20:01:25,598 - httpx - INFO - HTTP Request: GET https://api.gradio.app/pkg-version "HTTP/1.1 200 OK"
38
+ 2025-07-14 20:01:25,598 - httpcore.http11 - DEBUG - receive_response_body.started request=<Request [b'GET']>
39
+ 2025-07-14 20:01:25,598 - httpcore.http11 - DEBUG - receive_response_body.complete
40
+ 2025-07-14 20:01:25,599 - httpcore.http11 - DEBUG - response_closed.started
41
+ 2025-07-14 20:01:25,599 - httpcore.http11 - DEBUG - response_closed.complete
42
+ 2025-07-14 20:01:25,599 - httpcore.connection - DEBUG - close.started
43
+ 2025-07-14 20:01:25,599 - httpcore.connection - DEBUG - close.complete
44
+ 2025-07-14 20:01:27,136 - httpcore.connection - DEBUG - connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x0000023E029CFC50>
45
+ 2025-07-14 20:01:27,137 - httpcore.http11 - DEBUG - send_request_headers.started request=<Request [b'GET']>
46
+ 2025-07-14 20:01:27,137 - httpcore.http11 - DEBUG - send_request_headers.complete
47
+ 2025-07-14 20:01:27,138 - httpcore.http11 - DEBUG - send_request_body.started request=<Request [b'GET']>
48
+ 2025-07-14 20:01:27,139 - httpcore.http11 - DEBUG - send_request_body.complete
49
+ 2025-07-14 20:01:27,139 - httpcore.http11 - DEBUG - receive_response_headers.started request=<Request [b'GET']>
50
+ 2025-07-14 20:01:27,140 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'date', b'Mon, 14 Jul 2025 17:01:26 GMT'), (b'server', b'uvicorn'), (b'content-length', b'4'), (b'content-type', b'application/json')])
51
+ 2025-07-14 20:01:27,140 - httpx - INFO - HTTP Request: GET http://localhost:7860/gradio_api/startup-events "HTTP/1.1 200 OK"
52
+ 2025-07-14 20:01:27,141 - httpcore.http11 - DEBUG - receive_response_body.started request=<Request [b'GET']>
53
+ 2025-07-14 20:01:27,141 - httpcore.http11 - DEBUG - receive_response_body.complete
54
+ 2025-07-14 20:01:27,141 - httpcore.http11 - DEBUG - response_closed.started
55
+ 2025-07-14 20:01:27,142 - httpcore.http11 - DEBUG - response_closed.complete
56
+ 2025-07-14 20:01:27,142 - httpcore.connection - DEBUG - close.started
57
+ 2025-07-14 20:01:27,142 - httpcore.connection - DEBUG - close.complete
58
+ 2025-07-14 20:01:27,143 - httpcore.connection - DEBUG - connect_tcp.started host='localhost' port=7860 local_address=None timeout=3 socket_options=None
59
+ 2025-07-14 20:01:29,182 - httpcore.connection - DEBUG - connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x0000023E031D1CD0>
60
+ 2025-07-14 20:01:29,182 - httpcore.http11 - DEBUG - send_request_headers.started request=<Request [b'HEAD']>
61
+ 2025-07-14 20:01:29,182 - httpcore.http11 - DEBUG - send_request_headers.complete
62
+ 2025-07-14 20:01:29,183 - httpcore.http11 - DEBUG - send_request_body.started request=<Request [b'HEAD']>
63
+ 2025-07-14 20:01:29,183 - httpcore.http11 - DEBUG - send_request_body.complete
64
+ 2025-07-14 20:01:29,183 - httpcore.http11 - DEBUG - receive_response_headers.started request=<Request [b'HEAD']>
65
+ 2025-07-14 20:01:29,295 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'date', b'Mon, 14 Jul 2025 17:01:29 GMT'), (b'server', b'uvicorn'), (b'content-length', b'56157'), (b'content-type', b'text/html; charset=utf-8')])
66
+ 2025-07-14 20:01:29,295 - httpx - INFO - HTTP Request: HEAD http://localhost:7860/ "HTTP/1.1 200 OK"
67
+ 2025-07-14 20:01:29,295 - httpcore.http11 - DEBUG - receive_response_body.started request=<Request [b'HEAD']>
68
+ 2025-07-14 20:01:29,296 - httpcore.http11 - DEBUG - receive_response_body.complete
69
+ 2025-07-14 20:01:29,296 - httpcore.http11 - DEBUG - response_closed.started
70
+ 2025-07-14 20:01:29,296 - httpcore.http11 - DEBUG - response_closed.complete
71
+ 2025-07-14 20:01:29,296 - httpcore.connection - DEBUG - close.started
72
+ 2025-07-14 20:01:29,297 - httpcore.connection - DEBUG - close.complete
73
+ 2025-07-14 20:01:29,576 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443
74
+ 2025-07-14 20:01:29,816 - urllib3.connectionpool - DEBUG - https://huggingface.co:443 "HEAD /api/telemetry/gradio/launched HTTP/1.1" 200 0
75
+ 2025-07-14 20:01:30,934 - matplotlib - DEBUG - matplotlib data path: C:\Users\admin\AppData\Local\Programs\Python\Python313\Lib\site-packages\matplotlib\mpl-data
76
+ 2025-07-14 20:01:30,956 - matplotlib - DEBUG - CONFIGDIR=C:\Users\admin\.matplotlib
77
+ 2025-07-14 20:01:30,958 - matplotlib - DEBUG - interactive is False
78
+ 2025-07-14 20:01:30,958 - matplotlib - DEBUG - platform is win32
79
+ 2025-07-14 20:01:31,029 - matplotlib - DEBUG - CACHEDIR=C:\Users\admin\.matplotlib
80
+ 2025-07-14 20:01:31,038 - matplotlib.font_manager - DEBUG - Using fontManager instance from C:\Users\admin\.matplotlib\fontlist-v390.json
81
+ 2025-07-14 20:01:31,648 - matplotlib.pyplot - DEBUG - Loaded backend tkagg version 8.6.
82
+ 2025-07-14 20:01:31,648 - matplotlib.pyplot - DEBUG - Loaded backend agg version v2.2.
83
+ 2025-07-14 20:01:31,650 - matplotlib.pyplot - DEBUG - Loaded backend tkagg version 8.6.