Skip to content

Commit 6a5dcec

Browse files
xingyaowwopenhands-agentmalhotra5
authored
Remove default MCP servers from preset agents (#984)
Co-authored-by: openhands <openhands@all-hands.dev> Co-authored-by: Rohit Malhotra <rohitvinodmalhotra@gmail.com>
1 parent b061d4e commit 6a5dcec

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

openhands-tools/openhands/tools/preset/default.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,6 @@ def get_default_agent(
7575
agent = Agent(
7676
llm=llm,
7777
tools=tools,
78-
mcp_config={
79-
"mcpServers": {
80-
"fetch": {"command": "uvx", "args": ["mcp-server-fetch"]},
81-
"repomix": {"command": "npx", "args": ["-y", "repomix@1.4.2", "--mcp"]},
82-
}
83-
},
84-
filter_tools_regex="^(?!repomix)(.*)|^repomix.*pack_codebase.*$",
8578
system_prompt_kwargs={"cli_mode": cli_mode},
8679
condenser=get_default_condenser(
8780
llm=llm.model_copy(update={"usage_id": "condenser"})

openhands-tools/openhands/tools/preset/planning.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -152,22 +152,9 @@ def get_planning_agent(
152152
"""
153153
tools = get_planning_tools()
154154

155-
# Add MCP tools that are useful for planning
156-
mcp_config = {
157-
"mcpServers": {
158-
"fetch": {"command": "uvx", "args": ["mcp-server-fetch"]},
159-
"repomix": {"command": "npx", "args": ["-y", "repomix@1.4.2", "--mcp"]},
160-
}
161-
}
162-
163-
# Filter to only read-only MCP tools
164-
filter_tools_regex = "^(?!repomix)(.*)|^repomix.*pack_codebase.*$"
165-
166155
agent = Agent(
167156
llm=llm,
168157
tools=tools,
169-
mcp_config=mcp_config,
170-
filter_tools_regex=filter_tools_regex,
171158
system_prompt_filename="system_prompt_planning.j2",
172159
system_prompt_kwargs={"plan_structure": format_plan_structure()},
173160
condenser=get_planning_condenser(

0 commit comments

Comments
 (0)