Building a CSS Tutor MCP Server
@3mdistal
Building a CSS Tutor MCP Server について
A demo of how to build an MCP server (without just vibe coding).
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"css-mcp-server": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector",
"node",
"./build/index.js"
]
}
}
}ツール
ツールは検出されませんでした
ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。
概要
What is Building a CSS Tutor MCP Server?
A Model Context Protocol (MCP) server built with Node.js and TypeScript that acts as a CSS tutor. It provides personalized updates about CSS features to a connected AI client, demonstrating key MCP concepts: Resources, Tools, and Prompts.
How to use Building a CSS Tutor MCP Server?
Clone the repository, install dependencies with npm install, build with npm run build, then configure your MCP client (e.g., Claude desktop app or Cursor) to launch the server with the absolute path to build/index.js and provide an OpenRouter API key as the OPENROUTER_API_KEY environment variable. For Cursor, a project rule file is needed to supply the guidance prompt.
Key features of Building a CSS Tutor MCP Server
- Defines a
css_knowledge_memoryresource stored in a JSON file - Provides three tools:
get_latest_updates,read_from_memory,write_to_memory - Includes a static
css-tutor-guidanceprompt for the AI client - Fetches live CSS news via OpenRouter and the Perplexity model
- Supports read/write permissions for the resource using Zod validation
- Uses StdioServerTransport for communication over standard input/output
Use cases of Building a CSS Tutor MCP Server
- Fetching the latest CSS news and articles for personalized learning
- Checking which CSS concepts a user already knows from stored memory
- Updating the user’s knowledge profile when they confirm learning a concept
- Demonstrating MCP patterns for building more complex agentic servers
FAQ from Building a CSS Tutor MCP Server
What are the prerequisites?
Node.js v18 or later, npm, an AI client that supports MCP (e.g., Claude desktop app), and an OpenRouter API key for the get_latest_updates tool.
How do I provide the OpenRouter API key?
You must set the OPENROUTER_API_KEY environment variable in your MCP client configuration (e.g., in claude_desktop_config.json under the server’s env object).
Where is user memory stored?
User’s known CSS concepts are stored persistently in data/memory.json as a simple JSON file.
What transport does the server use?
The server uses the StdioServerTransport, running as a child process launched by the MCP client.
Can I debug the server?
Yes, you can use the @modelcontextprotocol/inspector tool from the terminal, passing the OpenRouter API key as an environment variable.
「その他」の他のコンテンツ
Codelf
unbugA search tool helps dev to solve the naming things problem.
AutoBrowser MCP
autobrowser-aiBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
MCP Registry
modelcontextprotocolA community driven registry service for Model Context Protocol (MCP) servers.
Awesome Mcp Servers
punkpeyeA collection of MCP servers.
Maestro
mobile-dev-incPainless E2E Automation for Mobile and Web
コメント