DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to call existing MCP servers from your own app with TypeScript SDK

Use the client package to connect to an MCP server, list its tools and call them from TypeScript code.

Short answer: Install the client package with npm install @modelcontextprotocol/client, or bun add @modelcontextprotocol/client; then follow the README's Build your first client tutorial to connect to a server; List the server's tools, then call the ones your app needs. All steps.

Who it is forA developer building an agent or app that should reuse community MCP servers.

The problemWriting a custom integration for every service is slow when an MCP server already exists.

The outcomeA TypeScript client that discovers and calls the tools of any MCP server.

What you need first

  • Node.js with npm, or Bun or Deno as the README shows
  • The server package from `npm install @modelcontextprotocol/server`, or the client package from `npm install @modelcontextprotocol/client`
  • zod for tool input schemas, as in the README example

Steps

  1. Install the client package with npm install @modelcontextprotocol/client, or bun add @modelcontextprotocol/client
  2. Follow the README's Build your first client tutorial to connect to a server
  3. List the server's tools, then call the ones your app needs
  4. Use the runnable client and server pairs in examples/README.md as references

Prompt for your agent

Using modelcontextprotocol/typescript-sdk, install `npm install @modelcontextprotocol/client` and write a small script that connects to <my MCP server>, lists its tools and calls <tool name>.

Caveat. This README covers the v2 packages; the v1 legacy docs and fixes live on a separate branch.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for modelcontextprotocol/typescript-sdk and "Call existing MCP servers from your own app"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer