typescript-mcp-client MCP server
✓ 공식테스트 스위트 내에서 Model Context Protocol server와 상호작용하고 이를 검증할 수 있는 TypeScript 테스트 클라이언트를 제공합니다.
다른 이름 CodelyTV/typescript-mcp-client
- 스타
- 28
- Tools
- —
- 다운로드, 30일
- —
- 최신 버전
- —
- 마지막 커밋
- 2026년 4월 5일
- 라이선스
- GPL-3.0
typescript-mcp-client MCP란?
typescript-mcp-client은(는) MCP server입니다. 테스트 스위트 내에서 Model Context Protocol server와 상호작용하고 이를 검증할 수 있는 TypeScript 테스트 클라이언트를 제공합니다.
프로젝트 README에서 생성된 요약
typescript-mcp-client MCP server 정보
자동화된 테스트 스위트 내에서 Model Context Protocol server의 기능을 검증하는 것이 이 TypeScript 클라이언트의 주요 목적입니다. 개발자는 이 패키지를 테스트 워크플로에 통합하여 배포 전에 MCP server가 예상대로 동작하는지 확인할 수 있습니다.
사용자는 stdio 또는 http 전송 방식을 사용하여 McpClient를 초기화할 수 있습니다. stdio의 경우, npx 및 ts-node와 같은 명령 인수를 제공하여 server 프로세스를 실행합니다. 원격 연결의 경우 http 엔드포인트를 지정합니다. 클라이언트는 listTools, callTool, listResources, readResource를 포함하여 server와 상호작용하기 위한 특정 메서드를 제공합니다. 또한 listResourceTemplates, completeResourceTemplateParam, listPrompts, getPrompt와 같은 고급 상호작용도 지원합니다.
이 도구는 도구 호출, 리소스 액세스 및 프롬프트 검색을 프로그래밍 방식으로 검증해야 하는 MCP server 개발자를 위해 설계되었습니다. @codelytv/mcp-client 패키지를 사용하면 기존 TypeScript 테스트 환경 내에서 도구 이름, 리소스 URI 및 특정 도구 인수의 검증을 자동화할 수 있습니다.
활용 사례
- 1사용 가능한 server 도구 검증MCP server가 예상된 도구 이름을 클라이언트에 올바르게 노출하는지 확인합니다.
- 2특정 도구 실행 테스트특정 인수를 사용하여 도구를 실행하고 server가 올바른 응답을 반환하는지 확인합니다.
- 3리소스 접근성 검증server가 특정 리소스 URI를 나열하고 읽을 수 있는지 확인합니다.
- 4프롬프트 검색 테스트이름으로 요청했을 때 server가 올바른 프롬프트를 제공하는지 확인합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
README
GitHub에서 보기⬇️ Installation
npm install --save-dev @codelytv/mcp-client
💻 Usage
Basic Example
import { McpClient } from '@codelytv/mcp-client';
const mcpClient = new McpClient("stdio", [
"npx",
"ts-node",
"./src/app/mcp/server.ts",
]);
await mcpClient.connect();
// List available tools
const tools = await mcpClient.listTools();
console.log('Available tools:', tools.names());
// Call a tool
const response = await mcpClient.callTool('search-course-by-id', { id: 'course-123' });
// List resources
const resources = await mcpClient.listResources();
console.log('Available resources:', resources.uris());
// Read a resource
const resource = await mcpClient.readResource('courses://all');
await mcpClient.disconnect();
HTTP Transport
const mcpClient = new McpClient("http", ["http://localhost:3000/mcp"]);
🔡 API
McpClient
The main client class for interacting with MCP servers.
Constructor
new McpClient(transport: "stdio" | "http", args: string[])
Methods
connect()- Connect to the MCP serverdisconnect()- Disconnect from the MCP serverlistTools()- List available toolscallTool(name: string, args?: Record<string, unknown>)- Call a toollistResources()- List available resourcesreadResource(uri: string)- Read a resourcelistResourceTemplates()- List resource templatescompleteResourceTemplateParam(uri: string, paramName: string, textToComplete: string)- Complete resource template parameterslistPrompts()- List available promptsgetPrompt(name: string, args?: Record<string, unknown>)- Get a prompt
👌 Codely Code Quality Standards
Publishing this package we are committing ourselves to the following code quality standards:
- 🤝 Respect Semantic Versioning: No breaking changes in patch or minor versions
- 🤏 No surprises in transitive dependencies: Use the bare minimum dependencies needed to meet the purpose
- 🎯 One specific purpose to meet without having to carry a bunch of unnecessary other utilities
- ✅ Tests as documentation and usage examples
- 📖 Well documented ReadMe showing how to install and use
- ⚖️ License favoring Open Source and collaboration
⚖️ License
See LICENSE
typescript-mcp-client MCP 질문
클라이언트를 어떻게 설치하나요?
npm을 사용하여 다음 명령어로 설치할 수 있습니다: npm install --save-dev @codelytv/mcp-client
클라이언트가 지원하는 전송 프로토콜은 무엇인가요?
클라이언트는 stdio와 HTTP 전송 프로토콜을 모두 지원합니다.
MCP server에서 사용 가능한 도구 목록을 확인할 수 있나요?
네, listTools() 메서드를 사용하여 연결된 server에서 사용 가능한 도구를 가져올 수 있습니다.