Integrations
Enables configuration of the MCP server through environment variables, supporting settings for port configuration, environment mode, and OAuth settings.
Provides the HTTP transport layer for the MCP server, allowing it to serve MCP resources, tools, and prompts over a RESTful API interface.
Serves as the runtime environment for the MCP server, enabling both HTTP and stdio transport options.
MCP 서버 보일러플레이트
TypeScript와 Express로 구축된 모델 컨텍스트 프로토콜(MCP)을 위한 보일러플레이트 서버 구현입니다.
목차
개요
이 프로젝트는 애플리케이션이 표준화된 방식으로 LLM에 대한 컨텍스트를 제공할 수 있도록 하는 모델 컨텍스트 프로토콜(MCP)을 따르는 서버를 구현합니다. 여기에는 다음이 포함됩니다.
- HTTP 및 stdio 전송 옵션이 포함된 완전히 구성된 MCP 서버
- 주요 기능을 보여주는 샘플 리소스, 도구 및 프롬프트
- 유형 안전성 및 더 나은 개발자 경험을 위한 TypeScript 지원
- HTTP 전송 계층을 위한 Express 통합
프로젝트 구조
지엑스피1
시작하기
필수 조건
- Node.js(v18 이상)
- npm 또는 yarn
설치
저장소를 복제하고 종속성을 설치합니다.
환경 변수
예제 환경 파일을 복사하고 필요에 따라 수정합니다.
사용 가능한 환경 변수:
PORT
: HTTP 서버의 포트(기본값: 3000)NODE_ENV
: 환경 모드(개발, 프로덕션)- OAuth 설정(필요한 경우)
서버 실행
HTTP 서버
HTTP 서버를 빌드하고 시작합니다.
자동 재시작을 통한 개발의 경우:
서버는 http://localhost:3000/mcp
(또는 .env 파일에 지정된 포트)에서 사용할 수 있습니다.
표준 모드
stdio 모드에서 서버를 실행하려면(명령줄 도구의 경우):
자동 재시작을 통한 개발의 경우:
자원
보일러플레이트에는 다음과 같은 예시 리소스가 포함되어 있습니다.
- 정적 정보 리소스 :
info://server
- 서버에 대한 기본 정보를 제공합니다
- 동적 인사말 리소스 :
greeting://{name}
- 제공된 이름 매개변수로 개인화된 인사말을 생성합니다.
리소스에 액세스하려면:
- MCP 프로토콜을 통해
- MCP 클라이언트 라이브러리 사용
도구
보일러플레이트에는 다음과 같은 도구 예제가 포함되어 있습니다.
- 계산기 : 기본적인 산술 연산을 수행합니다.
- 매개변수:
operation
: 수행할 연산(더하기, 빼기, 곱하기, 나누기)a
: 첫 번째 숫자b
: 두 번째 숫자
- 매개변수:
- 타임스탬프 : 다양한 형식으로 현재 시간을 제공합니다
- 매개변수:
format
: 출력 형식(iso, unix, readable)
- 매개변수:
프롬프트
보일러플레이트에는 다음과 같은 예시 프롬프트가 포함되어 있습니다.
- 인사말 : 개인화된 인사말 메시지를 생성합니다.
- 매개변수:
name
: 인사할 이름formal
: 공식적인 인사말 스타일을 사용할지 여부(선택 사항)
- 매개변수:
- 데이터 분석 : 데이터 분석을 위한 프롬프트를 생성합니다.
- 매개변수:
data
: 분석할 데이터format
: 데이터 형식(json, csv, text)instructions
: 추가 분석 지침(선택 사항)
- 매개변수:
서버 확장
리소스 추가
새로운 리소스를 추가하려면:
src/resources/
에 새 파일을 만듭니다(예:myResource.ts
).- 리소스 핸들러를 구현하세요
src/resources/index.ts
에 등록하세요
예:
도구 추가
새로운 도구를 추가하려면:
src/tools/
에 새 파일을 만듭니다(예:myTool.ts
).- 도구 핸들러를 구현하세요
src/tools/index.ts
에 등록하세요
예:
프롬프트 추가
새로운 프롬프트를 추가하려면:
src/prompts/
에 새 파일을 만듭니다(예:myPrompt.ts
).- 프롬프트 핸들러를 구현하세요
src/prompts/index.ts
에 등록하세요
예:
테스트 및 디버깅
MCP 서버를 테스트하려면 다음을 사용할 수 있습니다.
- MCP 검사기 도구
- MCP 클라이언트 라이브러리
- 직접 HTTP 요청(디버깅용)
특허
이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
샘플 리소스, 도구 및 프롬프트를 통해 애플리케이션이 LLM에 대한 표준화된 컨텍스트를 제공할 수 있도록 하는 모델 컨텍스트 프로토콜(MCP) 서버의 즉시 사용 가능한 스타터 구현입니다.
Related MCP Servers
- AsecurityAlicenseAqualityA beginner-friendly Model Context Protocol (MCP) server that helps users understand MCP concepts, provides interactive examples, and lists available MCP servers. This server is designed to be a helpful companion for developers working with MCP. Also comes with a huge list of servers you can install.Last updated -3936JavaScriptApache 2.0
- AsecurityAlicenseAqualityAn educational implementation of a Model Context Protocol server that demonstrates how to build a functional MCP server for integrating with various LLM clients like Claude Desktop.Last updated -188PythonMIT License
- -security-license-qualityA specialized server that helps users create new Model Context Protocol (MCP) servers by providing tools and templates for scaffolding projects with various capabilities.Last updated -1TypeScript
- -securityAlicense-qualityA Model Context Protocol (MCP) server implementation that enables LLMs to interact with the Osmosis protocol, allowing for querying and transaction functionality through natural language.Last updated -9TypeScriptMIT License