Files
mcpedia/apps/mcp-client/package.json
T
asepharyana ec0abfbd60
CI / typecheck + build (turbo) (push) Canceled after 0s
feat(mcp-client): MCP client CLI for interacting with MCPedia server
New app: apps/mcp-client/ (bun workspace package)

Interactive REPL (bun run chat):
- Connects to MCP server via Streamable HTTP transport
- Tools: /tools, /resources, /search, /ss (semantic), /hybrid,
  /doc, /related, /create (interactive prompts), /update, /delete,
  /index, /queue_status, /help, /quit
- Sends x-webhook-secret header for write tools

One-shot CLI (bun run ask):
- ask <command> [args] — list tools, search, get doc, create, delete, etc.

API client wrapper (src/client.ts):
- McpediaClient class with typed methods for all 13 MCP tools + 5 resources
- StreamableHTTPClientTransport with custom headers (auth)
- Graceful disconnect

Tests (7, all green, no network/DB):
- listTools, getDocument, createDocument, deleteDocument, listResources,
  readResource, header-passing

Deps: @modelcontextprotocol/sdk ^1.29.0, zod ^4.0.0, github-slugger (for web TOC)
2026-08-20 17:57:58 +07:00

27 lines
602 B
JSON

{
"name": "@mcpedia/mcp-client",
"version": "0.1.0",
"private": true,
"type": "module",
"bin": {
"mcpedia-mcp-client": "./src/index.ts"
},
"scripts": {
"start": "bun run src/index.ts",
"chat": "bun run src/index.ts",
"ask": "bun run src/ask.ts",
"lint": "bun run lint",
"typecheck": "tsc --noEmit",
"build": "bun build src/index.ts --outdir=dist --format=esm",
"test": "bun test"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.29.0",
"zod": "^4.0.0"
},
"devDependencies": {
"@types/node": "^20",
"typescript": "^5.6.0"
}
}