本项目提供了模型上下文协议相关的工具和服务,帮助用户通过自然语言与系统进行交互,实现文件操作、网页内容处理、系统命令执行等功能。
- mcp/
- clients/
- mcp-client/
- langchain_mcp_client_wconfig.py
- theailanguage_config.json
- .env
- servers/
- terminal_server/
- memory_server/
git clone https://github.com/Techiral/mcp.git
cd mcp
python -m venv venv
# Linux/Mac:
source venv/bin/activate
# Windows:
.\venv\Scripts\activate
pip install -r requirements.txt
echo "GOOGLE_API_KEY=your_key_here" > clients/mcp-client/.env
echo "THEAILANGUAGE_CONFIG=clients/mcp-client/theailanguage_config.json" >> clients/mcp-client/.env
npm install -g @modelcontextprotocol/server-memory @modelcontextprotocol/server-filesystem
python clients/mcp-client/langchain_mcp_client_wconfig.py
创建名为 example.txt 的文件
搜索所有 Python 文件中的 "function"
计算 main.py 中的行数
总结 https://example.com
提取新闻站点的头条新闻
列出当前目录中的文件
检查 Python 版本
运行 git status
记住我的最爱颜色是蓝色
显示设置的偏好设置
显示最近的命令
theailanguage_config.json:主要服务器配置文件.env:环境变量文件{
"terminal_server": {
"command": "uv",
"args": ["run", "servers/terminal_server/terminal_server.py"]
},
"memory": {
"command": "npx.cmd",
"args": ["@modelcontextprotocol/server-memory"],
"port": 3000
}
}
网络连接问题:
依赖项未安装:
配置文件错误:
git checkout -b feature/new-feature
git add .
git commit -m "添加新功能"
git push origin feature/new-feature
创建问题报告:
提交 Pull Request:
POST /api/v1/model_context HTTP/1.1
Content-Type: application/json
{
"model_id": "gpt-3",
"context": {
"user_input": "如何使用Python?"
}
}
| 属性 | 详情 |
|---|---|
| 英文术语 | 中文翻译 |
| Model Context Protocol | 模型上下文协议 |
| Natural Language Processing | 自然语言处理 |
| Machine Learning | 机器学习 |
感谢使用模型上下文指南!如需更多信息,请访问我们的文档页面。