Mcp client example
@t-shiratori
关于 Mcp client example
This is a sample CLI chat application for an AI assistant using the Anthropic API in conjunction with an MCP client and MCP server.
基本信息
配置
工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is Mcp client example?
Mcp client example is a sample CLI chat application that demonstrates an AI assistant using the Anthropic API with an MCP client and an MCP server. It is intended for developers learning to integrate MCP with Anthropic’s API.
How to use Mcp client example?
Set up by running pnpm install, then configure a .env file with ANTHROPIC_API_KEY and MCP_SERVER_SCRIPT_PATH. Build with pnpm build and run with pnpm start. The app connects to an MCP server via stdio and enters a chat loop until the user types ‘quit’.
Key features of Mcp client example
- CLI chat interface using Anthropic API.
- Connects to an MCP server over stdio transport.
- Automatically calls MCP tools when the AI requires them.
- Includes a sequence diagram for the full interaction flow.
- References a public time‑tools MCP server as an example.
Use cases of Mcp client example
- Learning how to build an MCP client with the Anthropic API.
- Prototyping a tool‑calling AI assistant.
- Testing custom MCP servers in a chat environment.
- Demonstrating the client‑server‑API flow for presentations or documentation.
FAQ from Mcp client example
What dependencies does Mcp client example require?
It requires Node.js, the Anthropic API key, and an MCP server script path (set in a .env file). The project uses pnpm for package management.
How does the client interact with the MCP server?
The client connects to the MCP server via stdio, retrieves tool definitions, and calls tools when the Anthropic API response indicates a tool should be used.
Where does the user’s API key and configuration live?
The API key and MCP server script path are stored in a local .env file. No data is sent elsewhere unless the MCP server handles it.
AI 与智能体 分类下的更多 MCP 服务器
Model Context Protocol for Unreal Engine
chongdashuEnable AI assistant clients like Cursor, Windsurf and Claude Desktop to control Unreal Engine through natural language using the Model Context Protocol (MCP).
MCP Server - Remote MacOs Use
baryhuangThe only general AI agent that does NOT requires extra API key, giving you full control on your local and remote MacOs from Claude Desktop App
MCP Client for Ollama (ollmcp)
joniglHarness the power of local LLMs with this TUI MCP Client for Ollama. Featuring all core MCP primitives (tools, prompts, resources), agent mode, multi-server, model switching, streaming responses, human-in-the-loop, thinking mode, model params config, system prompts, and saved pre
1MCP - One MCP Server for All
1mcp-appA unified Model Context Protocol server implementation that aggregates multiple MCP servers into one.
欢迎来到 智言平台
Shy2593666979AgentChat 是一个基于 LLM 的智能体交流平台,内置默认 Agent 并支持用户自定义 Agent。通过多轮对话和任务协作,Agent 可以理解并协助完成复杂任务。项目集成 LangChain、Function Call、MCP 协议、RAG、Memory、HITL、Skill、Milvus 和 ElasticSearch 等技术,实现高效的知识检索与工具调用,使用 FastAPI 构建高性能后端服务。
评论