Skip to main content
Glama

MCP Weather Demo

by nick-telsan

mcp

A demo of the ModelContextProtocol (MCP) using the Anthropic AI SDK.

Built following the Server Quickstart and the Client Quickstart.

Getting Started

Prerequisites

Installation

If using asdf, run:

asdf install

Regardless of whether using asdf or not, install dependencies:

bun install

Server

The server allows a client to access resources, tools, and prompts.

It needs a client to interact with an LLM. Claude Desktop serves as the client if you are only running the server.

Set Up

You need to add the server to Claude Desktop by modifying the claude_desktop_config.json file in your Library/Application Support/Claude directory. If this file does not exist, you can create it.

vi ~/.config/Claude/claude_desktop_config.json

Add the following to the file:

{ "mcpServers": { "weather": { "command": "/ABSOLUTE/PATH/TO/bin/bun", "args": ["/ABSOLUTE/PATH/TO/src/server/index.ts"] } } }
⚠️ Bun Path

If you are using asdf, you will need to use the absolute path to the bun executable. You can find this by running asdf where bun.

If you're just using bun without asdf, you can use bun as the command.

Run

Once you've modified the claude_desktop_config.json file, restart Claude Desktop.

You should now see the weather tools and prompts in Claude Desktop!

Client

Instead of using Claude Desktop, you can also run a client to handle the interaction with the LLM.

This would suitable for building a chat interface or web application that uses Anthropic's API. With MCP, you can give the LLM access to data without having to manually copy and paste them into a prompt.

Set Up

Get an Anthropic API key from the Anthropic API Keys page.

Create a .env file in the root of the project and add the following:

ANTHROPIC_API_KEY=your_api_key_here

Run

Now you can run the client:

bun run dev

This gives you an interactive CLI where you can ask the LLM questions. Note that you have access to the tools defined in the server!

-
security - not tested
F
license - not found
-
quality - not tested

A demonstration server for ModelContextProtocol that provides weather tools and prompts for Claude AI, allowing LLMs to access external data without manual copying.

  1. Getting Started
    1. Prerequisites
    2. Installation
  2. Server
    1. Set Up
    2. Run
  3. Client
    1. Set Up
    2. Run

Related MCP Servers

  • -
    security
    F
    license
    -
    quality
    A Model Context Protocol server that allows Claude to make API requests on your behalf, providing tools for testing various APIs including HTTP requests and OpenAI integrations without sharing your API keys in the chat.
    Last updated -
    Python
    • Linux
    • Apple
  • -
    security
    F
    license
    -
    quality
    A Model Context Protocol server implementation that enables seamless integration with Claude and other MCP-compatible clients to access Prem AI's language models, RAG capabilities, and document management features.
    Last updated -
    JavaScript
  • -
    security
    -
    license
    -
    quality
    A Model Context Protocol server that connects Claude AI to QGIS, enabling direct interaction with the GIS software for project creation, layer manipulation, code execution, and processing algorithms through natural language prompts.
    Last updated -
    2
    Python
    Creative Commons Zero v1.0 Universal
  • -
    security
    -
    license
    -
    quality
    A simple server that implements the Model Context Protocol, allowing AI models like Claude to fetch real-time weather information for any location using the wttr.in API.
    Last updated -
    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/nick-telsan/mcp'

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