What is Model Context Protocol (MCP) ?

The Model Context Protocol (MCP) is an open protocol that enables seamless integration between LLM applications and external data sources and tools.

While using Upsonic, you can directly use tools developed with MCP (MCP Servers). This way, you can create various agents and handle your tasks using both official tools made by different companies daily and community-developed tools, providing access to an extensive tool ecosystem.

Server Lists

There are certain MCP Server lists created to view various MCP servers and learn how to use them. Some of these are:

Server Types

  • NPX Based: You need to install node.js to use this kind of tools.
  • UVX: They are python based tools you dont need to install anything.
  • Docker: If you have an docker installation you can easily run these tools with a great isolation.

Connecting an Example MCP Server

Upsonic uses a structure that involves class creation for connecting to MCP servers. This structure allows you to easily create multiple integrations and use them whenever needed.

In this example, we will integrate the HackerNews MCP:

# Hackernews MCP Server
class HackerNewsMCP:
    command = "uvx"
    args = ["mcp-hn"]

task = Task(
  "Get the latest tecnical news",
  tools=[HackerNewsMCP]
)

and GitHub MCP:

# GitHub MCP Server - Requires Node.JS
class GitHubMCP:
    command = "npx"
    args = ["-y", "@modelcontextprotocol/server-github"]
    env = {
      "GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
    }

task = Task(
  "Check the repositories",
  tools=[GitHubMCP]
)