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

  • 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