This repository demonstrates the use of Model Context Protocol (MCP) SDK for Python.
To run the development inspector:
mcp dev server.py
To install this MCP plugin in Claude:
-
Run this command:
mcp install server.py
-
Restart Claude
-
Troubleshooting: If you get an error, fix the uv path in the config to an absolute path:
which uv
Then update the configuration with the absolute path.
📺 If you prefer learning from videos, watch
Enable chat.mcp.discovery.enabled: true
in your settings and VS Code will discover existing MCP server lists, and proceed to use the tool in GitHub Copilot Agent mode.
-
If you want to associate the MCP server only with a particular repo, create a
.vscode/mcp.json
file with this content:{ "inputs": [ ], "servers": { "pamelas-mcp": { "command": "PATH/TO/uv", "args": [ "--directory", "/PATH/TO/mcp-python-demo", "run", "server.py" ] } } }
-
Alternatively, if you want to associate the MCP server with all repos, add to your VS Code User Settings JSON:
{ "mcp": { "inputs": [], "servers": { "pamelas-mcp": { "command": "/PATH/TO/uv", "args": [ "--directory", "/PATH/TO/mcp-python-demo", "run", "server.py" ] } } } }
Another way to update settings is to run this command in the terminal:
code-insiders --add-mcp "{\"name\":\"pamelas-mcp\",\"command\":\"/PATH/TO/uv\",\"args\":[\"--directory\",\"/PATH/TO/mcp-python-demo\",\"run\",\"server.py\"]}"
- Now that the mcp server is discoverable, open GitHub Copilot and select the
Agent
mode (notChat
orEdits
). - Select the "refresh" button in the top right corner of the Copilot chat text field to refresh the server list.
- Select the "🛠️" button to see all the possible tools, including the ones from this repo.
- Put a question in the chat that would naturally invoke one of the tools, for example: "What is the current weather in Seattle?".