-
Notifications
You must be signed in to change notification settings - Fork 1.2k
add: Load MCP Servers from configuration #2647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@fswair Thanks Mert! A few high level notes:
|
Thanks for reply. I'm gonna change validation logic with Pydantic again. We talked before PR with Marcelo and he said there no need to add it as a member method, so i defined it as a pure function like he said. In the first implementation, it was a member method and there was Btw, I found this more useful as a pure method, like marcelo. |
Might be some parameters to pass MCPServer constructors? Example, timeout, read_timeout and max_retries pretty enough for this load mechanism. I thought: Especially, timeout parameter needed for this kind things. I used this document to define structure: https://docs.anthropic.com/en/docs/claude-code/mcp , if this notation supports timeout and readTimeout it can be passed directly from MCP config. I'm a bit confused about this configuration standart. |
@fswair yeah that makes more sense to me, copy the arguments that make sense. |
cool. |
Logic changed, tests fixed. |
Summary
As we talked before with @Kludex about loading mcp servers from an existed configuration, I made this PR to implement this. It is based on Claude config files. See: https://docs.anthropic.com/en/docs/claude-code/mcp
Changes
load_mcp_servers
function to Load MCP Servers from a configuration file or configuration data.test_load_mcp_servers
test function to mcp_test.pyUsing