FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-sdk/docs_src/client/tutorial002.py at main · modelcontextprotocol/python-sdk · GitHub
modelcontextprotocol
python-sdk
Repository navigation
Code
Issues
247
(247)
Pull requests
106
(106)
Actions
Projects
Security and quality
12
(12)
Insights
Expand file tree
Breadcrumbs
python-sdk
/
docs_src
/
client
/
tutorial002.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
17 lines (12 loc) · 385 Bytes
Breadcrumbs
python-sdk
/
docs_src
/
client
/
tutorial002.py
Copy path
File metadata and controls
17 lines (12 loc) · 385 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import
anyio
from
mcp
import
Client
async
def
main
()
->
None
:
async
with
Client
(
"http://localhost:8000/mcp"
)
as
client
:
result
=
await
client
.
list_tools
()
for
tool
in
result
.
tools
:
print
(
tool
.
name
)
print
(
tool
.
title
)
print
(
tool
.
description
)
print
(
tool
.
input_schema
)
if
__name__
==
"__main__"
:
anyio
.
run
(
main
)
Back
|
FazBrowse Home
|
New Git URL