mcp-foundry
Provides AI-powered tool orchestration using Google Generative AI (Gemini) for intelligent weather data retrieval and analysis.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-foundryWhat's the weather in Tokyo?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🌤️ mcp-foundry
An MCP (Model Context Protocol) server providing AI-powered weather tools via Google Generative AI.
Table of Contents
Related MCP server: MCP Weather Free
Overview
mcp-foundry is a monorepo implementing the Model Context Protocol (MCP) architecture with a weather service backend. It consists of an MCP server that provides weather tools and an AI agent host that uses Google Generative AI (Gemini) to intelligently invoke those tools. The system demonstrates how LLMs can orchestrate tool calls through the MCP standard for structured, reliable tool integration.
Features
🌦️ Real-time weather data via OpenWeather API
🤖 AI-powered tool orchestration with Gemini
📡 Model Context Protocol (MCP) implementation
🔌 Stdio-based server transport for inter-process communication
🎯 Type-safe tool definitions with Zod schema validation
📦 Monorepo structure with separate server and host applications
Tech Stack
Technology | Purpose | Version |
TypeScript | Language | ^6.0.3 |
Node.js | Runtime | >=18.0.0 |
| MCP server/client implementation | ^1.29.0 |
| Google Generative AI SDK | ^2.2.0 |
| Environment variable management | ^17.4.2 |
| Runtime schema validation | ^3.25.76 |
Project Structure
mcp-foundry/
├── apps/
│ ├── mcp-server/ # MCP server providing weather tools
│ │ ├── src/
│ │ │ └── index.ts # Weather tool definitions and MCP server setup
│ │ ├── build/ # Compiled JavaScript
│ │ └── tsconfig.json
│ │
│ └── mcp-host/ # AI agent host orchestrating tool calls
│ ├── src/
│ │ ├── agent.ts # Gemini AI agent loop
│ │ ├── client.ts # MCP client connecting to server
│ │ └── mcp-client/ # Client transport layer
│ ├── build/ # Compiled JavaScript
│ └── tsconfig.json
│
├── package.json # Workspace dependencies and scripts
├── tsconfig.base.json # Base TypeScript configuration
├── .env # Environment variables (local)
├── .github/
│ └── copilot-instructions.md # Copilot README generation rules
└── README.md # This filePrerequisites
Installation
Clone the repository:
git clone <repository-url>
cd mcp-foundryInstall dependencies:
npm installBuild the projects:
npm run buildExpected output:
# output
# compiles apps/mcp-server/src/**/*.ts → apps/mcp-server/build/
# compiles apps/mcp-host/src/**/*.ts → apps/mcp-host/build/Configuration
Create a .env file in the repository root with the following variables:
Variable | Description | Required | Example |
| OpenWeather API key for weather data | ✅ |
|
| Google Generative AI API key | ✅ |
|
.env example:
OPEN_WEATHER_API=your_openweather_api_key_here
GEMINI_API_KEY=your_gemini_api_key_here⚠️ Never commit
.envto version control. Add it to.gitignore.
Usage / Quick Start
Build the projects:
npm run buildStart the agent:
npm startInvoke the agent with a natural language query:
node apps/mcp-host/build/agent.js "What's the weather in New York?"Expected output:
# output
Connected to MCP server
[Gemini response with weather information for New York]Scripts
Script | Command | Description |
|
| Compile both MCP server and host |
|
| Compile MCP server TypeScript to JavaScript |
|
| Compile agent host TypeScript to JavaScript |
|
| Run the AI agent |
|
| Build and run in one command |
Contributing
Contributions are welcome! This project is open to community input and improvements.
Getting Started:
Fork the repository
Create a feature branch:
git checkout -b feat/your-feature(orfix/,docs/,chore/as needed)Make your changes and commit:
git commit -m "description of changes"Push to your fork:
git push origin your-branch-nameOpen a pull request with a description of your changes
Guidelines (non-strict):
Keep commits logically organized and descriptive
Add tests if you're adding new functionality
Update documentation if your changes affect the API or usage
Be respectful and collaborative in discussions
All contribution levels are welcome — from typo fixes to new features!
License
Distributed under the MIT License. See LICENSE for more information.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/Mahima-Sanketh-Git/mcp-foundry'
If you have feedback or need assistance with the MCP directory API, please join our Discord server