Added an option to return the MCP results as resource items #80
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.
Description
Fixes #63
I’ve been using the ElevenLabs mcp server in some of my personal agentic projects, and this feature felt relevant for my use case.
There was already an open PR adding support for the ELEVENLABS_MCP_OUTPUT_MODE env var, but it hadn’t been updated in a while. I picked it up to:
• Address the review comments left by @PaulAsjes
• Resolve merge conflicts with the latest main
• Keep the original idea intact while ensuring it aligns with the project’s current codebase
Feature Recap
The new optional env var ELEVENLABS_MCP_OUTPUT_MODE supports three modes:
• files → behaves as before (default)
• resources → encodes results as resource content items
• both → saves data to the filesystem and makes it available as a resource
This flexibility is particularly useful for agentic platforms where filesystem access may be restricted or not ideal.
Credit
The original implementation was done in [PR #64 ]. Huge thanks to them for the groundwork, this PR is mainly to bring it up to date and address feedback so it can land.