fix: register FarcasterActionProvider so farcaster_username is reachable#111
Open
golldyck wants to merge 1 commit intobase:masterfrom
Open
fix: register FarcasterActionProvider so farcaster_username is reachable#111golldyck wants to merge 1 commit intobase:masterfrom
golldyck wants to merge 1 commit intobase:masterfrom
Conversation
The farcaster_username tool was refactored to the ActionProvider pattern in PR base#75 but never wired into src/main.ts, leaving it as dead code. Added a factory export in src/tools/farcaster/index.ts matching the convention used by every other provider, and conditionally register it via getActionProvidersWithRequiredEnvVars() when NEYNAR_API_KEY is set, mirroring the existing flaunchActionProvider / PINATA_JWT pattern. Closes base#103
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The
farcaster_usernametool was refactored to theActionProviderpattern in PR #75, but it was never registered insrc/main.ts, so the tool is dead code and never appears in the MCP tool list regardless of configuration.src/tools/farcaster/index.tsis also missing the factory export that every other provider exposes.Fix
Added the missing
farcasterActionProviderfactory export, and registered it throughgetActionProvidersWithRequiredEnvVars()gated onNEYNAR_API_KEY, mirroring the existingflaunchActionProvider/PINATA_JWTpattern. This keeps the tool opt-in and avoids surfacing it when the key is absent (the tool already throws without the key).Changes
src/tools/farcaster/index.ts— Addedexport const farcasterActionProvider = () => new FarcasterActionProvider();to match the factory convention used bybaseMcpErc20ActionProvider,baseMcpMorphoActionProvider, etc.src/utils.ts— Imported the factory and extendedgetActionProvidersWithRequiredEnvVars()to pushfarcasterActionProvider()whenNEYNAR_API_KEYis set, alongside the existingPINATA_JWTbranch.Testing
yarn build— compiles cleanly with no TypeScript errorsyarn lint— passes with no new warningsgetActionProvidersWithRequiredEnvVarsis a function at runtimefarcasterActionProvideris importable from./tools/farcaster/index.jsunder the same convention as every other provider insrc/main.tsCloses #103