AI
Understands your question, but shouldn't be able to freely access every system.
Start from "what is MCP" and work up, step by step, to how AI safely uses external tools and data.
MCP is a standard interface between AI and external tools.
Understands your question, but shouldn't be able to freely access every system.
Defines which tools the AI may use, and what arguments each one needs.
The real service that actually queries or reads the canonical data.
The Model Context Protocol (MCP) is a common protocol that lets AI applications discover and use external tools and trusted data sources, instead of relying only on what a model already knows.
The AI application the user talks to, such as Claude, ChatGPT, an IDE, or a custom agent.
Code inside the host that speaks the MCP protocol: discovers tools and sends requests on the host's behalf.
A service, like this one, that exposes a fixed set of tools over MCP. NTPU AI4X MCP is one such server.
One narrow, named capability with a validated input schema, for example search_projects.
The trusted source behind a tool's answer: for AI4X MCP, canonical records with a known source, version, and verification time.
Before calling a tool, a client can list what a server offers (tools/list) instead of hard-coding assumptions about it.
Example question: "Which faculty work on Agentic AI?"
"Which faculty work on Agentic AI?"
Interprets the user's intent.
Discovers the tools this server offers.
Candidate tool: find_research_experts.
{"topic": "agentic AI", "role": "faculty"}
Validates arguments, executes the tool, queries authoritative data.
Matching members, evidence, and provenance are returned.
The AI assistant generates a grounded answer from the returned evidence.
This walkthrough shows the tool that was selected, its arguments, and the data returned. It does not expose or claim to expose a model's private internal reasoning.
ChatGPT / Claude / an IDE
ai4x-mcp-server
search_members / search_projects / β¦
Zod
Cloudflare D1
Cloudflare R2
See the full technical architecture β
Architecture is shown at three levels of detail. Each level is labeled with how sure we are of it: this deployment's transport and tool layer are VERIFIED by tests; the request-flow and beginner diagrams are DOCUMENTED simplifications for teaching, not separate running components.
ILLUSTRATIVE: simplified for a first-time reader
AI Assistant
β
MCP
β
AI4X Tools
β
Official AI4X Data
DOCUMENTED: matches the stages in docs/SDD.md
User
β
AI Assistant
β
MCP Client
β
AI4X MCP Server
β
Tool
β
Authoritative Data
β
Provenance
β
Answer
VERIFIED: reflects the deployed Worker (see docs/ARCHITECTURE.md)
Click a component to see what it does.
get_center_infoThis means the AI doesn't need to know SQL β it only needs to know what this tool can do.
search_members{"keyword": "AI"}{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_members","arguments":{"keyword":"AI"}}}
{ "items": [{ "id", "slug", "nameZh", "nameEn", "role", "status", "profileUrl" }], "count": number, "provenance": Provenance[] }
MCP does not replace REST APIs. MCP provides a standardized protocol layer that allows AI applications to discover and use external capabilities.
Purpose: feed document content to the model as context.
Typical use: document search, knowledge-base Q&A.
Purpose: let AI use structured tools and external services.
Typical use: querying data, calling services, performing a defined action.
The two can be used together β they are not mutually exclusive.
AI4X MCP v1 provides no tool that modifies data.
There is no execute_sql, run_shell, or fetch_url.
Every input is validated before it runs.
Queries only use already-synced canonical data.
1
Pick a client
2
Connect
https://ai4x.mcp.ntpu.ai/mcp
3
Ask
"Use AI4X MCP to tell me what public services the AI4X center offers."
4
Observe
A. Train an AI model B. Provide standardized tools for AI to use C. Store browser cookies
Answer: B
A. Guess the tool's parameters B. List the available tools first C. Skip validation
Answer: B
A. Guess an answer anyway B. Return an explicit "no authoritative source" error C. Make up a source
Answer: B
A self-paced lab for a first MCP session. No installation required.
| Time | Activity |
|---|---|
| 0β5 min | What is MCP? |
| 5β10 min | Ask AI4X |
| 10β15 min | Inspect the Visual Trace |
| 15β20 min | Use Tool Explorer |
| 20β25 min | Inspect an MCP request/response |
| 25β30 min | Connect an MCP client |
Congratulations! You have used an MCP server.
A longer, instructor-led session covering why MCP exists through designing a new tool.
| Part | Time | Activity |
|---|---|---|
| 1. Why MCP | 15 min | LLM limitations, tool use, grounding, why MCP exists. |
| 2. Use MCP | 15 min | Use Ask AI4X. |
| 3. Understand MCP | 20 min | Inspect tools/list, tools/call, and the Visual Trace. |
| 4. Inspect MCP | 15 min | Study a tool's schema, JSON, provenance, and errors. |
| 5. Connect MCP | 15 min | Connect one MCP client. |
| 6. Design MCP | 10 min | Design a university MCP tool. |
A sequence of lessons for designing one new MCP tool, ending in an assignment you can hand in or self-check.
Design one MCP tool for NTPU (e.g. search_courses, find_faculty, search_regulations, find_classrooms, or search_scholarships). Specify:
Tool name
Purpose
Example user question
Input schema
Output schema
Authoritative source
Data classification
Risk level
Permission level
Provenance strategy
Expected errors