콘텐츠로 이동

MCP로 Kiro 확장

이 모듈은 설정 지침에 따라 게임을 로컬로 이미 실행했다고 가정합니다.

이전 모듈에서 우리는:

이제 더 고급 사용 사례에 맞게 Kiro 자체를 사용자 정의하고 동작을 조정할 시간입니다. 이를 위해 Model Context Protocol(MCP)을 통해 Kiro에 몇 가지 새로운 기능을 추가할 것입니다.

1

MCP 서버 설정

Kiro에는 MCP 지원이 내장되어 있습니다. Kiro "유령" 탭을 클릭하고 목록에서 "MCP Servers"를 찾습니다. "+"를 클릭하여 MCP 서버 추가를 시작합니다.

alt !!alt

열린 mcp.json 파일의 내용을 수정합니다. 이 가이드는 전체적으로 Podman을 사용하고 있으므로 Podman을 사용하여 MCP 서버를 컨테이너로 실행할 것입니다. 이렇게 하면 MCP 서버를 호스트 머신에서 격리하는 데 도움이 됩니다:

json

{ "mcpServers": { "memory": { "enabled": true, "command": "podman", "args": [ "run", "-i", "--rm", "-v", "memories:/memories", "--env", "MEMORY_FILE_PATH=/memories/memory.json", "mcp/memory" ], "autoApprove": [ "create_entities", "create_relations", "add_observations", "delete_entities", "delete_observations", "delete_relations", "read_graph", "search_nodes", "open_nodes" ] }, "sequentialthinking": { "command": "podman", "args": [ "run", "-i", "--rm", "mcp/sequentialthinking" ], "autoApprove": [ "sequentialthinking" ] } } }

이 구성은 Kiro에 두 개의 새로운 MCP 서버를 추가합니다.

첫 번째 MCP 서버에는 장기 메모리를 추적하고 쿼리하기 위한 도구가 포함되어 있습니다. 메모리는 로컬 Podman 볼륨에 저장되므로 Kiro 세션 간에 지속될 수 있습니다. Kiro 외부에서 이러한 메모리를 재사용하거나 다른 외부 소스에서 생성된 메모리를 가져올 수도 있습니다.

두 번째 서버는 Kiro가 작업을 시작하기 전에 더 많은 시간을 계획하고 사고를 확장하는 데 도움이 됩니다.

2

Kiro에 메모리 추가

이제 새로운 MCP 서버 도구를 사용하도록 Kiro의 동작을 수정할 수 있습니다.

.kiro/steering/behavior.md에 파일을 만듭니다.

다음 내용을 파일에 넣습니다:

md

Each time you start working, put a `user_request` type entity into the knowledge graph using the `create_entities` tool. After you work, add observations to that entity about what you did, how many files you touched, how many lines, etc.

이제 Kiro에게 프로젝트에서 무언가를 하도록 요청합니다:

Rewrite the README.md as if it was written by a pirate.

alt !!alt

이제 후속 프롬프트를 사용하여 지식 그래프를 쿼리할 수 있습니다:

Search nodes for user_request and write me a commit message based on what you see

예시 출력:

md

docs: transform README.md with pirate-themed language - Rewrote entire README.md in pirate style - Added nautical references and pirate slang throughout - Maintained all original information and links - Changed section titles to pirate-appropriate terms - Added humorous pirate expressions and threats - Preserved functionality while enhancing user experience with thematic language

3

사고 동작 수정

.kiro/steering/behavior.md의 파일을 수정합니다.

다음 내용을 파일에 넣습니다:

md

When planning how to do something, use the sequentialthinking tool to plan the next several steps.

이제 채팅에 다음과 같이 물어보세요:

Let's do something super cool in this project

alt !!alt

4

더 많은 MCP 서버 찾기

이 모듈에서 추가 컨텍스트 소스, 도구 및 동작으로 Kiro를 확장하는 방법의 기본 사항을 배웠습니다. 사용 가능한 MCP 서버는 수없이 많으며 매력적인 방식으로 결합하여 프로젝트에서 작업할 수 있는 Kiro의 능력을 강화할 수 있습니다.

즐겁게 사용하세요!

결론으로 이동