[MCP] feat: Add local MCP client #84
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently we need a third-party tool to be able to interact with MCP server (which can be costly if you have limited quota and result may not be consistent depends on the tools/models you are using), This PR adds a local MCP client for quick local testing.
Small catch, when using STDIO transport (reading local python file as server), the provided examples will all failed due to they won't be able to get environment variables from parent process (this is detail called out in https://fastmcp.mintlify.app/clients/transports#stdio-transport). However, once #82 is in, this problem should go away as the server now then load from
.envfile on the same path and not depends on environment variables from parent process. Thus for the sample example, I put default to HTTP transport (SSE will also work). If preferred, we can change back toSTDIOonce related PR got merged.Also, once #83, I can add example for using diff realm.