Skip to main content
Glama

MCP Server Example

Ejemplo de servidor MCP

Este proyecto es un servidor MCP muy básico listo para ser consumido por Cursor u otras herramientas.

Modifique index.ts y agregue las herramientas que desee o mantenga las predeterminadas.

Luego construye el proyecto:

pnpm run build

Y ejecutarlo:

pnpm run start

Ahora agregue un archivo .cursor/mcp.json en su proyecto y pegue lo siguiente;

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

Reemplace [ruta] con la ruta absoluta de este proyecto. Ejecute pwd en la carpeta del proyecto para ello. Por ejemplo, en mi caso es:

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

Ahora ve a "Configuración" en el cursor. Deberías poder ver el servidor MCP allí. Habilítalo (haz clic en la esquina superior derecha).Cursor del servidor MCP

Ahora ve al chat, cambia al modo Agente y selecciona claude-3.7-sonnet como tu modelo.

Escriba lo siguiente:

What is the weather in Texas?

Utilizará el MCP para obtener primero las alertas meteorológicas y luego el pronóstico. Aquí hay un ejemplo de cómo se ve la interfaz de chat al consultar el clima en Texas:

Interfaz de chat

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

Una plantilla de servidor MCP básica que se puede integrar con Cursor para habilitar herramientas de IA como la recuperación de información meteorológica utilizando el modelo Claude-3.7-sonnet.

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