3C

3mdistal/css-mcp-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

32 stars 16 forks 品質 58 トレンド 0

3mdistal/css-mcp-serverは[[https://github.com/3mdistal/css-mcp-server.]からインポートされたMCPサーバー候補です

概要

3mdistal/css-mcp-serverは[[https://github.com/3mdistal/css-mcp-server.]からインポートされたMCPサーバー候補です

概要(AI 翻訳)

このリポジトリには、Node.jsとTypeScriptで構築されたシンプルなモデルコンテキストプロトコル(MCP)サーバーが含まれています。 接続されたAIクライアントにCSSの機能に関するパーソナライズされた更新を提供する「CSS Tutor」として機能します。

このサーバーは、Resources、Tools、Promptsを定義する重要なMCPの概念を示しています。 このデモンストレーションの目標は、ここから移動し、はるかに大きくてより興味深い能力を構築するのに役立ちます。

前提条件

※Node.js(v18以降推奨)

  • [[npm]] (または[T1]]) または [pnpm のような Node.js パッケージマネージャ) ※MCPサーバーに接続するAIクライアント(Claudeデスクトップアプリなど)
  • OpenRouter APIキー(PerplexityによるライブCSS更新の取得)

クイックスタート

これらの手順に従って、サーバーがすぐに実行されるようにします。

1。 リポジトリのクローン:

2.依存関係のインストール:

3.Prepare API キー: get_latest_updates] ツールは、OpenRouter API キーが必要です。 OpenRouter から鍵を取得する ステップ5でMCPクライアントにこのキーを提供します。

4。 ** Server:** TypeScript コードをコンパイルします。

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Building a CSS Tutor MCP Server

This repo contains a simple Model Context Protocol (MCP) server built with Node.js and TypeScript. It acts as a “CSS Tutor,” providing personalized updates about CSS features to a connected AI client.

This server demonstrates key MCP concepts: defining Resources, Tools, and Prompts. The goal of this demonstration is to help you move on from here and build much larger and more interesting agentic capabilities.

Prerequisites

  • Node.js (v18 or later recommended)
  • npm (or your preferred Node.js package manager like yarn or pnpm)
  • An AI client capable of connecting to an MCP server (e.g., the Claude desktop app)
  • An OpenRouter API Key (for fetching live CSS updates via Perplexity)

Quick Start

Follow these steps to get the server running quickly:

  1. Clone the Repository:

    git clone https://github.com/3mdistal/css-mcp-server.git
    cd css-mcp-server
    
  2. Install Dependencies:

    npm install # Or: yarn install / pnpm install
    
  3. Prepare API Key: The get_latest_updates tool requires an OpenRouter API key. Obtain your key from OpenRouter. You will provide this key to your MCP client in Step 5.

  4. Build the Server: Compile the TypeScript code.

    npm run build # Or: yarn build / pnpm run build
    
  5. Configure Your MCP Client: Tell your client how to launch the server and provide the API key as an environment variable. Here’s an example for the Claude desktop app’s claude_desktop_config.json:

    {
      "mcpServers": {
        "css-tutor": {
          "command": "node",
          "args": [
            "/full/path/to/your/css-mcp-server/build/index.js"
          ],
          "env": {
            "OPENROUTER_API_KEY": "sk-or-xxxxxxxxxxxxxxxxxxxxxxxxxx"
          }
        }
      }
    }
    

    (Ensure the path in args is the correct absolute path to the built index.js file on your system. Replace the placeholder API key.)

  6. Connect: Start the connection from your MCP client. The client will launch the server process (with the API key in its environment), and you can start interacting!

Using with Cursor

Cursor is an AI-first code editor that can act as an MCP client. Setting up this server with Cursor is straightforward, but requires an extra step for the guidance prompt.

  1. Configure Server in Cursor:

    • Go to Cursor Settings > MCP > Add new global MCP server.
    • Paste in the same JSON as above in the Claude Desktop step, with all the same caveats.
  2. Create a Cursor Project Rule for the Prompt: Cursor currently does not automatically use MCP prompts provided by servers. Instead, you need to provide the guidance using Cursor’s Project Rules feature.

GitHub で README 全文を見る

インストール

npx @modelcontextprotocol/inspector node ./build/index.js
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "css-tutor": { "command": "node", "args": [ "/full/path/to/your/css-mcp-server/build/index.js" ], "env": { "OPENROUTER_API_KEY": "sk-or-xxxxxxxxxxxxxxxxxxxxxxxxxx" } } } }