Harmony 2.0 Master Agent - Gemini MCP Server
Provides expert guidance for Harmony 2.0 development through Gemini AI, enabling code analysis, generation, and architectural assistance for building applications following Harmony 2.0 patterns and best practices.
README
Harmony 2.0 Master Agent - Gemini MCP Server
A powerful Gemini-powered agent that serves as the master guide for Harmony 2.0 development, accessible via Model Context Protocol (MCP) for Cursor and other MCP-compatible tools.
🌟 Features
- Harmony 2.0 Expert: Deep knowledge of Harmony 2.0 architecture, patterns, and best practices
- MCP Integration: Full Model Context Protocol support for Cursor and other tools
- Free Tier Compatible: Designed to run on free-tier hosting services
- Multiple Interfaces:
- MCP server for Cursor integration
- REST API for external access
- Direct programmatic access
📋 Prerequisites
- Node.js 18+
- Gemini API key (free tier available at Google AI Studio)
🚀 Quick Start
1. Install Dependencies
npm install
2. Configure Environment
Copy .env.example to .env and add your Gemini API key:
cp .env.example .env
Edit .env:
GEMINI_API_KEY=your_gemini_api_key_here
PORT=3000
3. Local Development
Run the REST API Server:
npm start
The API will be available at http://localhost:3000
Run the MCP Server (for Cursor):
npm run mcp
🔧 Cursor Integration
Option 1: Local MCP Server
- Add to your Cursor MCP configuration (usually in
~/.cursor/mcp.jsonor Cursor settings):
{
"mcpServers": {
"harmony2-master": {
"command": "node",
"args": ["/absolute/path/to/harmony2-gemini-mcp/src/mcp-server.js"],
"env": {
"GEMINI_API_KEY": "your_gemini_api_key_here"
}
}
}
}
- Restart Cursor
- The Harmony 2.0 tools will appear in Cursor's MCP tools section
Option 2: External MCP Server (Recommended for Sharing)
Deploy the server (see Deployment section) and configure Cursor to connect to it.
🌐 Deployment (Free Tier Options)
Option 1: Vercel (Recommended)
- Install Vercel CLI:
npm i -g vercel
- Deploy:
vercel
- Set environment variable:
vercel env add GEMINI_API_KEY
- Your API will be available at
https://your-project.vercel.app
Option 2: Render
- Create a new Web Service on Render
- Connect your GitHub repository
- Use these settings:
- Build Command:
npm install - Start Command:
npm start
- Build Command:
- Add
GEMINI_API_KEYin Environment Variables - Deploy!
Option 3: Railway
- Create a new project on Railway
- Connect your GitHub repository
- Add
GEMINI_API_KEYenvironment variable - Deploy!
Option 4: Fly.io
- Install Fly CLI:
curl -L https://fly.io/install.sh | sh
- Initialize:
fly launch
- Set secrets:
fly secrets set GEMINI_API_KEY=your_key_here
- Deploy:
fly deploy
📡 API Endpoints
Health Check
GET /health
Chat with Harmony Agent
POST /api/chat
Body: {
"message": "How do I set up a new Harmony 2.0 project?",
"context": {} // optional
}
Analyze Code
POST /api/analyze
Body: {
"code": "your code here",
"language": "javascript" // optional
}
Generate Code
POST /api/generate
Body: {
"description": "Create a React component for user authentication",
"componentType": "component" // optional
}
Get Guidance
POST /api/guidance
Body: {
"topic": "state management"
}
🛠️ MCP Tools
The MCP server exposes these tools:
- harmony_chat - Chat with the Harmony 2.0 Master Agent
- harmony_analyze_code - Analyze code for Harmony 2.0 compliance
- harmony_generate_code - Generate code following Harmony 2.0 patterns
- harmony_get_guidance - Get comprehensive guidance on Harmony 2.0 topics
📚 Harmony 2.0 Resources
🔐 Security Notes
- Never commit your
.envfile - Keep your Gemini API key secure
- For production, use environment variables provided by your hosting platform
- Consider rate limiting for public APIs
🆓 Free Tier Limits
- Gemini API: Free tier includes generous usage limits
- Vercel: 100GB bandwidth/month, unlimited requests
- Render: 750 hours/month, 512MB RAM
- Railway: $5 free credit/month
- Fly.io: 3 shared VMs, 3GB storage
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📝 License
MIT
🆘 Support
For issues or questions:
- Check the Harmony 2.0 documentation
- Open an issue on GitHub
- Contact the Harmony 2.0 community
Built with ❤️ for the Harmony 2.0 community
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。