from upsonic import Agent, Task
from upsonic.tools.builtin_tools import MCPServerTool
from upsonic.models.anthropic import AnthropicModel
# Create Anthropic model
model = AnthropicModel(
model_name="claude-sonnet-4-5",
provider="anthropic"
)
# Connect to DeepWiki MCP server (Public, No Auth)
mcp_tool = MCPServerTool(
id='deepwiki',
url='https://mcp.deepwiki.com/mcp'
)
# Create agent with the tool
agent = Agent(model=model, tools=[mcp_tool])
# Run task
task = Task('Tell me about the Upsonic/Upsonic repo.')
result = agent.do(task)
print(result)