Marble MCP Server

Marble MCP Server

Analyzes codebases to suggest relevant learning projects and generate interactive slides with direct links to the Marble platform. It enables developers to create tailored learning experiences based on their specific technologies, patterns, and code context.

Category
访问服务器

README

Marble MCP Server

An MCP (Model Context Protocol) server that generates learning project links for the Marble platform (withmarble.io). This server enables Claude Code to analyze codebases and suggest relevant learning projects with direct links to create them on Marble.

Features

  • Codebase Analysis: Analyzes your current codebase to understand technologies and patterns
  • AI-Generated Projects: Suggests relevant learning projects based on code analysis
  • Interactive Slides: Generate links to interactive learning slides based on your code
  • Marble Platform Integration: Generates properly formatted links to create projects on withmarble.io
  • Customizable: Specify topics, difficulty levels, and code context for tailored suggestions
  • Short URLs: Stores prompts in a database for clean, shareable links (optional)

Installation

Claude Code

Run claude mcp add marble npx marble-mcp-server --scope user.

Cursor

Modify your ~/.cursor/mcp.json to be like:

{
  "mcpServers": {
    "marble": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "marble-mcp-server"
      ],
      "env": {
      }
    }
  }
}

Augment Code

  1. Go to the Augment Settings.
  2. Under "Tools", scroll down until you find "MCP". Click the "Import from JSON" button.
  3. Paste the following JSON snippet:
{
  "mcpServers": {
    "marble": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "marble-mcp-server"
      ],
      "env": {
      }
    }
  }
}

Usage

1. Suggest Learning Projects

Ask Claude Code to suggest projects for learning something in your codebase:

"I want to learn more about React hooks. Can you suggest some projects?"

"What are some projects I could build to learn the authentication patterns used here?"

"Suggest beginner projects for learning the database design in this app"

Claude Code will:

  1. Use the suggest_learning_projects tool
  2. Analyze your codebase for relevant code
  3. Generate 3 project ideas
  4. Create Marble platform links for each project

2. Generate Interactive Learning Slides

Ask Claude Code to generate interactive slides to explain concepts in your codebase:

"Create slides explaining how React hooks work in this codebase"

"Generate slides about the authentication flow in this app"

"Make slides explaining the database schema"

Claude Code will:

  1. Use the generate_slides_link tool
  2. Read relevant code from your codebase
  3. Create a comprehensive prompt with code examples
  4. Save the prompt to the database (if configured)
  5. Return a link to interactive slides on Marble

3. Generate Individual Project Links

You can also ask Claude Code to generate a link for a specific project:

"Generate a Marble link for a project about building a REST API with Express"

Configuration

Environment Variables

The generate_slides_link tool requires the following environment variables:

  • SUPABASE_URL: Your Supabase project URL (required)
  • SUPABASE_KEY: Your Supabase publishable key (required, starts with sb_publishable_...)
    • Find it in: Supabase Dashboard → Settings → API → Project API keys

Note: The SUPABASE_URL and SUPABASE_KEY environment variables are required for the generate_slides_link tool to work. The tool will error if these are not configured.

Security: Use your Supabase publishable key (sb_publishable_...), not the service role or secret key. The publishable key is:

  • ✅ Safe to use in CLIs, MCP servers, and public code
  • ✅ Can be rotated independently without downtime
  • ✅ Restricted by Row Level Security policies
  • ✅ The modern, recommended approach (replaces the legacy anon JWT key)

Important: Use the publishable key (sb_publishable_...), not secret or service role keys. Benefits:

  • ✅ Safe to expose in CLIs, scripts, and MCP servers
  • ✅ Easy rotation without downtime
  • ✅ Modern best practice (replaces legacy JWT-based anon key)

The publishable key is restricted by Row Level Security (RLS) policies and can only:

  • ✅ Insert new prompts into slide_prompts
  • ✅ Read prompts from slide_prompts
  • ❌ Cannot update, delete, or access any other tables

Note: If these variables are not set, the generate_slides_link tool will return an error. The suggest_learning_projects and generate_marble_link tools do not require database configuration.

Database storage provides:

  • Creates shorter, more shareable URLs (e.g., withmarble.ai/learn?prompt_id=abc123)
  • Avoids URL length limitations with long prompts
  • Improves link reliability across different platforms

If not provided, the server will fall back to encoding prompts directly in URLs.

Database Setup

If using Supabase integration, you'll need to create the slide_prompts table:

CREATE TABLE slide_prompts (
  prompt_id UUID PRIMARY KEY,
  prompt TEXT NOT NULL,
  created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);

Tools Provided

suggest_learning_projects

Instructs Claude Code to analyze the codebase and suggest learning projects.

Parameters:

  • topic (required): What to learn (e.g., "React hooks", "authentication")
  • codeContext (optional): Specific files/directories to analyze
  • difficulty (optional): "Beginner", "Intermediate", or "Advanced"

Example:

{
  "topic": "state management",
  "codeContext": "src/store",
  "difficulty": "Intermediate"
}

generate_marble_link

Generates a Marble platform link from project data.

Parameters:

  • project (required): Project data object with:
    • id: Unique ID (timestamp)
    • title: Project title
    • description: Detailed description
    • category: Primary language/framework
    • difficulty: "Beginner", "Intermediate", or "Advanced"
    • timeEstimate: e.g., "2 hr", "90 min"
    • technologies: Array of technologies
    • targetSkills: Array of skills to learn

Example:

{
  "project": {
    "id": 1701234567890,
    "title": "Build a Task API",
    "description": "Create a RESTful API for managing tasks with CRUD operations and authentication.",
    "category": "Node.js",
    "difficulty": "Intermediate",
    "timeEstimate": "2 hr",
    "technologies": ["Express", "MongoDB", "JWT"],
    "targetSkills": ["REST APIs", "Authentication", "Database Design"]
  }
}

generate_slides_link

Generates a link to interactive learning slides on Marble.

Parameters:

  • query (required): A comprehensive prompt that includes:
    • The main topic or concept to explain
    • Relevant code snippets from the codebase
    • Specific implementation details
    • Context about how the concept is used

Example:

{
  "query": "Explain React hooks with examples from our codebase. Here's how we use useState in UserProfile.tsx: [code snippet]. Here's how we use useEffect in DataFetcher.tsx: [code snippet]. Focus on explaining the dependency array and cleanup functions."
}

Returns: A markdown link like 🎓 [Learn: Explain React hooks...](https://withmarble.ai/learn?prompt_id=abc123)

Project Link Format

Generated links follow this format:

https://withmarble.io/projects/plan?projectData={urlEncodedJSON}

The JSON structure includes all project metadata, which is decoded by the Marble platform to populate the project creation page.

Development

Watch Mode

npm run watch

Rebuild

npm run build

Example Interaction

User: "I want to learn about the React patterns used in this codebase"

Claude Code:

  1. Uses suggest_learning_projects with topic "React patterns"
  2. Searches codebase for React components using Glob/Grep
  3. Reads relevant files to understand patterns
  4. Generates 3 project ideas:
    • Beginner: "Component Composition with Props"
    • Intermediate: "Custom Hooks for Data Fetching"
    • Advanced: "Compound Components Pattern"
  5. Uses generate_marble_link for each project
  6. Presents projects with Marble links

Result: User gets 3 clickable links to create these projects on withmarble.io

How It Works

  1. User asks for learning projects in Claude Code
  2. MCP tool is invoked by Claude Code
  3. Claude Code analyzes codebase using its file reading tools
  4. Projects are generated based on code analysis
  5. Links are created using the Marble platform URL format
  6. User clicks link to start the project on withmarble.io

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选