Donew Experimental Release 0.1.8 🎉
MCP.Run Tasks mcp.run Tasks

We heard you like MCPs

So we buddied up with the wonderful folks at MCP.run who solved hosting, discovery, and management of Model Context Protocol servlets suitable for donews. Leveraging their MCP.run servlets in donew is a breeze.

Key Benefits

  • Many pre-made servlets for common tasks already available ready to discover.
  • Really easy to make your own MCP.run servlets and use them in donew.
  • donew lets you easily combine MCP servlets with other donew tasks.
  • And then you can even nest donew tasks within donew tasks to build really powerful workflows 🤯

Quick example to get you started

Example 1: Solve math questions using wolfram alpha

create a task at mcp.run. follow docs.mcp.run/tasks/using-tasks to create a task.

it should look like this:

MCP.run Wolfram Alpha Task
from donew import DO, LiteLLMModel, MCPRun
from pydantic import create_model, Field
 
# Create input/output models
input_model = create_model(
    "InputSchema",
    question=(str, Field(
        description="The math question to solve using wolfram alpha"
    ))
)
output_model = create_model(
    "OutputSchema",
    answer=(str, Field(
        description="The answer to the question"
    ))
)
 
# Setup MCP and model
mcp = MCPRun(
    profile="denizkenan/wolfram",
    task="AskWolframAlpha",
    input_model=input_model
)
model = LiteLLMModel(model_id="gpt-4o-mini")
 
# Create and execute the task
super_doer = DO.New(
    model,
    name="wolfram_alpha_task_doer",
    purpose="You are a helpful assistant that can solve math questions using wolfram alpha."
)
result = (super_doer
    .realm([mcp])
    .envision(output_model)
    .enact("What is distance between earth and moon in units of african elephants?"))
print(result)