MCP Runbook Search Server
MCP Runbook 검색 서버
내부 엔지니어링 런북 집합에 대한 의미론적 검색을 도구로 노출하는 Model Context Protocol(MCP) 서버입니다. Claude Desktop, MCP 호환 IDE 또는 커스텀 에이전트가 "데이터베이스 장애 조치를 어떻게 처리하나요?"라고 물으면 누군가 위키를 검색하는 대신 올바른 런북을 돌려받을 수 있습니다.
개요
MCP는 LLM 클라이언트가 별도의 서버 프로세스에서 노출하는 도구를 stdio 또는 HTTP를 통해 발견하고 호출하는 방식을 표준화합니다. 이 서버는 해당 프로토콜의 서버 측을 구체적이고 현실적인 사용 사례, 즉 내부 지식 기반(런북, 사후 분석, 플레이북)을 클라이언트별 커스텀 통합을 작성하지 않고도 모든 MCP 클라이언트가 쿼리할 수 있도록 만드는 사례에 맞춰 구현합니다.
서버는 세 가지 도구를 노출합니다:
search_runbooks(query, top_k)— 런북 코퍼스에 대한 의미론적 검색, 코사인 유사도 기준으로 순위가 매겨집니다.get_runbook(doc_id)— ID로 런북 하나의 전체 텍스트를 가져옵니다.list_runbooks()— 인덱싱된 모든 런북의 ID와 제목을 나열합니다.
주요 기능
실제 MCP 프로토콜, 목업이 아님 — 공식
mcpPython SDK의FastMCP서버를 기반으로 구축되었으며, stdio를 통해 연결되는 실제ClientSession으로 종단 간 검증되었습니다(아래 샘플 실행 참조). 단순히 내부 함수의 유닛 테스트가 아닙니다.의존성 없는 의미론적 검색 — 해싱 임베더가 각 문서를 외부 모델, API 키 또는 네트워크 호출 없이 고정 크기 벡터로 변환하므로 서버가 완전히 오프라인으로 실행됩니다. 해당 벡터에 대한 코사인 유사도는 단순한 키워드 일치가 아닌 의미를 기준으로 결과의 순위를 매깁니다.
전송 계층에서 분리된 도구 로직 —
src/tools.py는Corpus에 대한 일반 함수를 보유하며 독립적으로 유닛 테스트됩니다.src/server.py는 해당 함수를 MCP 도구 데코레이터에 연결만 합니다. stdio를 HTTP 전송으로 바꾸거나 코퍼스를 실제 문서 저장소로 교체해도 도구 로직에는 영향을 미치지 않습니다.명확한 오류 처리 — 알 수 없는 ID에 대한
get_runbook은 예외를 발생시키는 대신 구조화된{"error": ...}페이로드를 반환하므로 클라이언트는 어떤 경우든 실행 가능한 응답을 받습니다.
아키텍처
MCP client (Claude Desktop, IDE, custom agent)
│ stdio / JSON-RPC
▼
FastMCP server (src/server.py)
│ registers tools
▼
tools.py ──▶ Corpus (src/corpus.py)
│
▼
hashing embedder + cosine similarity
│
▼
5 sample engineering runbooks기술 스택
계층 | 도구 |
언어 | Python |
프로토콜 | Model Context Protocol( |
검색 | 의존성 없는 해싱 임베더 + 코사인 유사도 |
CI/CD | GitHub Actions |
프로젝트 구조
.
├── src/
│ ├── corpus.py # Hashing embedder, Corpus, sample runbook documents
│ ├── tools.py # Pure tool functions (search / get / list)
│ └── server.py # FastMCP server wiring tools.py into MCP tool decorators
├── tests/
│ ├── test_corpus.py
│ └── test_tools.py
├── .github/workflows/ci.yml
├── Dockerfile
├── requirements.txt
└── README.md시작하기
사전 요구 사항
Python 3.10+
설치
git clone https://github.com/deekshu05/mcp-document-search-server.git
cd mcp-document-search-server
pip install -r requirements.txt서버 실행
python -m src.server이렇게 하면 MCP 클라이언트가 연결되기를 기다리며 서버가 stdio에서 시작됩니다.
Claude Desktop에서 연결
claude_desktop_config.json에 다음을 추가하세요:
{
"mcpServers": {
"runbook-search": {
"command": "python",
"args": ["-m", "src.server"],
"cwd": "/path/to/mcp-document-search-server"
}
}
}Claude Desktop을 다시 시작하면 search_runbooks, get_runbook, list_runbooks가 Claude가 대화에서 직접 호출할 수 있는 도구가 됩니다.
Docker로 실행
docker build -t mcp-runbook-server .
docker run -i mcp-runbook-server샘플 실행
stdio를 통해 이 서버에 연결하여 도구를 호출하는 Python MCP 클라이언트의 실제 출력입니다. 시뮬레이션된 트랜스크립트가 아닙니다:
Tools exposed: ['search_runbooks', 'get_runbook', 'list_runbooks']
search_runbooks('the primary database node is not responding'):
{
"doc_id": "rb-001",
"title": "Database failover procedure",
"snippet": "Database failover procedure. When the primary Postgres node becomes
unresponsive, promote the standby replica using the orchestrator's promote
command, update the connection endpoint in the service config map, and verify",
"score": 0.439
}
{
"doc_id": "rb-003",
"title": "Deploy rollback procedure",
"snippet": "Deploy rollback procedure. If error rates exceed the alert
threshold within ten minutes of a deploy, trigger the automated rollback to
the previous stable image tag, confirm the health checks pass on all
replicas, and po",
"score": 0.3208
}
get_runbook('rb-001'):
{
"doc_id": "rb-001",
"title": "Database failover procedure",
"text": "Database failover procedure. When the primary Postgres node becomes
unresponsive, promote the standby replica using the orchestrator's promote
command, update the connection endpoint in the service config map, and
verify replication lag has dropped to zero on the new primary before
resuming writes. Page the on-call DBA if promotion does not complete within
five minutes."
}쿼리는 "Postgres"나 "failover"를 이름으로 언급하지 않습니다. 증상에 대한 평범한 설명일 뿐인데도 검색은 키워드 일치가 아닌 의미를 기준으로 올바른 런북을 1순위로, 실제로 다음으로 관련성이 높은 런북(롤백 절차)을 2순위로 정확히 배치합니다.
영향
이와 같은 패턴은 이전에 누군가 어떤 위키 페이지를 검색해야 하는지 알고 있어야 했던 내부 지식 기반을, 모든 MCP 호환 AI 어시스턴트가 직접 쿼리하고 인용할 수 있는 것으로 바꿔줍니다. "인시던트가 시작되는 시점"과 "올바른 런북이 대응자 앞에 도착하는 시점" 사이의 시간을 단축합니다.
로드맵
더 큰 코퍼스에 대해 실행할 때 해싱 임베더를 실제 임베딩 모델로 교체
원격 MCP 클라이언트를 위한 stdio와 함께 스트리밍 가능한 HTTP 전송
서버를 재시작하지 않고 새 런북을 추가할 수 있는 쓰기 통과 인덱싱
서로 다른 MCP 클라이언트가 코퍼스의 서로 다른 하위 집합을 볼 수 있도록 하는 인증 범위 지정
라이선스
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Knowledge coverage map and health score. Ingest docs into a governed knowledge graph via MCP.
Read-only MCP connector serving the Run It on AI book; index and Implementation Blocks are free.
Query any docs site via MCP. Submit a URL, ask questions, get cited answers.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/deekshu05/mcp-document-search-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server