Table of Contents
How to Create Your Own MCP: Learning AI Integration with Poachang Lab MCP Example
🚀 Introduction
Today, let's dive into the exciting world of creating your own MCP (Model Context Protocol).
Starting from "What is MCP?", we'll walk through the entire process of preparing files in Cursor and integrating with AI Agents (like Claude Sonnet 4 or Codex on Cursor) in a way that's easy to understand and visualize.
This comprehensive guide is structured to be video-friendly and can be easily loaded into NotebookLM for video creation, with 3000-5000 words of systematic content.
💡 What You'll Learn in This Article
- MCP fundamentals and mechanisms
- Step-by-step MCP creation process
- Integration methods with Cursor and AI agents
- Practical code examples and testing approaches
🔍 1. What is MCP?
📚 1-1. MCP Fundamentals
MCP stands for Model Context Protocol, a standardized protocol for AI agents and tools to communicate with each other.
- GitHub MCP - Repository operations and issue management
- AWS MCP - Cloud resource operations
- Playwright MCP - Browser automation
Popular Existing MCPs:
These MCPs provide functionality like "AI agents accessing GitHub," "operating AWS resources," and "automating browser actions."
🎯 In essence, MCP is a system that gives AI tools to connect with the external world.
⚡ 1-2. Differences Between MCP and Regular Programs
Beginners often get confused about "How is this different from writing regular Node.js programs?"
| Aspect | Regular Node.js App | MCP |
|---|---|---|
| Execution | Direct execution via `node index.js` | Called by AI agents |
| Target User | Direct human use | AI-specific external tool |
| Design Philosophy | Human operation focused | Driver for AI |
🛠️ 1-3. Existing MCP vs Custom MCP
- Convenient tools for accessing GitHub repositories or AWS S3
Existing MCPs:
- Create specialized "itch-scratching" functionality
- Example: "Generate mushroom explanations and auto-post to X (formerly Twitter)"
- Become original tools tailored to your hobbies, research, or business needs
Custom MCPs:
🌟 2. Why Create Your Own MCP?
When you transition from being "just a user" to "a creator," your world expands dramatically.
🎮 Benefits of Custom MCPs
- Automated processes execute with just an agent call
- Complete complex tasks in an instant
1. Make AI Your Right Hand
- Example: Custom MCP connecting "AWS log monitoring" with "Slack notifications"
- Build unique workflows linking multiple services
2. Customize Existing Services to Your Needs
- Deepen understanding of internal structures beyond just using AI
- Dramatically expand your application possibilities
3. Learning Benefits
📚 Fun Fact
In the early days of computing, there was a culture of creating custom "device drivers." MCP is similar to that - it's like creating modern "AI drivers."
📁 3. Basic Files for Creating MCP
First, MCP requires three basic files.
🗂️ Required Files List
- Definition file for managing MCP as a Node.js project
- Lists dependencies and entry points
1. package.json
- File defining MCP metadata (name, version, endpoints, etc.)
2. mcp.json
- Code containing the actual processing logic
- Describes "how to receive input and transform it" and "where to output"
3. Entry File (e.g., index.js)
🏗️ Directory Structure Example
The following directory structure makes it easy to understand:
pochanglab-mcp/ ├── package.json # Node.js definition file ├── mcp.json # MCP definition file └── index.js # Processing logic file
✅ Tip: Start with a simple structure and expand functionality as needed.
🍄 4. Poachang Lab MCP Example: Mushroom Transformation
Let's examine the actual code structure using the "Mushroom Transformation MCP" as an example.
📦 package.json Example
{
"name": "pochanglab-mcp",
"version": "1.0.0",
"main": "index.js",
"dependencies": {
"axios": "^1.6.0"
}
}
⚙️ mcp.json Example
{
"name": "pochanglab-mushroom-mcp",
"version": "1.0.0",
"description": "MCP that interprets mushroom meanings and posts to X",
"entry": "index.js",
"capabilities": ["transform", "post"]
}
💻 index.js Example
import axios from "axios";
export async function handleRequest(input) {
if (input.includes("mushroom")) {
const explanation = "Mushrooms add umami to stews, but grilled whole mushrooms have a strong aroma that some people dislike. They are a type of fungi, similar to shiitake.";
// Post to X (Twitter) - hypothetical example
await axios.post("https://api.x.com/post", {
text: explanation
});
return { result: "Posted: " + explanation };
} else {
return { result: "No transformation needed." };
}
}
🔧 Explanation: This example implements functionality that generates explanations and posts to X (formerly Twitter) when the input contains "mushroom".
🧪 5. Local Testing Methods
Before connecting directly with AI agents, let's first verify that it works locally.
🔍 Basic Test Code
export async function handleRequest(input) {
return { result: "Your input was: " + input };
}
// For testing
if (require.main === module) {
const input = "mushroom";
handleRequest(input).then(res => console.log(res));
}
🚀 Execution and Testing
Save and run this:
node index.js
Output example:
{ result: 'Your input was: mushroom' }
✅ Important: Confirming basic functionality before registering as MCP provides peace of mind. It makes debugging easier and enables early problem detection.
⚙️ 6. Cursor Setup
📂 1. Create Project Directory
mkdir pochanglab-mcp cd pochanglab-mcp npm init -y
📄 2. File Placement
package.jsonmcp.jsonindex.js
Place the following files as explained above:
🔧 3. Cursor Configuration
Configure Cursor to load mcp.json.
Add the following to your settings.json MCP settings:
{
"mcpServers": {
"pochanglab-mushroom": {
"command": "node",
"args": ["index.js"],
"env": {}
}
}
}
🤖 4. Calling from AI Agents
Call from AI Agents (Claude Sonnet 4 or Codex on Cursor).
Usage example:
MCP: pochanglab-mushroom Input: What is a mushroom?
🎯 Result: The previous processing executes, and automatic posting to X occurs.
🚀 7. Expanding Applications
The possibilities for custom MCPs are limitless. Here are some application examples:
💼 Business Efficiency
- Internal Wiki Auto-Reference MCP: Automatically search internal wiki for appropriate answers to questions
- Report Generation MCP: Automatically collect data and create reports
🎨 Creative Activities
- Guitar Chord Auto-Matching MCP: Automatically suggest guitar chords that match lyrics
- Illustration Generation MCP: Automatically generate illustrations based on themes
🔬 Research & Analysis
- Weather API Integration MCP: Retrieve weather data for analysis
- Stock Monitoring MCP: Monitor stock price fluctuations and send alerts
🎯 This "freedom to customize AI agents" is the true appeal of creating custom MCPs.
🎉 8. Summary
Have you grasped the concept of MCP by now?
🔑 Key Points
- MCP is a protocol connecting AI with the external world
- Unlike regular programs, it's designed "with AI usage in mind"
- Three required files:
package.json,mcp.json,index.js - First test locally, then register with Cursor and integrate with AI agents
- Starting with slightly humorous features like Poachang Lab MCP is perfectly fine
🌈 Final Words
Custom MCPs become powerful tools for both learning and practical use.
Please challenge yourself to create your own unique MCP. New discoveries and possibilities surely await you.
💪 First Step You Can Take Today: Start with a simple "Hello World" MCP!

