6. Giving Your AI a 'Toolbox' - Understanding MCP ๐Ÿ”ง

Explore Daan's advanced feature: MCP (Model Context Protocol). Learn how connecting external tools can give your AI assistant superpowers like calculation, information lookup, and more!


๐Ÿš€ Making AI More Powerful: Beyond Just Chatting

You might have noticed that while AI is knowledgeable, it sometimes struggles with specific tasks, like:

  • Performing precise mathematical calculations ๐Ÿงฎ
  • Looking up the latest weather or news ๐Ÿ“ฐ
  • Accessing specific local files or databases on your computer ๐Ÿ“

This is where MCP (Model Context Protocol) comes in handy!

Simply put, MCP is like giving the AI an "external toolbox" ๐Ÿงฐ.

When the AI encounters a task it can't handle well on its own (like complex math), if it knows there's a suitable tool in the toolbox (like a calculator) and we allow it to use it, it can:

  1. Call the tool from the toolbox (e.g., send 2+2 to the calculator).
  2. Get the result back from the tool (the calculator returns 4).
  3. Use this result to give you a better, more accurate answer.

This significantly expands the AI's capabilities beyond its pre-trained knowledge base!

๐Ÿ› ๏ธ Configuring Your MCP Toolbox:

  1. Enter Settings:

    • As usual, click the gear icon โš™๏ธ in the top-left corner of Daan's main interface to enter System Settings.
  2. Find MCP Settings:

    • In the settings window's top tabs, click the "MCP" tab. This is where we manage our "external toolbox".
  3. Add an MCP Tool (Server):

    • MCP tools are accessed by connecting to "MCP Servers," each offering one or more tools.
    • Click the "Add Server" button +.
    • Beginner's Experience: Daan often includes a simple built-in example server, like the "Expression Evaluator (Built in)". This tool specifically handles math calculations. Let's start with this one.
      • If it's already in the list, make sure the switch next to it is ON โœ….
      • If not, after clicking "Add Server", you might need to fill in some details (Name could be "Math Calculator", the address might be a special built-in value, Type should be "Expression Evaluator"), follow Daan's prompts.
    • Adding Other Tools: If you have the addresses for other MCP servers (e.g., ones providing web search, database lookups), you can add them via "Add Server", filling in the appropriate Name and Address.
  4. View and Manage Servers:

    • On the MCP settings page, you'll see a list of added servers.
    • The list shows the server's Name, Status (Connected/Disconnected), Type, and Action buttons (like Edit โœ๏ธ or Delete ๐Ÿ—‘๏ธ).
    • You can use the "Connect All" / "Disconnect All" buttons at the top to manage the connection status of all servers.

โšก Enabling and Using MCP Tools in Chat:

Important: MCP tools are not active by default for all chats. You need to enable them manually for specific chat sessions.

  1. Return to the Chat Interface:

    • Go into a chat session where you want the AI to potentially use a tool (it can be a new or existing chat).
  2. Find the MCP Switch:

    • Look carefully above the message input box โฌ†๏ธ in the Middle Chat Area.
    • You might see a section displaying "Available MCP Servers", or perhaps an icon like a lightning bolt โšก or plug ๐Ÿ”Œ.
    • This area lists the MCP servers you added in settings and that are currently connected (e.g., "Expression Evaluator").
  3. Enable the Tool:

    • Next to the tool you want to use (e.g., "Expression Evaluator"), there will usually be a toggle switch or a "Connect" button.
    • Click it to set it to the enabled/connected state โœ….
  4. Let the AI Use the Tool Automatically:

    • Once a tool is enabled, you generally don't need to do anything special when writing your prompt.
    • Just ask the AI your question as usual. If your question involves something the enabled tool can handle (like math), and the AI model is "smart" enough to realize it, it will automatically call that tool.
    • Example: In a chat with the "Expression Evaluator" enabled, simply type a math problem in the input box: Calculate (135 + 76) * 3 / 2 = ?
    • Then send the message.
  5. Observe the Behind-the-Scenes Work (What You Might See):

    • You might notice special messages appearing in the chat history, indicating the AI is using a tool:
      • A prompt like [Tool Call: expr_evaluator] or "Using Tool: Math Calculator".
      • Followed by a message showing the [Tool Result: 316.5] or similar. This message often has a distinct background color (like green โœ… in the screenshot), showing the result returned by the tool.
      • Finally, the AI will incorporate the tool's result into its final, more accurate response to you, like: "The result of (135 + 76) * 3 / 2 is 316.5."
  6. Disabling the Tool:

    • If you want to stop using the MCP tool in this chat, go back to step 3 and find the switch, then turn it OFF โŒ.

๐Ÿ’ก Friendly Reminder:

  • MCP is a relatively advanced feature.
  • Whether the AI successfully uses a tool depends on the AI model's intelligence (it needs to understand when to use the tool) and the reliability of the MCP server/tool itself.
  • Start by experimenting with the built-in "Expression Evaluator" to get a feel for the basic workflow.

๐ŸŽ‰ Superpowers Unlocked!

Congratulations on learning about Daan's MCP feature! By connecting external tools, you can make your AI assistant significantly more powerful and practical.

Finally, let's learn how to better manage your numerous conversation records.