Skip to main content
Glama

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

Cursor と統合して、Claude-3.7-sonnet モデルを使用した天気情報の取得などの AI ツールを有効にできる基本的な MCP サーバー テンプレート。

Related MCP Servers

  • -
    security
    F
    license
    -
    quality
    A simple MCP service that allows users to query weather conditions for cities worldwide through the Cursor AI assistant.
    Last updated -
    JavaScript
  • -
    security
    F
    license
    -
    quality
    An MCP server implementation that allows users to fetch and display weather information for specified cities, including temperature, humidity, wind speed, and weather descriptions.
    Last updated -
    Python
    • Linux
    • Apple
  • -
    security
    F
    license
    -
    quality
    An MCP-based project that integrates Zhipu AI and Tencent Map APIs to provide weather queries, geocoding, and web search functionality through both command-line and web interfaces.
    Last updated -
    2
    Python
  • A
    security
    A
    license
    A
    quality
    An MCP server that allows retrieving meteorological and climate data from Spain's State Meteorological Agency (AEMET) API directly from Claude AI and other MCP-compatible clients.
    Last updated -
    7
    2
    Python
    MIT License
    • Apple
    • Linux

View all related MCP servers

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