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

  • A
    security
    F
    license
    A
    quality
    A starter template for building Model Context Protocol servers that can be integrated with Cursor or Claude Desktop, allowing developers to create custom tools and extensions for AI assistants.
    Last updated -
    1
    3
    13
    TypeScript
    • Apple
  • -
    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 -
    1
    JavaScript
  • -
    security
    A
    license
    -
    quality
    A Model Context Protocol server that enables users to fetch weather forecasts through Cursor AI by using natural language queries.
    Last updated -
    Python
    MIT License
  • A
    security
    F
    license
    A
    quality
    A starter template for building Model Context Protocol servers that integrate with AI assistants like Claude and Cursor, providing custom tools, resource providers, and prompt templates.
    Last updated -
    2
    JavaScript

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