MCP Server

Last updated: 2026-07-06

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

ToolFunction
course_lookupFind courses by keyword, level, age range
lesson_lookupView lesson content by ID
code_executeRun Python/JavaScript code via Piston
quiz_generateGenerate quiz questions by topic
progress_checkCheck 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

Piston Self-Host

To enhance privacy, you can self-host Piston:

docker run -p 2000:2000 -d ghcr.io/engineer-man/piston

Then set PISTON_API_URL=http://localhost:2000.

Source code

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:

This allows the MCP server to call agents from aiagent.iai.one directly, alongside the HaMi Code Việt API.