Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit411ab6c

Browse files
committed
fix: oap mcp exclude_tools field is not respected
1 parentb79eeb9 commit411ab6c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎dive_mcp_host/oap_plugin/config_mcp_servers.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,13 @@ async def current_config_callback(self, config: Config) -> Config:
6969
mcp_enabled[oap["id"]]=server.enabled
7070

7171
# remove oap mcp servers
72+
# preserve old config, might be used to construct final output
73+
old_oap:dict[str,MCPServerConfig]= {}
7274
ifmcp_serversisNoneorlen(mcp_servers)>0:
7375
forkeyinconfig.mcp_servers.copy():
7476
value=config.mcp_servers[key]
7577
ifvalue.extra_dataandvalue.extra_data.get("oap"):
76-
config.mcp_servers.pop(key)
78+
old_oap[key]=config.mcp_servers.pop(key)
7779

7880
ifmcp_serversisNone:
7981
returnconfig
@@ -82,11 +84,13 @@ async def current_config_callback(self, config: Config) -> Config:
8284
headers=server.headers.copy()
8385
ifserver.auth_type=="header":
8486
headers.update({"Authorization":f"Bearer{self.device_token}"})
87+
old_config=old_oap.get(server.name)
8588
config.mcp_servers[server.name]=MCPServerConfig(
8689
enabled=mcp_enabled.get(server.id,True),
8790
url=server.url,
8891
transport=server.transport,
8992
headers=headers,# type: ignore
93+
exclude_tools=old_config.exclude_toolsifold_configelse [],
9094
extraData={
9195
"oap": {
9296
"id":server.id,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp