
f/mcp-startup-boilerplate
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
f/mcp-startup-boilerplate — это кандидат на сервер MCP, импортированный из https://github.com/f/mcp-startup-boilerplate.
Обзор
f/mcp-startup-boilerplate — это кандидат на сервер MCP, импортированный из https://github.com/f/mcp-startup-boilerplate.
Обзор (машинный перевод)
Надёжный, бесплатный и готовый к использованию шаблон Rails для создания приложений на базе ИИ, которые бесшовно интегрируются с Claude AI с помощью протокола Model Context Protocol (MCP). Этот шаблон включает аутентификацию пользователей и возможности провайдера OAuth2 из коробки.
🚀 Особенности
- Аутентификация пользователя: Полная система аутентификации на базе Devise
- OAuth2 Provider: Полная реализация сервера OAuth2 с Doorkeeper
- Интеграция с MCP: Бесшовная интеграция Claude AI с использованием fast-mcp
- Обработка платежей: Интегрированные платежи Stripe для инструментов с опциями подписки
- Modern Rails: Построен на Rails 8.0.2 с последними функциями
- Tailwind CSS: Красивый, отзывчивый интерфейс с Tailwind
- Hotwire: Современный, быстрый фронтенд с Turbo и Stimulus
📋 Требования
- Ruby 3.2+
- PostgreSQL
- Node.js & Yarn (для фронтенд-ассетов)
- Аккаунт Stripe (для обработки платежей)
🔧 Подготовка
1. Клонируйте репозиторий
2. Зависимости установки
3. Настройте базу данных
4. Настройте Stripe (опционально для платежных функций)
Установите ключи Stripe API в своей среде:
Для разработки вы также можете обновить их в config/initializers/stripe.rb
5.
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
MCP Startup Boilerplate v0.0.1
A robust, free, ready-to-use Rails boilerplate for building AI-powered applications that integrate seamlessly with Claude AI using the Model Context Protocol (MCP). This boilerplate includes user authentication and OAuth2 provider capabilities out of the box.
🚀 Features
- User Authentication: Complete authentication system powered by Devise
- OAuth2 Provider: Full OAuth2 server implementation with Doorkeeper
- MCP Integration: Seamless Claude AI integration using fast-mcp
- Payment Processing: Integrated Stripe payments for tools with subscription options
- Modern Rails: Built on Rails 8.0.2 with the latest features
- Tailwind CSS: Beautiful, responsive UI with Tailwind
- Hotwire: Modern, fast frontend with Turbo and Stimulus
📋 Requirements
- Ruby 3.2+
- PostgreSQL
- Node.js & Yarn (for frontend assets)
- Stripe Account (for payment processing)
🔧 Setup
1. Clone the repository
git clone https://github.com/f/mcp-startup-boilerplate mcp-startup
cd mcp-startup
2. Install dependencies
bundle install
yarn install
3. Setup the database
rails db:create db:migrate db:seed
4. Configure Stripe (optional for payment features)
Set your Stripe API keys in your environment:
export STRIPE_PUBLISHABLE_KEY="pk_test_your_key"
export STRIPE_SECRET_KEY="sk_test_your_key"
export STRIPE_WEBHOOK_SECRET="whsec_your_webhook_key"
For development, you can also update these in config/initializers/stripe.rb
5. Start the server
rails server
Your application should now be running at http://localhost:3000
💳 Payment Integration
This application comes with built-in Stripe payment processing for MCP tools:
Subscription Plans
- Standard Plan: $0.03 per tool call with 40% savings compared to pay-as-you-go
- Enterprise Plan: $0.03 per tool call with additional benefits and unlimited usage
Pay-Per-Use Pricing
- Default pricing: $0.05 per tool call (can be customized per tool)
Payment Management
- User-friendly subscription management interface
- Detailed usage tracking dashboard
- Tool usage history and analytics
🧰 Paid Tool Framework
The application includes a PaidTool base class that allows you to easily create tools that require payment:
class YourPaidTool < PaidTool
description "Your paid tool description"
# Custom pricing (optional, defaults to $0.05)
def price_cents
8 # $0.08 per call
end
def call
return { error: "User has no active subscription" } unless charge_user
# Your implementation here after charge
end
end
How PaidTool Works
- When a tool is called, it first checks if the user has an active subscription
- If subscribed, the tool executes and logs usage without additional charges
- If not subscribed, the user is charged the tool’s price via Stripe
Установка
npx -y mcp-remote http://your-server-url/mcp/sseКонфигурация
{
"mcpServers": {
"your-server-name": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"http://your-server-url/mcp/sse"
]
}
}
}