Read the first chapter
The whole of chapter one, free. About 14 min. Turn the pages with the arrows, your keyboard, or a swipe.
Chapter 1
Chapter 1
OpenClaw provides a flexible middleware layer that simplifies communication and coordination for autonomous agents, while MCP Server offers a reliable message-control platform optimized for distributed workloads. This issue also explores.NET Aspire, a practical guide to building robust, modern applications with.NET tools and patterns, and BMAD & Spec Kit, which dives into best practices for specification-driven development and deployment. Our cover story on OpenClaw examines design goals, integration scenarios, and performance considerations; a detailed tutorial walks through advanced MCP Server operations and professional-grade deployment strategies; and a feature on AI-assisted coding explains how grade-aware tools can speed development, reduce errors, and improve maintainability. For developers seeking hands-on guidance, the magazine delivers step-by-step examples, architectural diagrams, and real-world case studies to help you apply these technologies effectively.
ARE YOU WONDERING HOW ARTIFICIAL INTELLIGENCE CAN ©shutterstockBENEFIT YOU TODAY?
EXECUTIVE BRIEFINGS Are you wondering how AI can help your business? Do you worry about privacy or regulatory issues stopping you from using AI to its fullest? We have the answers! Our Executive Briefings provide guidance and concrete advise that help decision makers move forward in this rapidly changing Age of Artificial Intelligence and Copilots! We will send an expert to your office to meet with you. You will receive: 1. An overview presentation of the current state of Artificial Intelligence. 2. How to use AI in your business while ensuring privacy of your and your clients’ information. 3. A sample application built on your own HR documents – allowing your employees to query those documents in English and cutting down the number of questions that you and your HR group have to answer. 4. A roadmap for future use of AI catered to what you do. AI-SEARCHABLE KNOWLEDGEBASE AND DOCUMENTS A great first step into the world of Generative Artificial Intelligence, Large Language Models (LLMs), and GPT is to create an AI that provides your staff or clients access to your institutional knowledge, documentation, and data through an AI-searchable knowledgebase. We can help you implement a first system in a matter of days in a fashion that is secure and individualized to each user. Your data remains yours! Answers provided by the AI are grounded in your own information and is thus correct and applicable. COPILOTS FOR YOUR OWN APPS Applications without Copilots are now legacy! But fear not! We can help you build Copilot features into your applications in a secure and integrated fashion. CONTACT US TODAY FOR A FREE CONSULTATION AND DETAILS ABOUT OUR SERVICES. codemag.com/ai-services 832-717-4445 ext. 9 • info@codemag.com
TABLE OF CONTENTS Features 8 MCP Server Tutorial:58 Professional Grade AI-Assisted Expose Tools and Resources to AI Coding: Context Is Everything Modern AI models are brilliant but isolated—they can describe a problem with BMAD and Spec Kit but can’t actually touch your systems. The Model Context Protocol (MCP) changes that by giving AI a universal “USB-C port” “Vibe coding” gets results fast, but loses the decisions that shaped to your real data and tools. In this article, Sahil walks through building them. Context engineering fixes this by preserving provenance— a production incident assistant MCP server in Node.js that lets an the foundational choices, architectural decisions, and implementation AI detect critical alerts and autonomously restart failing services. intent behind your code—in structured, reusable artifacts. Sahil MalikIn this article, Bill explores two leading methodologies, BMAD and Spec Kit, showing how each manages AI context sessions, compares their artifact hierarchies and agent philosophies, and demonstrates 16 Building Your Own AI Agent both in action building a custom Pong game. Bill also looks at AWS Bedrock’s private deployment options. Middleware Platform Using OpenClaw Bill Catlan What if your AI assistant could read your email, search the web, and run scheduled tasks—all on hardware you own, with no cloud subscription? 69 Roll for Initiative: Building an Wei-Meng’s hands-on guide walks through building a fully operational personal AI agent using OpenClaw middleware, Ollama for model serving, Offline D&D Character Sheet Telegram as a messaging front-end, and Gmail for email access. You’ll have a privacy-respecting, extensible agent platform running on a in a Single HTML File local macOS VM by the end. Wei-Meng LeeBuild a fully offline, single-file D&D 5E character sheet that runs in any mobile browser—no server, no framework, no installation required. Jason walks through encoding the SRD’s core math as pure JavaScript 32 Async Validation, Effects, and Side functions, modeling character state as a single reactive object, and wiring up five UI tabs covering stats, skills, combat, rolls, and notes. Effects (Done Carefully) Add local storage persistence, a base64 export/import system, Asynchronous behavior doesn’t introduce new complexity into forms—and mobile-specific CSS tweaks, and your players are ready to roll. it exposes complexity that was already there. In this second installmentJason Murphy of the Signal-First Form State series, Sonu examines async validation, autosave, and multi-step flows through the lens of state rather than events. Using Angular Signal Forms, these challenges stop being coordination problems and become expressions of truth—making forms Departments that grow without losing coherence or becoming too fragile to touch. Sonu Kapoor 6 Editorial 40 Advanced Operations Using 38 Advertisers Index.NET Aspire.NET Aspire is a cloud-ready stack designed to simplify orchestration, configuration, and observability in distributed applications. Joydip’s 74 Code Compilers article explores Aspire’s integration model—covering hosting and client integrations for PostgreSQL, Redis, RabbitMQ, and SQL Server— then walks through building a real-world inventory management system using EF Core and ASP.NET Core Web API. It also covers implementing observability with OpenTelemetry and the Aspire Dashboard, and writing unit and integration tests with xUnit and Moq. Joydip Kanjilal US subscriptions are US $29.99 for one year. Subscriptions outside the US pay $50.99 USD. Payments should be made in US dollars drawn on a US bank. American Express, MasterCard, Visa, and Discover credit cards are accepted. Back issues are available. For subscription information, send e-mail to subscriptions@codemag.com or contact Customer Service at 832-717-4445 ext. 9. Subscribe online at www.codemag.com CODE Component Developer Magazine (ISSN
1547-5166 ) is published bimonthly by EPS Software Corporation, 6605 Cypresswood Drive, Suite 425, Spring, TX 77379 U.S.A. POSTMASTER: Send address changes to CODE Component Developer Magazine, 6605 Cypresswood Drive, Suite 425, Spring, TX 77379 U.S.A. 44 Table of Contentscodemag.com
EDITORIAL The New Currency of AI: Why Token Discipline Matters More Than Ever This summer marks a turning point in how developers consume AI tooling. GitHub Copilot’s transition from flat-rate subscriptions to usage-based billing, powered by token consumption and GitHub AI Credits, which started on June 1st, is more than a billing change. It’s a clear signal that the economics of AI-assisted development are maturing, and• Efficient prompt design. The gap be-new tooling and roles: AI usage dashboards, that the era of treating AI as “free” is ending.tween a good prompt and a bad one isprompt libraries as first-class assets, internal For years, AI coding assistants operated like annow measurable in both quality and cost.governance policies. In many ways, this mir- all-you-can-eat buffet: pay once and consumeConcise, well-structured prompts often re-rors the evolution of cloud computing a decade without limits. Behind the scenes, every prompt,duce token usage while improving output.ago: first came the gold rush of rapid adoption completion, and interaction always carried realKey practices eliminate ambiguity ratherand “lift-and-shift.” Then came FinOps, optimi- compute cost. That cost was simply hidden. Now,than adding verbosity. They also usezation, and cost discipline. AI is now entering using tokens as both the unit of measure and thestructure (JSON, XML, bullet points, con-that same maturation phase. basis for billing, developers and organizationsstraints, expected output formats), and must confront an uncomfortable truth: efficiencyavoid repeating context unnecessarily.From Experimentation to Discipline in AI usage is no longer optional. It’s essential.• Context reuse and layering. One largeThe early days of AI coding assistants were de- source of token waste is resending thefined by curiosity and free-form experimenta- same project architecture, coding stan-tion. That phase was necessary and incredibly The Illusion of “Infinite AI” dards, or business logic in every interac-valuable. But as the cost model changes, our The subscription era created an illusion oftion. Organizations should move forwardmindset must evolve with it. We are moving abundance. Developers experimented freely, ac-by defining persistent project contextfrom exploration to optimization, from per- celerating learning and adoption. But it alsodefinitions, shared prompt scaffolds andceived abundance to accountability, and from encouraged waste: long-winded prompts, re-templates. Emphasis on layered contextconvenience to craft. This shift elevates AI’s dundant queries, and repeated context-sendinginjection is also a key technique: send-importance by pushing us to treat AI with the went unpunished because they were invisible.ing only what each task requires. Think ofsame engineering rigor we apply to the rest of In a usage-based world, every unnecessary to-it as caching for human-AI collaboration.the stack. ken has a price. Scaled across teams and or-• Company-level context engineering. ganizations, those small inefficiencies quicklyAt the organizational level, companiesFinal Thoughts add up to meaningful operational costs. CTOsshould invest in reusable, structuredToken-based pricing is a mirror. It reflects how and COOs are increasingly asking tougher ques-knowledge assets that capture things likeeffectively we have been using one of the most tions—not whether AI delivers value, that’sdomain expertise, coding guidelines andpowerful tools in modern software develop- settled—but whether current usage patternsstandards, security and compliance poli-ment. For organizations willing to adapt, the deliver measurable return on investment.cies, architectural principles, and more.path is clear: first, invest in prompt engineer- This shifts AI usage from ad-hoc conver-ing and AI interaction skills; then, build reus- The Rise of Tokenmaxxingsations to disciplined, repeatable work-able, structured context systems; finally, mea- A new term has entered engineering lexicon:flows.sure real business outcomes, not just token tokenmaxxing. It describes the pattern of con-• Measure what matters. Companies shouldvolume. In a world where everyone has access suming large volumes of tokens with little pro-define concrete metrics: time saved perto the same powerful models, that mastery will portional gain in productivity, quality, or speed.task, reduction in defects, improvementsbe the ultimate differentiator. Tokenmaxxing occurs when prompts are writtenin code quality and maintainability, and inefficiently, the same context is repeatedlydeployment frequency and velocity. With-Otto Dobretsberger re-sent instead of reused, and AI is called onout these, token spend remains a cost for tasks where simpler tools suffice. Develop-center. With them, it becomes a strategic ers tend to fall into trial-and-error promptinginvestment. instead of developing a structured interaction. The result is ballooning costs with disappoint-Why the Industry Will Follow ing business outcomes.GitHub is unlikely to be the last vendor making this shift. Large language models are expensive The Real Opportunity: Smarter AI Usageto run, and flat subscriptions do not scale sus- If token-based billing exposes inefficiency, ittainably with heavy usage. As more tools adopt also creates a powerful opportunity: to becomeusage-based pricing, every organization will far more intentional with AI systems. The nextface three defining questions: How much are competitive advantage will come from using itwe actually spending? Where is the real value? efficiently.How do we optimize? This reckoning will spawn 6Editorialcodemag.com
ARE YOU WONDERING HOW ARTIFICIAL INTELLIGENCE CAN HELP YOUR BUSINESS? Do you worry about privacy or regulatory issues stopping you from using AI to its fullest? We have the answers! We will send an expert to your office to meet with you. You will receive: 1. An overview presentation of the current state of Artificial Intelligence. 2. How to use AI in your business while ensuring privacy of your and your clients’ information. 3. A sample application built on your own HR documents – allowing your employees to query those documents in English and cutting down the number of questions that you and your HR group have to answer. 4. A roadmap for future use of AI catered to what you do. CONTACT US TODAY FOR A FREE CONSULTATION AND DETAILS ABOUT OUR SERVICES. codemag.com/executivebriefing ©shutterstock832-717-4445 ext. 9 • info@codemag.com codemag.comEditorial7
ONLINE QUICK ID 268021 MCP Server Tutorial: Expose Tools and Resources to AI I have written many articles on AI, and it is really interesting to see how the landscape of AI has changed over time. The landscape of AI-driven IT is shifting from traditional support roles toward specialized “architects” of intelligence. As organizations move beyond simple chatbots, these distinct personas have emerged to handle the integration of largemance on specific tasks. This person excels at things such language models (LLMs) and agentic workflows. I’ll iden-as PyTorch/TensorFlow, LoRA (Low-Rank Adaptation), and tify a few of these roles.data curation, etc. You have the retrieval architect (RAG specialist), who fo-Many AI professionals may have a huge overlap in all Sahil Malik cuses on grounding. They bridge the gap between a “raw”these roles. We all wear different hats. But in this article, www.winsmarts.com AI model and a company’s private data. This professionalI am going to focus on the agentic orchestrator persona, @sahilmalik builds retrieval-augmented generation (RAG) pipelineswho is proficient in API integration, Python, and Model Sahil Malik is an accom-and has expertise in vector databases (like Pinecone orContext Protocol (MCP) to allow models to interact with plished author and speaker Milvus), semantic search, and metadata filtering.local files and databases safely. who has published video courses, authored books You have the agentic orchestrator, who sees AI not justSpecifically, I will dive deep into MCP and explain why for numerous publishers, as a dummy text generator but as an agent, an actor thatand when you’d use it and hopefully make something use- spoken at conferences can perform valuable tasks in an unattended form. Theyful by the end of this article. across the world, and build systems where AI can use tools, browse the web, or authored for CODE Magazine execute code to complete multi-step tasks. This person for many years. In his AI as a “Brain in a Vat” excels at designing “agentic workflows” using frameworks free time, he likes to like LangChain or CrewAI.Let’s be honest, talking to an AI can sometimes feel like do gardening and shouting advice to a friend who is locked in a soundproof play with his dogs. You have the prompt engineer & evaluator who oftenroom. They’re brilliant and have read every book ever comes from a technical writing or QA background. Thiswritten, but they can’t do anything. If you ask a standard professional focuses on the interface and reliability. ThisLLM to “Check why the database is slow,” it will give you person is great at optimizing system instructions and cre-a beautiful, 10-point bullet list of theoretical reasons why ating “golden datasets” to test if model updates breakdatabases get tired. existing logic. This person is great at chain-of-thought prompting and automated evaluation metrics (like RAGASWhat it won’t do is actually look at your database. or BERTScore). But I want AI to solve my problems, not just give me Then you have the AI infrastructure (AIOps) engineer,generic advice. who is the modern evolution of the DevOps role. This person ensures the plumbing for AI is scalable, cost-ef-Enter the Model Context Protocol (MCP). Think of MCP as fective, and secure. They worry about things like manag-the “USB-C port” for AI. It allows you to plug your tools, ing “GPU-seconds,” monitoring token usage/latency, andyour data, and your local environment directly into the deploying models on-premises or in private clouds. ThisAI’s reasoning engine. person is great at Kubernetes, cloud resource manage- ment (AWS/GCP/Azure), and implementing “guardrails” toLet’s cook up a realistic problem. Say we have a bunch of prevent data leakage.production systems running, and like any well-engineered production environment, it generates emergencies. But And finally, there is the fine-tuning specialist. Whilebefore it produces an emergency that wakes you up at 3 many use off-the-shelf models, this professional special-a.m., it produces alerts. For example, disk is running out izes in domain-specific deep learning. This person takesof space, or a certain user is now part of 1,000 AD groups, a base model and trains it on specialized datasets (e.g.,(meaning the user’s Kerberos ticket will soon start fail- legal, medical, or niche codebases) to improve perfor-ing), etc. Typically, you would get this alert and a really 8 MCP Server Tutorial: Expose Tools and Resources to AIcodemag.com
smart person who knows what that alert means knows tool-access patterns that teaches a model how to perform what to do about it. If a disk is running out of space ora specific, repeatable task.
a SQL query is taking too long to query, you clean up the disk, examine and rebuild indexes, and so forth.While an MCP server provides the “muscles” (the ability to read files or hit APIs), a skill provides the “brain” (the Now, with AI as a “brain in a vat,” you can ask it things logic, tone, and step-by-step reasoning). In many mod- like “What do I do when my disk is low on space?” But erern agentic frameworks, a skill is essentially a packaged what if we could make AI smarter? We can give it eyes, “mini-persona” that can be handed to an AI to make it an “hands, and a job to fix. For instance: “I just got Alert 001, expert in a narrow domain. disk low space detected. Diagnose and fix it, please.” You should build or use a skill when you need the AI to go Could you automate this? Could you write this logic in beyond general chat and follow a strict, high-quality work- simple English and use AI to do more complex tasks? Con-flow. For example, when you want standardized technical sider something like: “This kind of conditional access pol- tasks, i.e., you want the AI to always use a specific format icy was violated three times by the same user in the last for Git commit messages or follow a specific coding style. hour. Query the AAD logs for the past year for this user Or maybe you want to use complex multi-step workflows and establish patterns; then query this user’s mailbox for when a task requires chain-of-thought reasoning, for ex- any suspicious outgoing emails; also search OneDrive for ample, “First, audit the security of this code; second, check external sharing.” for performance bottlenecks; third, summarize findings.” Or perhaps you want to do data transformation when you Or perhaps you want to do data transformation when you consistently need to turn messy inputs (like raw logs) into consistently need to turn messy inputs (like raw logs) into structured outputs (like a JSON report). Or maybe you want structured outputs (like a JSON report). Or maybe you want domain-specific reasoning, giving the AI the “skill” of a domain-specific reasoning, giving the AI the “skill” of a senior Java architect so it critiques code with a specific focus on design patterns rather than just syntax.
Let’s go step by step. In this article, I am going to build a “production incident assistant”—a realistic MCP server that lets an AI orchestration system fetch simulated sys- tem alerts and “reboot” failing services. As far as the AI orchestration system goes, I just made up that term. Re- ally anything that understands the MCP protocol is game.
End of chapter one. 37 more chapters in the full book.
Swipe or use the arrows to turn the page
What's inside: 38 chapters
- 1. Chapter 1
- 2. Components of an MCP Server
- 3. Lifecycle of an MCP Server
- 4. Building an MCP Server
- 5. The Core Logic
- 6. Registering a Resource
- 7. Registering a Tool
- 8. Add the Startup Logic
- 9. Building the MCP Server
- 10. Running the MCP Server
- 11. ONLINE QUICK ID 268031
- 12. Building Your Own AI Agent Middleware Platform
- 13. Using OpenClaw
- 14. Configuring the macOS VM
- 15. Installing Ollama
- 16. Configuring Telegram for OpenClaw use
- 17. Configuring OpenClaw
- 18. Using the OpenClaw TUI
- 19. Using the OpenClaw Dashboard
- 20. Making Changes to OpenClaw Setup
- 21. Multi-Step Flows as State Composition
- 22. The Real Outcome
- 23. When Traditional Abstractions Fail
- 24. From Coordination to Composition: What Actually Changed
- 25. Advanced Operations Using .NET Aspire
- 26. Install Entity Framework Core
- 27. Create the Model Classes
- 28. Create the Data Context
- 29. Create the Purchase Order Repository
- 30. Create the Purchase Order Controller
- 31. What Is Observability and Why Does It Matter?
- 32. Configure Observability in .NET Aspire
- 33. Figure 8: Displaying Product Telemetry Data in the web browser
- 34. Figure 9: Displaying Trace data for Products
- 35. Listing 10: IntegrationTests Class with a Test for the GET /api/product Endpoint
- 36. BMAD Knows How to Party
- 37. STAFFING
- 38. UNLOCK STAFFING EXCELLENCE
About this book
"26004 CODE 4 2026 Web" is a general book by Anonymous with 38 chapters and approximately 34,039 words. It covers key insights and practical takeaways on the topic.
This book was created using Inkfluence AI, an AI-powered book generation platform that helps authors write, design, and publish complete books.
Frequently Asked Questions
What is "26004 CODE 4 2026 Web" about?
"26004 CODE 4 2026 Web" is a general book by Anonymous covering key insights and practical takeaways on the topic.
How many chapters are in "26004 CODE 4 2026 Web"?
The book contains 38 chapters and approximately 34,039 words. Topics covered include Chapter 1, Components of an MCP Server, Lifecycle of an MCP Server, Building an MCP Server, and more.
Who wrote "26004 CODE 4 2026 Web"?
This book was written by Anonymous and created using Inkfluence AI, an AI book generation platform that helps authors write, design, and publish books.
Write your own book with AI
Describe your idea and Inkfluence writes the whole thing. Free to start.
Start writingCreated with Inkfluence AI