MCP Crash Course
@Ayyappa054
关于 MCP Crash Course
A practical demonstration of integrating LangChain with Model Control Protocol (MCP) featuring both single and multi-server implementations. Includes examples of mathematical computations and weather queries using async operations, React agents, and OpenAI integration. Perfect fo
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"langchain-mcp-examples": {
"command": "python",
"args": [
"-m",
"venv",
".venv"
]
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is MCP Crash Course?
A demonstration project showcasing integration of LangChain with Model Context Protocol (MCP) adapters. It implements a system that handles mathematical calculations and weather queries through separate MCP servers. Designed for developers learning MCP and LangChain.
How to use MCP Crash Course?
Clone the repository, create a Python virtual environment, install dependencies from requirements.txt, and add your OpenAI API key to a .env file. Then run python main.py for the single‑server example or python langchain_client.py for the multi‑server example.
Key features of MCP Crash Course
- Integrates LangChain with MCP adapters
- Multiple MCP servers (math and weather)
- Async operation support
- Environment variable configuration
- Both single‑server and multi‑server usage examples
Use cases of MCP Crash Course
- Learning how to integrate MCP with LangChain
- Demonstrating math and weather queries via separate MCP servers
- Prototyping multi‑server agent systems
- Teaching MCP stdio client and
MultiServerMCPClientusage - Reference for building custom MCP adapter examples
FAQ from MCP Crash Course
What are the runtime requirements?
Python 3.x and an OpenAI API key are required. Dependencies include langchain-core, langchain-openai, langchain-mcp-adapters, langgraph, python-dotenv, and mcp.
How do the two main scripts differ?
main.py uses a stdio client to connect to a single math server. langchain_client.py uses MultiServerMCPClient to manage both a math server and a weather server, allowing the agent to choose the appropriate tool.
Does MCP Crash Course require external services?
Yes. The LangChain agent uses OpenAI’s API, so a valid OPENAI_API_KEY must be set in the .env file.
What transport does the project use?
The single‑server example uses stdio client communication. The multi‑server example uses MCP’s MultiServerMCPClient, though the exact transport is not explicitly stated.
AI 与智能体 分类下的更多 MCP 服务器
Perplexity Ask MCP Server
ppl-aiThe official MCP server implementation for the Perplexity API Platform
1MCP - One MCP Server for All
1mcp-appA unified Model Context Protocol server implementation that aggregates multiple MCP servers into one.
LinkedIn MCP Server
stickerdanielOpen-source MCP server for LinkedIn. Give Claude and any MCP-compatible AI agent access to profiles, companies, jobs, and messages.
欢迎来到 智言平台
Shy2593666979AgentChat 是一个基于 LLM 的智能体交流平台,内置默认 Agent 并支持用户自定义 Agent。通过多轮对话和任务协作,Agent 可以理解并协助完成复杂任务。项目集成 LangChain、Function Call、MCP 协议、RAG、Memory、HITL、Skill、Milvus 和 ElasticSearch 等技术,实现高效的知识检索与工具调用,使用 FastAPI 构建高性能后端服务。
1Panel
1Panel-dev🔥 1Panel is a modern, open-source VPS control panel — and the only one with native AI agent support. Run Ollama models, deploy OpenClaw agents, and manage your entire server stack from one clean web interface.
评论