본문으로 건너뛰기
cccskills
무료GitHub에 공개

mcp-agent-patterns

Use when integrating or optimizing Model Context Protocol (MCP) servers and clients. Keywords: MCP, Model Context Protocol, tool discovery, lazy loading, sampling, resource subscription, MCP server.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md3.9 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

MCP Agent Patterns (Model Context Protocol)

Overview

The Model Context Protocol (MCP) provides a standardized way for AI agents to interact with external tools, data resources, and environments. This skill defines architectural patterns and implementation best practices for building, connecting, and optimizing MCP-based systems within the KILO-KIT ecosystem.

When To Use

  • Implementing custom MCP servers or clients.
  • Integrating external services (APIs, DBs, filesystems) as MCP servers.
  • Optimizing context windows when dealing with large tool catalogs.
  • Implementing real-time resource synchronization or complex multi-server orchestrations.
  • Security-critical integrations requiring isolated execution environments.

Core MCP Concepts

  • Tools: Executable functions exposed to the LLM.
  • Resources: Data sources that can be read by the LLM (e.g., file contents, database records).
  • Prompts: Reusable templates or workflows designed to be used by the LLM.
  • Sampling: A protocol allowing an MCP server to request the host client to perform LLM inference on its behalf, enabling agentic tool behavior.

Advanced Patterns

Dynamic Tool Catalog & Progressive Loading

To prevent token bloat:

  1. Manifest Exposure: Expose only essential, high-level tool definitions initially.
  2. On-Demand Loading: Load detailed JSON Schemas only when a tool is selected or explicitly requested by the agent context.

MCP Sampling Protocol

When a server needs LLM intelligence (e.g., parsing unstructured output or making a decision):

  • The server issues a sampling/createMessage request to the client.
  • The client acts as the host/gateway, maintaining control over the model selection and cost.

Resource Streaming & Subscriptions

  • Use URI Templates (res://server/type/{id}) to create flexible resource paths.
  • Implement Resource Subscriptions to push data updates from the server to the client without polling.

Eager vs Lazy Tool Registration

  • Eager: Best for small sets of essential core tools (zero-latency startup).
  • Lazy: Mandatory for large or dynamic catalogs to keep initial prompts lean.

Multi-Server Orchestration

  • Namespace Routing: Prefix tool names with server aliases (serverA:toolX).
  • Conflict Resolution: Implement a central router to handle collisions between tools of the same name across different servers.

Security Considerations

  • Server Sandboxing: Run MCP servers in isolated containers or limited-permission processes.
  • Credential Isolation: Inject sensitive environment variables (API keys, tokens) only into the specific server process that requires them. Use a secure configuration store (e.g., HashiCorp Vault) for production deployments.

Quality Gates

  • Contract Verification: Ensure MCP server implementations conform to the JSON-RPC message schema.
  • Context Hygiene: Verify that only relevant tools/resources are included in the prompt; prune dormant subscriptions.
  • Error Handling: Standardize error codes for common failures (e.g., timeout, auth denied, connection lost).

MCP 2.0 Features (2025-2026)

  • OAuth 2.0 Auth: Native support for delegated access without sharing long-lived keys.
  • Elicitation API: Interactive flow where the client helps the user provide missing inputs for a tool call.
  • Structured Tool Results: Formalized response types beyond simple strings (e.g., rich content types, UI components).

References

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

2d-games

무료

2D game development principles. Sprites, tilemaps, physics, camera.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

VoDaiLocz/kilo-kit-mcp282026년 9월 13일 업데이트

3d-games

무료

3D game development principles. Rendering, shaders, physics, cameras.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

VoDaiLocz/kilo-kit-mcp282026년 9월 13일 업데이트

aesthetic

무료

Create aesthetically beautiful interfaces following proven design principles. Use when building UI/UX, analyzing designs from inspiration sites, generating design images with ai-multimodal, implementing visual hierarchy and color theory, adding micro-interactions, or creating design documentation. Includes workflows for capturing and analyzing inspiration screenshots with chrome-devtools and ai-multimodal, iterative design image generation until aesthetic standards are met, and comprehensive design system guidance covering BEAUTIFUL (aesthetic principles), RIGHT (functionality/accessibility), SATISFYING (micro-interactions), and PEAK (storytelling) stages. Integrates with chrome-devtools, ai-multimodal, media-processing, ui-styling, and web-frameworks skills.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

VoDaiLocz/kilo-kit-mcp282026년 9월 13일 업데이트

Use when implementing or managing persistent, hierarchical memory systems for AI agents. Covers cross-session state, fact supersession, and self-managed memory tools to enable long-term recall and adaptive agent behavior.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

VoDaiLocz/kilo-kit-mcp282026년 9월 13일 업데이트

Use when monitoring, tracing, or debugging agentic workflows in production. Keywords: observability, tracing, OpenTelemetry, Langfuse, latency, token cost, loop detection, telemetry.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

VoDaiLocz/kilo-kit-mcp282026년 9월 13일 업데이트

Use when building self-correcting retrieval systems for AI agents. Keywords: RAG, retrieval, Corrective RAG, Self-RAG, query decomposition, reranking, hallucination, grounding.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

VoDaiLocz/kilo-kit-mcp282026년 9월 13일 업데이트

VoDaiLocz의 스킬 모두 보기

이 스킬의 문제 신고