MCP Servers
This repo has my learnings on how to create an MCP-Server
Overview
MCP Servers is a project that provides a foundational understanding of creating a local MCP server that can handle weather data without relying on external APIs.
To use MCP Servers, clone the repository from GitHub, and run the main.js file to start the local server. You can modify the hardcoded weather data or integrate external APIs for dynamic data.
- Local server setup for handling weather data - Simple implementation without external APIs - Ability to extend functionality with SSE and express server for online access
- Creating a local weather data server for personal projects.
- Learning how to implement server-side logic in JavaScript.
- Experimenting with server-sent events (SSE) for real-time data updates.
Add to your AI client
Use these steps to connect MCP Servers in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"mcp-servers-krishcodesw": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-servers-krishcodesw"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"mcp-servers-krishcodesw": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-servers-krishcodesw"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"mcp-servers-krishcodesw": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-servers-krishcodesw"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"mcp-servers-krishcodesw": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-servers-krishcodesw"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-servers-krishcodesw": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-servers-krishcodesw"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"mcp-servers-krishcodesw": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-servers-krishcodesw"
]
}
}
}FAQ
Can I use external APIs with MCP Servers?
Yes! You can easily modify the code to integrate external APIs for dynamic weather data.
Is this project suitable for beginners?
Yes! MCP Servers is designed to help beginners understand the basics of server creation in JavaScript.
How can I host this server online?
To host the server online, you need to implement SSE with an express server.