simple-mcp-server

by muk-shobhit

270 downloads
Not rated
GitHub

About

Get started with building your first MCP server

Details

Author
muk-shobhit
Downloads
270
Categories
Other

- Weather Agent: Fetches real-time temperature and conditions for a given city.
- Stocks Agent: Provides real-time stock prices for Indian share market symbols.
- Uses Node.js (v16 or higher) and NPM/Yarn.
- Integrates with VS Code via MCP protocol configuration.
- Demonstrates a clear example of creating multiple MCP tools in one project.

Clone the repository, then install dependencies for each agent separately using npm install inside the src/weather-agent and src/stocks-agent directories. Configure the server paths in .vscode/mcp.json and start both MCP servers from VS Code to make their tools available.

simple-mcp-server

This project demonstrates how to build simple MCP (Model Context Protocol) servers for fetching weather information and stock prices. It includes two agents: weather-agent and stocks-agent.

---

Create Your First MCP Server

Features

- Weather Agent: Fetches real-time weather information (temperature and conditions) for a given city.
- Stocks Agent: Provides real-time stock prices for various symbols in the Indian share market.

Prerequisites

- Node.js (v16 or higher)
- NPM or Yarn

Installation

1. Clone the repository:

   git clone <repository-url>
cd simple-mcp-server

2. Install dependencies for each agent:

   cd src/weather-agent
npm install
cd ../stocks-agent
npm install

Adding MCP Servers to VS Code

The .vscode/mcp.json file contains the configuration for running the servers using the MCP protocol. Ensure the paths to the index.js files are correct.

Starting MCP Servers

From .vscode/mcp.json start both MCP servers. You will observe tools from both servers are listed now in VS Code MCP Server.

Testing MCP Servers

Now you can ask questions related to weather or stocks.

License

This project is licensed under the MIT License. See the LICENSE file for details.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.