Skip to main content
Glama
ivanbtrujillo

MCP Server Example

MCP サーバーの例

このプロジェクトは、Cursor やその他のツールで使用できる非常に基本的な MCP サーバーです。

index.ts を変更して必要なツールを追加するか、デフォルトのツールをそのまま使用します。

次にプロジェクトをビルドします。

pnpm run build

そして実行します:

pnpm run start

次に、プロジェクトに .cursor/mcp.json ファイルを追加し、以下を貼り付けます。

{
    "mcpServers":{
        "weather":{
            "command": "node",
            "args": ["[path]/build/index.js"]
        }     
    }
}

[path] をこのプロジェクトへの絶対パスに置き換えてください。プロジェクトフォルダで pwd を実行してください。例えば、私の場合は以下のようになります。

{
    "mcpServers":{
        "weather":{
            "command": "node",
            "args": ["/Users/ivanbtrujillo/Development/mcp-server-spike/build/index.js"]
        }     
    }
}

カーソルの「設定」に移動してください。MCPサーバーが表示されるはずです。有効化してください(右上をクリック)。MCP サーバー カーソル

次にチャットに移動し、エージェント モードに切り替えて、モデルとして claude-3.7-sonnet を選択します。

次のように入力します。

What is the weather in Texas?

MCP を使用して、最初に天気警報を取得し、次に予報を取得します。以下は、テキサスの天気を問い合わせるときのチャット インターフェイスの外観の例です。

チャットインターフェース

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Appeared in Searches

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ivanbtrujillo/mcp-server-spike'

If you have feedback or need assistance with the MCP directory API, please join our Discord server