NEW NOVEL 2026/08/01
Clouded Glass
Polishing is not about force.
Volume two of The World Became Slightly Farther Away.Five stories that can also be read as a starting point.
View on Amazon
Jijoden.com
Your life is worth writing.
There is a truer self you can tell only to AI.Gather fragments of memory into a single story.
Take a LookRelated Articles
Why the Same AI Model Yields Different "Intelligence": The Hidden Prompt Transformations and Autonomous Loops Inside Modern IDEs
"Why do I get different results when using the exact same Claude Opus 5 model?" We dive deep into the "black magic" (context injection, prompt transformation, and hidden LGTM loops) that IDEs perform behind the scenes. Exploring the architectures of Cursor, Claude Code, Devin Desktop, and ChatGPT Codex.
The New Coding Frontier: Cursor's Composer and the Era of Agent Speed
Cursor Composer 1 and Cursor 2.0, announced in October 2025, open a new era of AI coding assistance. A deep dive into fast models that preserve developers' "flow state" and multi-agent workflows.
GitHub Copilot Agent: The Era of AI Completing Development Tasks
Explore GitHub's Copilot Coding Agent announced in May 2025. Discover how AI has evolved from creating PRs to understanding issues and completing development tasks autonomously.
How to Choose the Best Cursor Plan: Pro vs Pro+ vs Ultra (2025 Edition)
A comprehensive comparison of Cursor's latest pricing plans (Pro, Pro+, Ultra) using mathematical formulas. Learn how to choose the optimal plan based on your monthly usage and when Ultra becomes the best choice.
What is RAG (Retrieval-Augmented Generation)? Complete Guide to Generative AI, AI Agents, and MCP
A beginner-friendly guide to RAG (Retrieval-Augmented Generation), explaining its differences and relationships with Generative AI, AI Agents, and MCP, including how ChatGPT's web search relates to RAG.