CodaLabs-xyz/farcaster-dev-mcp-server
If you are the rightful owner of farcaster-dev-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A comprehensive Model Context Protocol (MCP) server designed to accelerate Farcaster Mini App development.
Farcaster Dev MCP Server
A comprehensive Model Context Protocol (MCP) server designed to accelerate Farcaster Mini App development. This server provides developers with essential tools, code generation capabilities, and extensive knowledge base for building successful Mini Apps on the Farcaster protocol.
🚀 Features
🛠️ Development Tools (30+ Tools)
- Project Setup: Create new Mini Apps, generate manifests, setup development environment
- Authentication: Implement Sign In With Farcaster (SIWF), manage user sessions
- Wallet Integration: Configure Wagmi, handle transactions, manage wallet events
- SDK Integration: Initialize Farcaster SDK, handle events, implement notifications
- Development: Start dev servers, generate tests, debug applications
- Publishing: Deploy apps, setup analytics, create share links
📚 Knowledge Base
- Core Concepts: Mini Apps architecture, manifest specifications, SDK overview
- Authentication: SIWF implementation patterns, session management strategies
- Wallet Integration: Transaction handling, chain configuration, error management
- Best Practices: Mobile optimization, security guidelines, performance tips
📦 Installation
# Clone or create the project
git clone <repository-url>
cd farcaster-dev-mcp-server
# Install dependencies
npm install
# Build the server
npm run build
# Start development mode
npm run dev
🔧 Configuration
MCP Client Setup
Using Claude MCP CLI (Recommended)
Add the server locally:
claude mcp add farcaster-dev-mcp-server node /Users/osx/Projects/MCP-SERVERS/farcaster-dev-mcp-server/dist/index.js
Or add globally for all users:
claude mcp add farcaster-dev-mcp-server -s user node /Users/osx/Projects/MCP-SERVERS/farcaster-dev-mcp-server/dist/index.js
Manual Configuration
Add the server to your MCP client configuration:
{
"mcpServers": {
"farcaster-dev-mcp-server": {
"command": "node",
"args": ["./dist/index.js"],
"cwd": "./farcaster-dev-mcp-server"
}
}
}
Environment Variables
Create a .env file in the project root:
NODE_ENV=development
LOG_LEVEL=info
🛠️ Available Tools
Project Setup Tools
farcaster_create_mini_app- Create a new Farcaster Mini App projectfarcaster_generate_manifest- Generate manifest file for Mini Appfarcaster_validate_manifest- Validate manifest file compliancefarcaster_setup_dev_environment- Setup development environment
Authentication Tools
farcaster_implement_siwf- Generate SIWF implementation codefarcaster_generate_auth_flow- Create complete authentication flowfarcaster_validate_user- Validate user authenticationfarcaster_get_user_profile- Fetch user profile information
Wallet Integration Tools
farcaster_setup_wallet_integration- Setup Wagmi wallet integrationfarcaster_generate_transaction- Generate transaction handling codefarcaster_configure_chains- Configure blockchain networksfarcaster_handle_wallet_events- Handle wallet connection events
SDK Integration Tools
farcaster_initialize_sdk- Initialize Farcaster Mini App SDKfarcaster_handle_sdk_events- Handle SDK lifecycle eventsfarcaster_implement_notifications- Setup notification systemfarcaster_generate_navigation- Create navigation patternsfarcaster_implement_sharing- Implement social sharing
Development Tools
farcaster_start_dev_server- Start local development serverfarcaster_generate_test_suite- Generate comprehensive testsfarcaster_debug_mini_app- Generate debugging utilitiesfarcaster_optimize_performance- Performance optimization toolsfarcaster_generate_error_boundary- Create error boundaries
Publishing Tools
farcaster_publish_mini_app- Publish Mini App with manifest hostingfarcaster_generate_share_link- Generate shareable linksfarcaster_setup_analytics- Setup analytics and monitoringfarcaster_generate_deployment_script- Generate deployment scriptsfarcaster_validate_deployment- Validate deployment setup
Knowledge Base Tools
farcaster_get_knowledge- Access categorized knowledge topicsfarcaster_search_knowledge- Search through knowledge basefarcaster_list_topics- List all available topics
📚 Knowledge Categories
Core Concepts
- Mini Apps overview and architecture
- Manifest file specification
- SDK overview and capabilities
Authentication
- Sign In With Farcaster (SIWF) implementation
- User session management
- Profile integration patterns
Wallet Integration
- Wagmi setup and configuration
- Transaction handling (single & batch)
- Wallet event management
Best Practices
- Mobile-first design principles
- Comprehensive error handling
- Security guidelines and validation
🎯 Quick Start Example
// Create a new Mini App
{
"tool": "farcaster_create_mini_app",
"arguments": {
"name": "My Awesome Mini App",
"homeUrl": "https://myapp.com",
"framework": "react",
"includeWallet": true,
"includeAuth": true
}
}
// Get knowledge about authentication
{
"tool": "farcaster_get_knowledge",
"arguments": {
"category": "authentication",
"topic": "siwf-implementation"
}
}
// Setup wallet integration
{
"tool": "farcaster_setup_wallet_integration",
"arguments": {
"framework": "react",
"chains": ["ethereum", "base", "optimism"],
"includeConnectors": ["miniapp", "injected"]
}
}
🏗️ Project Structure
src/
├── tools/ # MCP tools organized by category
│ ├── project-setup.ts
│ ├── auth.ts
│ ├── wallet.ts
│ ├── sdk-integration.ts
│ ├── development.ts
│ └── publishing.ts
├── knowledge/ # Knowledge base with categorized topics
│ ├── core-concepts.ts
│ ├── authentication.ts
│ ├── wallet-integration.ts
│ ├── best-practices.ts
│ └── index.ts
├── handlers/ # Tool implementation handlers
├── types/ # TypeScript type definitions
└── index.ts # Main MCP server
🔍 Usage Examples
Creating a New Mini App
# Use the MCP client to call:
farcaster_create_mini_app {
"name": "Weather Mini App",
"homeUrl": "https://weather.myapp.com",
"framework": "react",
"includeWallet": true,
"includeAuth": true
}
This generates a complete React project with:
- Farcaster SDK integration
- Wallet connectivity with Wagmi
- Authentication flow
- Mobile-optimized layout
- TypeScript configuration
- Development tooling
Getting Help with Authentication
# Search for authentication knowledge
farcaster_search_knowledge {
"query": "sign in with farcaster",
"categories": ["authentication"]
}
# Get specific implementation guidance
farcaster_get_knowledge {
"category": "authentication",
"topic": "siwf-implementation"
}
Setting Up Wallet Integration
# Generate Wagmi configuration
farcaster_setup_wallet_integration {
"framework": "react",
"chains": ["ethereum", "base"],
"includeConnectors": ["miniapp", "injected"]
}
# Generate transaction handling code
farcaster_generate_transaction {
"transactionType": "erc20-transfer",
"includeGasEstimation": true,
"includeTxPreview": true
}
🛡️ Security Best Practices
The server includes comprehensive security guidance:
- Input validation patterns
- Secure session management
- Transaction security measures
- Content Security Policy setup
- Environment variable handling
🤝 Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📋 Development Roadmap
- Enhanced testing tools and patterns
- Advanced debugging utilities
- Performance monitoring integration
- Additional framework support (Vue, Svelte)
- Extended publishing platform integrations
- Advanced analytics implementations
📄 License
This project is licensed under the MIT License - see the file for details.
🙏 Acknowledgments
- Farcaster for the amazing protocol
- Model Context Protocol for the framework
- The Farcaster developer community for inspiration and feedback
📞 Support
- Documentation: Farcaster Mini Apps Docs
- Community: Farcaster Discord
- Issues: GitHub Issues
Built with ❤️ for the Farcaster developer community