Skip to content

Conversation

@peteski22
Copy link
Contributor

@peteski22 peteski22 commented Oct 17, 2025

Summary

  • Refactored mcpd-proxy to handle aggregation logic directly using mcpd HTTP API
  • Aggregates tools, resources, resource templates, and prompts from all servers
  • Uses server-level SDK APIs for individual server operations with health checking
  • Removed console logging to keep stderr clean for MCP stdio protocol
  • Bumps mcpd-proxy to v0.0.2 in preparation for a release.

Changes

Aggregation (mcpd-proxy responsibility):

  • Fetch and aggregate tools from all servers via mcpd API
  • Fetch and aggregate resources from all servers with mcpd:// URI scheme
  • Fetch and aggregate resource templates from all servers (new feature)
  • Fetch and aggregate prompts from all servers with server__prompt naming
  • Use Promise.allSettled for graceful handling of individual server failures

Server-level operations:

  • Parse namespaced names (server__item) and route to appropriate server
  • Call tools using server-level SDK: servers[serverName].callTool()
  • Generate prompts by parsing and calling mcpd API directly
  • Read resources by parsing mcpd:// URIs and calling mcpd API

Code quality:

  • Remove startup banner and console.error/warn calls (breaks MCP JSON-RPC)
  • Remove unnecessary try/catch blocks that just re-throw
  • Proper error handling with specific error types from SDK

@peteski22 peteski22 marked this pull request as ready for review October 20, 2025 14:46
@peteski22 peteski22 changed the title Refactor to use SDK methods and add resource templates support Move aggregation to mcpd-proxy and add resource templates support Oct 20, 2025
@peteski22 peteski22 requested a review from khaledosman October 20, 2025 15:55
* Simplified all MCP protocol handlers to use SDK client methods instead of manual fetch calls. This provides automatic health checking, 501 Not Implemented handling, concurrent requests, caching, and proper error handling.

* Added missing resource templates support via ListResourceTemplatesRequestSchema handler.

* Removed all console output to keep stderr clean for MCP stdio protocol. Removed unnecessary try/catch blocks that just re-throw errors.
* Bump to JS SDK v0.0.2
* Use mcpd-proxy version 0.0.2
* Fix generate prompt
* Update README
@peteski22 peteski22 force-pushed the peteski22/improve-handling-resources-prompts branch from 5566ce1 to dcef71a Compare October 21, 2025 14:58
@peteski22 peteski22 merged commit b2e4966 into main Oct 21, 2025
2 checks passed
@peteski22 peteski22 deleted the peteski22/improve-handling-resources-prompts branch October 21, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants