Skip to content

fix: register FarcasterActionProvider so farcaster_username is reachable#111

Open
golldyck wants to merge 1 commit intobase:masterfrom
golldyck:fix/farcaster-provider-registration
Open

fix: register FarcasterActionProvider so farcaster_username is reachable#111
golldyck wants to merge 1 commit intobase:masterfrom
golldyck:fix/farcaster-provider-registration

Conversation

@golldyck
Copy link
Copy Markdown

Problem

The farcaster_username tool was refactored to the ActionProvider pattern in PR #75, but it was never registered in src/main.ts, so the tool is dead code and never appears in the MCP tool list regardless of configuration. src/tools/farcaster/index.ts is also missing the factory export that every other provider exposes.

Fix

Added the missing farcasterActionProvider factory export, and registered it through getActionProvidersWithRequiredEnvVars() gated on NEYNAR_API_KEY, mirroring the existing flaunchActionProvider / PINATA_JWT pattern. 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 — Added export const farcasterActionProvider = () => new FarcasterActionProvider(); to match the factory convention used by baseMcpErc20ActionProvider, baseMcpMorphoActionProvider, etc.
  • src/utils.ts — Imported the factory and extended getActionProvidersWithRequiredEnvVars() to push farcasterActionProvider() when NEYNAR_API_KEY is set, alongside the existing PINATA_JWT branch.

Testing

  • Ran yarn build — compiles cleanly with no TypeScript errors
  • Ran yarn lint — passes with no new warnings
  • Verified the built module loads and getActionProvidersWithRequiredEnvVars is a function at runtime
  • Confirmed farcasterActionProvider is importable from ./tools/farcaster/index.js under the same convention as every other provider in src/main.ts

Closes #103

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: FarcasterActionProvider not registered in main.ts after ActionProvider refactor

1 participant