Skip to main content

MCPを簡単に

MCPサーバーとは?​

MCPサーバーは、Clineの機能を強化する専用の拡張機能です。Clineがウェブページの取得、画像処理、API アクセスなどの追加タスクを実行できるようにします。

MCPマーケットプレイスのウォークスルー​

MCPマーケットプレイスは、様々なカテゴリにわたる数百のMCPサーバーのワンクリックインストール体験を提供します。

1. マーケットプレイスにアクセス​

  • Clineで、トップツールバーの「Extensions」ボタン(正方形アイコン)をクリック
  • MCPマーケットプレイスが開き、カテゴリ別に利用可能なサーバーが表示されます

2. サーバーの閲覧と選択​

  • カテゴリ別(Search、File-systems、Browser-automation、Research-dataなど)にサーバーを閲覧
  • サーバーをクリックして、その機能と要件の詳細を確認

3. インストールと設定​

  • 選択したサーバーのインストールボタンをクリック
  • サーバーがAPIキーを必要とする場合(ほとんどがそう)、Clineが以下をガイドします:
    • APIキーの取得場所
    • 安全な入力方法
  • サーバーはMCP設定に自動的に追加されます

4. インストールの確認​

  • インストールが完了するとClineが確認を表示
  • ClineのMCP設定UIでサーバーステータスを確認

5. 新しいサーバーの使用​

  • インストールが成功した後、Clineはサーバーの機能を自動的に統合
  • Clineのシステムプロンプトで新しいツールとリソースが利用可能に
  • 新しいサーバーの機能を使用するようにClineに依頼するだけ
  • 例:「Perplexityを使って最新のReact更新を検索してください」

企業ユーザー: 企業環境でClineを使用している場合は、組織のセキュリティポリシーに従ってサードパーティMCPサーバーをインストールする権限があることを確認してください。

What Happens Behind the Scenes​

When you install an MCP server, several things happen automatically:

1. Installation Process​

  • The server code is cloned/installed to /Users/<username>/Documents/Careti/MCP/
  • Dependencies are installed
  • The server is built (TypeScript/JavaScript compilation or Python package installation)

2. Configuration​

  • The MCP settings file is updated with your server configuration
  • This file is located at: /Users/<username>/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  • Environment variables (like API keys) are securely stored
  • The server path is registered

3. Server Launch​

  • Careti detects the configuration change
  • Careti launches your server as a separate process
  • Communication is established via stdio or HTTP

4. Integration with Careti​

  • Your server's capabilities are added to Careti's system prompt
  • Tools become available via use_mcp_tool commands
  • Resources become available via access_mcp_resource commands
  • Careti can now use these capabilities when prompted by the user

Troubleshooting​

System Requirements​

Make sure your system meets these requirements:

  • Node.js 18.x or newer
    • Check by running: node --version
    • Install from: https://nodejs.org/
    • Required for JavaScript/TypeScript implementations
  • Python 3.10 or newer
    • Check by running: python --version
    • Install from: https://python.org/
    • Note: Some specialized implementations may require Python 3.11+
  • UV Package Manager
    • Modern Python package manager for dependency isolation
    • Install using:
      curl -LsSf https://astral.sh/uv/install.sh | sh
      Or: pip install uv
    • Verify with: uv --version

If any of these commands fail or show older versions, please install/update before continuing!

Common Installation Issues​

  • Ensure your internet connection is stable
  • Check that you have the necessary permissions to install new software
  • Verify that the API key was entered correctly (if required)
  • Check the server status in the MCP settings UI for any error messages

How to Remove an MCP Server​

To completely remove a faulty MCP server:

  1. Open the MCP settings file: /Users/<username>/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  2. Delete the entire entry for your server from the mcpServers object
  3. Save the file
  4. Restart Careti

I'm Still Getting an Error​

If you're getting an error when using an MCP server, you can try the following:

  • Check the MCP settings file for errors
  • Use a Claude Sonnet model for installation
  • Verify that paths to your server's files are correct
  • Ensure all required environment variables are set
  • Check if another process is using the same port (for HTTP-based servers)
  • Try removing and reinstalling the server (remove from both the cline_mcp_settings.json file and the /Users/<username>/Documents/Careti/MCP/ directory)
  • Use a terminal and run the command with its arguments directly. This will allow you to see the same errors that Careti is seeing

MCP Server Rules​

Careti is already aware of your active MCP servers and what they are for, but when you have a lot of MCP servers enabled, it can be useful to define when to use each server.

Utilize a .agents/context file or custom instructions to support intelligent MCP server activation through keyword-based triggers, making Careti's tool selection more intuitive and context-aware.

How MCP Rules Work​

MCP Rules group your connected MCP servers into functional categories and define trigger keywords that activate them automatically when detected in your conversations with Careti.

{
"mcpRules": {
"webInteraction": {
"servers": ["firecrawl-mcp-server", "fetch-mcp"],
"triggers": ["web", "scrape", "browse", "website"],
"description": "Tools for web browsing and scraping"
}
}
}

Configuration Structure​

  1. Categories: Group related servers (e.g., "webInteraction", "mediaAndDesign")
  2. Servers: List server names in each category
  3. Triggers: Keywords that activate these servers
  4. Description: Human-readable category explanation

Benefits of MCP Rules​

  • Contextual Tool Selection: Careti selects appropriate tools based on conversation context
  • Reduced Friction: No need to manually specify which tool to use
  • Organized Capabilities: Logically group related tools and servers
  • Prioritization: Handle ambiguous cases with explicit priority ordering

Example Usage​

When you write "Can you scrape this website?", Careti detects "scrape" and "website" as triggers, automatically selecting web-related MCP servers.

For finance tasks like "What's Apple's stock price?", keywords like "stock" and "price" trigger finance-related servers.

Quick Start Template​

{
"mcpRules": {
"category1": {
"servers": ["server-name-1", "server-name-2"],
"triggers": ["keyword1", "keyword2", "phrase1", "phrase2"],
"description": "Description of what these tools do"
},
"category2": {
"servers": ["server-name-3"],
"triggers": ["keyword3", "keyword4", "phrase3"],
"description": "Description of what these tools do"
},
"category3": {
"servers": ["server-name-4", "server-name-5"],
"triggers": ["keyword5", "keyword6", "phrase4"],
"description": "Description of what these tools do"
}
},
"defaultBehavior": {
"priorityOrder": ["category1", "category2", "category3"],
"fallbackBehavior": "Ask user which tool would be most appropriate"
}
}

Add this to your .agents/context file or to your custom instructions to make Careti's MCP server selection more intuitive and context-aware.