Files
2026-07-13 13:31:35 +08:00

1.1 KiB

Running this sample

You're recommended to install uv but it's not a must, see instructions

-0- Create a virtual environment

python -m venv venv

-1- Activate the virtual environment

venv\Scrips\activate

-2- Install the dependencies

pip install "mcp[cli]"

-3- Run the sample

python client.py

You should see an output similar to:

LISTING RESOURCES
Resource:  ('meta', None)
Resource:  ('nextCursor', None)
Resource:  ('resources', [])
                    INFO     Processing request of type ListToolsRequest                                                                               server.py:534
LISTING TOOLS
Tool:  add
READING RESOURCE
                    INFO     Processing request of type ReadResourceRequest                                                                            server.py:534
CALL TOOL
                    INFO     Processing request of type CallToolRequest                                                                                server.py:534
[TextContent(type='text', text='8', annotations=None)]