sharpening pencils…coloring inside the lines…fetching ice cream…untangling the wires…almost there, probably…

Skip to content
oby
  • Proyek
  • Blog
  • Resume
  • Buku Tamu
ProyekBlogResumeBuku Tamu
Tema
Situs ini menggunakan cookie dan teknologi serupa untuk menyediakan, mengamankan, menganalisis, dan meningkatkan layanan kami. Baca Kebijakan Privasi

Ujung halaman

Aaah, kamu sampai di dasar.

Gulir sampai habis dan masih penasaran? Bagus. Masih banyak hal menarik di sekitar. Pilih salah satu penunjuk dan jelajahi.

you are hereBuku Tamutulis pesanmu!Proyekkarya yang dirilisResumeyang lebih formal
oby

Saya membangun antarmuka, bot, dan skrip otomasi yang dipertanyakan — kebanyakan agar saya tidak perlu mengulanginya.

Membangun antarmuka web yang berpendirian.

Di Tempat Lain

Halaman

  • Proyek
  • Blog
  • Resume
  • Buku Tamu

Situs

  • Branding
  • Catatan Rilis
  • Kebijakan Privasi

© 2021–2026 Roby Karti S.. Hak cipta dilindungi.Terakhir diperbarui: 19 Okt 20269 pengunjung · 4 kunjungan hari ini

matikan lampu?nyalakan lampu?

0
Blog
PreviousNext
0
Kepala tulisan

Open Agent Protocols and Machine-Readable Workflows: Building Context-Aware AI Systems

Roby Karti S.

Diterbitkan 18 Oktober 2026

Diperbarui 18 Okt 2026

3 mnt baca

6 dibaca

Architecting open-source AI agent workflows using Model Context Protocol (MCP) and structured data schemas for seamless developer automation and tool integration.

  • AI Agents
  • Model Context Protocol
  • Architecture
  • Open Source
  • TypeScript
00/1301/1302/1303/1304/1305/1306/1307/1308/1309/1310/1311/1312/13JSON OK
0

Building effective AI integrations requires moving beyond basic text generation. When software systems need artificial intelligence to read database tables, query Git repositories, or interact with municipal service APIs, unstructured prompt chains quickly break down.

To make AI systems reliable in production, we must treat tools, context, and capabilities as machine-readable protocols.

I'm Roby Karti S., a fullstack software developer focused on building scalable digital platforms. In this post, I explore how open standards like the and structured schema designs enable AI agents to execute complex, multi-step engineering tasks safely.

The Problem with Proprietary Tool Integration

Historically, connecting a language model to external software required writing custom function-calling wrappers for every specific API or model vendor. This approach created three distinct challenges:

  1. Vendor Lock-In: Tool definitions formatted for one LLM provider could not be reused across open-source local models without complete rewrite layers.
  2. Brittle Context Injection: Passing arbitrary file contents or state dumps into system prompts wasted context window tokens and increased hallucination rates.
  3. Security and Permission Risks: Giving an AI agent direct database or shell execution capabilities without standardized permission boundaries created severe security vulnerabilities.

The solution is a universal, open standard that decouples model inference from system tools and data sources.

Understanding the Model Context Protocol (MCP)

The Model Context Protocol (MCP) is an open-source architecture that standardizes how applications provide context and tools to AI models. Much like how Language Server Protocol (LSP) standardized code editor auto-completion, MCP provides a uniform interface between AI clients and local or remote data servers.

MCP transforms raw model capabilities into deterministic, structured client-server interactions.

On this page
The Problem with Proprietary Tool IntegrationUnderstanding the Model Context Protocol (MCP)Implementing a Type-Safe MCP Server in TypeScriptStructured Machine-Readable Data in Web ApplicationsKey Architectural Advantages
0
Interaksi tulisan
0
Blog
PreviousNext
┌─────────────────────────┐                ┌─────────────────────────┐
│     MCP Host / Client   │                │        MCP Server       │
│  (Zed / VS Code / App)  │ ◄── JSON-RPC ──► (Database / Git / API)  │
└────────────┬────────────┘                └─────────────────────────┘
             │
             ▼
┌─────────────────────────┐
│     AI Model / LLM      │
└─────────────────────────┘

