10.1 MCP: a USB port for AI tools

USB made one plug fit every printer, mouse and camera. The Model Context Protocol (MCP) does that for AI tools: a service such as Sectors publishes an MCP server, and any AI tool that speaks MCP, including Copilot in Agent mode, can plug in. The server offers tools: named actions such as “fetch top gainers”.

Your app with sectors.py (Modules 5 and 6) Copilot with the Sectors MCP server
Who calls Sectors Your Python code, every time the page runs Copilot, when it decides a tool will help answer you
What you write Code, through Copilot Only a question
Result An app other people can use An answer in your chat
Good for Shipping a product Exploring data and ideas before you build

10.2 What changes when the AI can call tools

Without tools, Copilot can only guess at today’s prices from months-old training. With the Sectors MCP server it fetches live data, then reasons about it. It asks before calling a tool, shows the inputs, and each call spends credits. Still check the answer, including its date.

10.3 Instructor demo

Watch the instructor has the Sectors MCP server connected in VS Code and sends, in Agent mode:

Prompt (instructor demo)
Top IDX gainers this week?

Use the Sectors tools. Show the top five over the last 7 days among companies worth more than Rp 5 trillion, as a table with ticker, company name and percent change. Tell me the date the data is as of.
What to notice
  • Copilot picks a Sectors tool for top movers by itself, and asks before it runs it
  • The tool’s inputs: a 7-day period, top gainers, five stocks, a minimum company size
  • The answer gives a date: the data is from the last trading day, not “now”
  • Percent changes are formatted correctly, for example 0.153 shown as 15.3%
  • A follow-up such as “Show the closing prices of the top one for the last 30 days” triggers a second tool call

10.4 Set it up at home

You tell VS Code where the server is and how to sign in, in .vscode/mcp.json or with MCP: Add Server from the Command Palette (Ctrl+Shift+P). Take the address and sign-in steps from docs.sectors.app [VERIFY: Sectors MCP server URL and authentication]. If the file holds your key, add it to .gitignore.