Introduction to MCP

Understanding the Model Context Protocol

What is MCP

MCP (Model Context Protocol) is a standardized protocol for connecting AI tools to external data sources and tools. Proposed by Anthropic, it provides AI models with a standardized way to invoke tools.


Why MCP Matters

Problems with Traditional AI Tool Calling

  • Tool usage instructions need to be included in every prompt
  • AI may misunderstand tool parameters
  • Lack of structured return formats
  • Difficult to ensure call security and reliability

MCP Advantages

  • Standardization: Unified interface definitions
  • Structure: Clear input/output formats
  • Verifiability: Parameter type checking
  • Extensibility: Easy to add new tools

AgileBuilder MCP Architecture

┌─────────────┐
│   AI Tool   │
│ Cursor/Claude│
└──────┬──────┘
       │ MCP Protocol
┌──────▼──────┐
│ MCP Client  │
└──────┬──────┘
       │ HTTP
┌──────▼──────┐
│ AgileBuilder │
│  MCP Server │
└──────┬──────┘
       │
┌──────▼──────┐
│ Local Data  │
│Templates/Docs│
└─────────────┘

AgileBuilder MCP Tools

listTemplates

List all available project templates.

// Request
{
  "tool": "listTemplates",
  "parameters": {}
}

// Response
{
  "templates": [
    {
      "name": "react-starter",
      "description": "React project starter template"
    }
  ]
}

getTemplateInfo

Get detailed template information.

// Request
{
  "tool": "getTemplateInfo",
  "parameters": {
    "template": "react-starter"
  }
}

// Response
{
  "name": "react-starter",
  "description": "React project starter template",
  "variables": [
    {
      "name": "projectName",
      "type": "string",
      "required": true
    }
  ]
}

generateProject

Generate a project.

// Request
{
  "tool": "generateProject",
  "parameters": {
    "template": "react-starter",
    "output": "./my-app",
    "variables": {
      "projectName": "my-app"
    }
  }
}

// Response
{
  "success": true,
  "projectPath": "./my-app",
  "message": "Project generated successfully"
}

MCP Resources

Beyond tool calls, MCP also supports Resources, which provide contextual information to AI.

Document Resources

resource://agile-builder/docs/{doc-slug}

AI can access through Resources:

  • Team coding standards
  • API design guidelines
  • Naming conventions
  • Best practices documentation

Template Resources

resource://agile-builder/templates/{template-name}

AI can access through Resources:

  • Template structure preview
  • Variable definitions
  • Generation examples

How It Works

  1. Start the MCP service: AgileBuilder starts a local MCP server
  2. Configure the AI tool: Set up the MCP service address in your AI tool
  3. AI calls tools: User makes a request, AI automatically calls MCP tools
  4. Return structured results: AI processes tool results for next steps

vs. Traditional Prompts

Traditional PromptsMCP
Tool DescriptionIn promptStandardized interface
Parameter PassingNatural languageStructured parameters
Return FormatNatural languageStructured data
AccuracyDepends on AI understandingType-safe
ReliabilityMay varyDeterministic

Next Steps