An MCP implementation exposes three primitive capabilities:

  • Resources: Readable, context-rich data sources (e.g., file contents, system logs, API endpoints).
  • Tools: Executable functions that perform side-effect actions (e.g., executing SQL queries, pushing Git commits, updating database records).
  • Prompts: Parameterized, pre-tested prompt templates designed for specific operational workflows.

Implementing a Type-Safe MCP Server in TypeScript

To demonstrate how open agent protocols function in practice, here is a lightweight MCP server implementation built in TypeScript that exposes structured database diagnostics to local AI clients.

import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import {
    CallToolRequestSchema,
    ListToolsRequestSchema,
} from "@modelcontextprotocol/sdk/types.js";
import { z } from "zod";

const server = new Server(
    {
        name: "system-health-mcp",
        version: "1.0.0",
    },
    {
        capabilities: {
            tools: {},
        },
    },
);

// Register available tools for AI agents
server.setRequestHandler(ListToolsRequestSchema, async () => ({
    tools: [
        {
            name: "query_service_status",
            description:
                "Get real-time operational status and metrics for a specific system service.",
            inputSchema: {
                type: "object",
                properties: {
                    serviceName: {
                        type: "string",
                        description:
                            "Name of the service (e.g., postgres, redis, api)",
                    },
                },
                required: ["serviceName"],
            },
        },
    ],
}));

// Handle tool execution requests deterministically
server.setRequestHandler(CallToolRequestSchema, async (request) => {
    if (request.params.name === "query_service_status") {
        const serviceName = String(request.params.arguments?.serviceName);

        // Perform deterministic system lookup
        const statusReport = {
            service: serviceName,
            status: "healthy",
            latencyMs: 12,
            activeConnections: 42,
            timestamp: new Date().toISOString(),
        };

        return {
            content: [
                {
                    type: "text",
                    text: JSON.stringify(statusReport, null, 2),
                },
            ],
        };
    }

    throw new Error(`Tool not found: ${request.params.name}`);
});

// Start transport channel over standard I/O
const transport = new StdioServerTransport();
await server.connect(transport);

By enforcing strict JSON-RPC communications, the host application inspects, logs, and validates every tool call before permitting execution.

Structured Machine-Readable Data in Web Applications

Machine readability extends beyond AI agents to include search engine crawlers, automated resume parsers, and public data integrations. Adding structured schema markup (JSON-LD) ensures that both machines and AI assistants parse information without structural loss.

{
    "@context": "https://schema.org",
    "@type": "Person",
    "name": "Roby Karti S.",
    "jobTitle": "Fullstack Software Developer",
    "url": "https://ajoroby.is-a.dev",
    "sameAs": [
        "https://github.com/robyajo",
        "https://x.com/roby_karti",
        "https://id.linkedin.com/in/robykartis"
    ],
    "knowsAbout": [
        "TypeScript",
        "Next.js",
        "Go",
        "Laravel",
        "System Architecture",
        "Open Source AI"
    ]
}

Combining open protocols like MCP with standardized JSON-LD schema markup bridges the gap between human-facing UI and machine-readable execution environments.

Key Architectural Advantages

Adopting open, machine-readable protocols delivers tangible engineering benefits:

  1. Interoperability: A single MCP server works seamlessly across any compatible AI client (Zed, VS Code, Claude Desktop, or custom CLI agents).
  2. Predictable Execution: Tools return strictly validated JSON schema outputs rather than raw, unpredictable text strings.
  3. Security Auditability: Security layers inspect and prompt user confirmation for sensitive tool invocations before execution.

As the open-source AI ecosystem continues to grow, standardized context protocols will serve as the foundation for autonomous, multi-agent software engineering.

Building context-aware systems on open protocols guarantees longevity, vendor independence, and total control over automated workflows.

Itu akhirnya. Bagaimana menurutmu?

// belum ada reaksi. kamulah yang pertama.

Model Context Protocol (MCP)

Vibe check + opini

Bagaimana menurutmu?

Sekali ketuk. Tanpa akun.

Komentar

Sepi. Sepi sekali.

Jadilah yang pertama berkomentar, bagus atau jelek atau ngawur sekalian.