Agent Skills and MCP: A Production Architecture for Reusable AI Workflows
Learn how Agent Skills and MCP fit together: package procedures, expose narrow tools, enforce authorization at the server, and ship versioned, evaluated workflows safely.
By BoundLayer Engineering Team
BoundLayer is a senior engineering partner for SaaS, fintech, AI automation, cloud infrastructure, legacy modernization, Web3, IoT, GPU computing, and data systems.
AI agents need two different things to complete business work: instructions for how to perform a task and controlled access to the systems where the task happens. Agent Skills and the Model Context Protocol (MCP) address these concerns at different layers. Treating them as competing standards leads to muddled designs; treating either as a security boundary leads to dangerous ones.
The Agent Skills specification packages procedural knowledge in a directory centered on SKILL.md, with optional scripts, references, and assets. MCP exposes tools and resources through a protocol. In a production system, a skill can explain when and how to use an MCP tool, while the MCP server and downstream service enforce what the agent is actually allowed to do.
Separate knowledge from capability
A useful mental model is:
User request
|
Agent runtime -- loads relevant skill instructions on demand
|
MCP client -- discovers and invokes approved tools
|
MCP server -- authenticates, authorizes, validates, and records calls
|
Business service or data source
A skill should describe a repeatable procedure: prerequisites, decision steps, expected inputs, safe tool sequence, validation, and escalation conditions. MCP tools should expose narrow operations such as preview_refund, get_invoice, or create_draft_change, not an unrestricted database connection or a general-purpose shell.
The skill influences model behavior; it does not grant authority. The server and business service remain the enforcement points. If the instructions say “only refund orders under $100” but the tool accepts any amount, a model mistake or malicious prompt can bypass the policy. Enforce the limit in the tool or service, with the caller's identity and relevant business context.
Use progressive disclosure to control context size
Loading every procedure and every tool schema into every request wastes context and makes tool selection harder. Agent Skills supports a lightweight discovery layer: agents can see a skill's name and description, then load its detailed instructions and supporting resources when relevant.
Use that pattern deliberately:
- Keep skill descriptions distinct and task-oriented so the runtime can identify likely matches.
- Put the core procedure and safety constraints in
SKILL.md. - Move long references, examples, and schemas into clearly named supporting files loaded only when needed.
- Keep MCP tool catalogs focused on actions available to that agent and user.
- Measure whether a skill improves task success, tool choice, and policy compliance against a baseline without the skill.
Do not split instructions into many tiny files without evaluating the added discovery and retrieval cost. Progressive disclosure is useful only when the agent can reliably find the necessary detail at the right time.
Build a governed skill supply chain
Skills are executable operational content in the broader sense: they can shape decisions and may include scripts. Treat them as versioned artifacts, not copied snippets in an employee's home directory.
An internal skill repository should capture:
- an accountable owner and supported agent runtimes;
- source repository, license, release version, and immutable revision or digest;
- intended tasks, required tools, data classification, and known limitations;
- review history, dependencies, and deprecation policy;
- automated format checks and task-specific evaluations.
Require review before a skill becomes available to production agents. Scan scripts and bundled dependencies. Treat external references and dynamically fetched content as untrusted input. Pin versions in each agent deployment and promote updates through test and staging before production. A mutable “latest” skill can change agent behavior without an application release.
The format defines a directory structure and metadata constraints, but organizations still need an operational release process. A shared artifact registry, signed release bundles, and CI checks provide a place to enforce ownership and version policy. Keep the registry implementation replaceable while packaging and discovery standards evolve.
Put authorization at the tool boundary
An MCP server should authenticate the calling user or workload and apply authorization on every request. Avoid a single service credential that lets every agent perform every action. Pass tenant and actor context through the request, verify resource ownership server-side, validate schemas and ranges, and make writes idempotent where feasible.
For sensitive operations, expose a preview or draft tool first. The agent can prepare an action, show the exact target and consequences, and request human approval. Only then should a separate commit tool execute the change under a policy that re-checks authorization and validates that the approved parameters still match.
Never rely on natural-language rules inside SKILL.md for access control. The runtime may not load the skill, the model may interpret it incorrectly, and untrusted retrieved content can conflict with it. Authorization belongs in the server and the underlying business service.
Test the whole workflow, not just the file format
Schema validation catches malformed frontmatter, but it cannot prove that instructions are clear, tools are safe, or the workflow succeeds. Build evaluations around representative tasks and adversarial cases:
- Does the agent select the intended skill for the request?
- Does it call only tools necessary for the task?
- Does it ask for missing information instead of guessing?
- Does it respect tenant boundaries and read-only restrictions?
- Does it stop for approval before irreversible or externally visible actions?
- Does it verify the result and provide an accurate completion summary?
- What happens when an MCP tool times out, returns partial data, or rejects a write?
Capture tool names, authorization decisions, result codes, and correlation IDs. Avoid logging secrets or full sensitive payloads by default. Our guide to production MCP security covers trust boundaries and server hardening; AI agent evaluation describes broader quality testing.
Track task completion, policy violations, unnecessary calls, approval rate, failure recovery, latency, and cost per successful outcome. A successful happy-path demo is not evidence that a workflow is ready for production.
Example: a support refund workflow
A support agent receives a request to refund a customer. The refund-support skill teaches it to verify the order, summarize the reason, check the refund policy, and prepare a proposal. The MCP server exposes read-only order lookup and preview_refund; the latter validates eligibility and returns the maximum allowed amount. A separate commit_refund operation requires an authorized approval token tied to the exact order and amount.
The application, not the skill, decides which human roles can approve refunds. The server re-checks the token, tenant, amount, and order state before committing. The workflow records who requested the action, who approved it, the policy result, and the final transaction ID. If the order changes between preview and approval, the commit fails and requires a new preview.
This design keeps task knowledge portable while preserving deterministic controls around money movement.
A practical rollout
Start with one read-only or draft-producing workflow. Write a narrow skill, expose the minimum MCP tools, and define the identity and data boundaries before connecting a production account. Run evaluations on real but sanitized examples, including ambiguous and malicious requests. Then deploy to a small user group with explicit monitoring and a rollback path.
Expand permissions only when there is evidence that the current capability is insufficient. Keep every production skill and MCP server in an inventory with an owner, version, data access, and review date. BoundLayer builds AI automation and integration systems with these boundaries built into the workflow; see our guides to AI workflow automation and production AI agent operations.
Sources
Related engineering articles
AWS Step Functions as AI Agent Tools: A Production Integration Guide
Expose existing AWS Step Functions workflows to agents through Bedrock AgentCore Gateway while keeping business logic deterministic, IAM permissions narrow, retries safe, and approvals auditable.
AI Agents vs. RPA: How to Choose the Right Business Process Automation Architecture
A practical guide to combining AI agents, RPA, durable workflows, APIs, and human approval for reliable business process automation.
AgentOps for Production AI Agents: Observability, Evaluation, Security, and Cost Control
A practical guide to operating production AI agents with end-to-end tracing, continuous evaluation, least-privilege security, approval gates, and cost controls.
Building reusable, secure AI agent workflows?
We design agent architectures that combine reusable domain procedures with narrowly authorized tools, evaluations, and auditable production controls.