Loading the notebook…
Loading the notebook…
Notebooks · First agents · 05
This notebook shows how to attach remote MCP servers and combine them with local tools.
Its imports and arguments are checked against shipit-agent 3.0. The outputs were saved when it was written, for an earlier release.
from pathlib import Path
import sys
ROOT = (
Path.cwd().resolve().parent
if Path.cwd().name == "notebooks"
else Path.cwd().resolve()
)
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
from examples.run_multi_tool_agent import build_llm_from_env
from shipit_agent import Agent, MCPHTTPTransport, RemoteMCPServer, WorkspaceFilesToolmcp = RemoteMCPServer(
name="demo_mcp",
transport=MCPHTTPTransport("http://127.0.0.1:8080/mcp"),
)
llm = build_llm_from_env("bedrock")
agent = Agent(
llm=llm,
tools=[WorkspaceFilesTool(root_dir=str(ROOT))],
mcps=[mcp],
)
agent.doctor().to_markdown()If your MCP server is running, you can now call agent.run(...) or agent.stream(...) and the runtime can choose both local tools and remote MCP tools.