MCP Server
What is an MCP Server?
An MCP (Model Context Protocol) Server allows external AI assistants like Claude Desktop, Cursor, and Windsurf to access HaMi Code Việt data through standard tools. This lets you ask Claude about courses, lessons, run code, generate quizzes, and check progress — all from within Claude.
5 Tools
| Tool | Function |
|---|---|
course_lookup | Find courses by keyword, level, age range |
lesson_lookup | View lesson content by ID |
code_execute | Run Python/JavaScript code via Piston |
quiz_generate | Generate quiz questions by topic |
progress_check | Check a user's learning progress |
Setup with Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"hamicodeviet": {
"command": "node",
"args": ["/path/to/mcp-server/dist/index.js"],
"env": {
"HAMICO_API_URL": "https://api.hamicodeviet.com",
"HAMICO_API_KEY": "your-api-key",
"PISTON_API_URL": "https://emkc.org/api/v2/piston"
}
}
}
}Setup with Cursor
Add to ~/.cursor/mcp.json with the same configuration.
Setup with Windsurf
Add to ~/.codeium/windsurf/mcp_config.json with the same configuration.
Environment Variables
HAMICO_API_URL— HaMi Code Việt API URLHAMICO_API_KEY— Your API keyPISTON_API_URL— Piston API URL (default: emkc.org)
Piston Self-Host
To enhance privacy, you can self-host Piston:
docker run -p 2000:2000 -d ghcr.io/engineer-man/pistonThen set PISTON_API_URL=http://localhost:2000.
The MCP server source is in the mcp-server/ directory of the repository.
Integration with aiagent.iai.one
The MCP Server can connect directly to the self-learning AI platform at aiagent.iai.one to extend agent capabilities. When configuring, add these environment variables:
AIAGENT_BASE_URL—https://aiagent.iai.oneAIAGENT_API_KEY— API key from aiagent.iai.one (if available)
This allows the MCP server to call agents from aiagent.iai.one directly, alongside the HaMi Code Việt API.