The Model Context Protocol (MCP) is an open protocol that enables seamless integration between LLM applications and external data sources and tools. It provides a standardized way for AI agents to communicate with external servers and access their capabilities.
Extensive Ecosystem: Access thousands of community-developed and official tools
No Custom Development: Use pre-built tools without writing integration code
Standardized Protocol: Consistent interface across different tool providers
Live Updates: Servers can update tools without changing your code
MCP Security: Only connect to MCP servers you trust. Stdio servers run arbitrary processes on your machine; do not use commands or config from untrusted sources.
from upsonic import Agent, Taskfrom upsonic.tools.mcp import MCPHandlermcp_handler = MCPHandler( command="uvx mcp-server-sqlite --db-path /tmp/db.db", timeout_seconds=60)agent = Agent(model="anthropic/claude-sonnet-4-5")task = Task( description="Query the database to list all tables and their schema information to understand the database structure.", tools=[mcp_handler])result = agent.print_do(task)print("Result:", result)
from upsonic import Agent, Taskfrom upsonic.tools.mcp import MultiMCPHandlermulti_handler = MultiMCPHandler( commands=[ "uvx mcp-server-sqlite --db-path /tmp/db1.db", "uvx mcp-server-sqlite --db-path /tmp/db2.db", ], tool_name_prefixes=["users_db", "products_db"], # Prevent tool name collisions timeout_seconds=60)agent = Agent(model="anthropic/claude-sonnet-4-5")task = Task( description=""" Connect to both databases using prefixed tools: - Use 'users_db_*' tools to query the users database - Use 'products_db_*' tools to query the products database Cross-reference the data between both databases. """, tools=[multi_handler])result = agent.print_do(task)print("Result:", result)
Use tool_name_prefix or tool_name_prefixes when connecting to multiple servers that expose tools with the same names. This prevents collisions and makes it clear which server’s tools to use.