A demonstration of the Model Context Protocol (MCP) implementation with Python, featuring both client and server components for AI model interaction.
Install dependencies using uv sync
:
uv sync install
python mcp_client.py
Then input your query when prompted.
npx @modelcontextprotocol/inspector python mcp_server/server.py
python mcp_server/server_sse.py
Set the MCP endpoint to:
http://localhost:8000/sse
mcp dev mcp_server/server_sse.py
or
python mcp_server/server_sse.py
Access the inspector at:
http://127.0.0.1:6274/#tools