Model Context Protocol(MCP)在claude使用
定义
MCP通过统一的协议,使AI模型(如Claude、GPT等)能够动态调用外部工具(如数据库、API、本地文件等),并实现跨模型的上下文共享与协作
架构
客户端-服务器模型:
MCP主机(Host):如IDE或AI工具,负责发起请求。
MCP客户端(Client):作为中间通信层,转发请求至服务器。
MCP服务器(Server):轻量级服务,通过标准化协议暴露功能,支持本地或远程部署
claude上使用
在claude上打开settings
编辑配置
可以参考我的文件,配置在文件claude_desktop_config.json中,filesystem模块中将这段改成允许访问的文件目录“/Users/{your user name}/Desktop”
{
"mcpServers":
{
"filesystem":
{
"command": "npx",
"args":
[
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/{your user name}/Desktop"
]
},
"puppeteer":
{
"command": "npx",
"args":
[
"-y",
"@modelcontextprotocol/server-puppeteer"
]
},
"everything":
{
"command": "npx",
"args":
[
"-y",
"@modelcontextprotocol/server-everything"
]
}
}
}
编辑完保存,然后重启claude
配置完成
重启后可以看到有个数量,这里显示的就是claude可以使用的mcp工具
点击查看工具详情
重新打开settings>developer,可以看到之前配置的模块
最终效果
更多的工具配置
https://github.com/modelcontextprotocol/servers
Model Context Protocol(MCP)在claude使用的更多相关文章
- The entity type <type> is not part of the model for the current context
这是在网站里遇到的一个错误,自动生成的不能手动添加, reference: http://stackoverflow.com/questions/19695545/the-entity-type-xx ...
- CBOW and Skip-gram model
转自:https://iksinc.wordpress.com/tag/continuous-bag-of-words-cbow/ 清晰易懂. Vector space model is well k ...
- Model的验证
ModelValidator与ModelValidatorProvider ModelValidator public abstract class ModelValidator { public v ...
- UDP protocol
Characteristics of the UDP protocol The UDP protocol (User Datagram Protocol) is a connectionless or ...
- HttpClient(4.3.5) - HTTP Protocol Interceptors
The HTTP protocol interceptor is a routine that implements a specific aspect of the HTTP protocol. U ...
- C# 实体model验证输出
新建Model实体: [Required(ErrorMessage = @"地址 1 为必填项!")] [StringLength(, ErrorMessage = @" ...
- httpcomponents-client-4.4.x
Chapter 1. Fundamentals Prev Next Chapter 1. Fundamentals 1.1. Request execution The most essent ...
- httpcomponents-client-ga(4.5)
http://hc.apache.org/httpcomponents-client-ga/tutorial/html/ Chapter 1. Fundamentals Prev Next ...
- httpcomponents-client-4.3.x DOC
Chapter 1. Fundamentals Prev Next Chapter 1. Fundamentals 1.1. Request execution The most essent ...
- NetCore WebSocket 即时通讯示例
1.新建Netcore Web项目 2.创建简易通讯协议 public class MsgTemplate { public string SenderID { get; set; } public ...
随机推荐
- 隐私集合求交(PSI)-两方
在知乎上看到大佬写的关于论文:Efficient Batched Oblivious PRF with Applications to Private Set Intersection的讲解,循序渐进 ...
- Java线程的通信
当需要多个线程共同完成一件任务,而且需要有规律的执行,那么多个线程之间需要一定的通信机制,可以协调他们的工作,以此实现多线程共同操作一份数据. 1 等待唤醒机制 这是一种线程间的协作机制,与争夺锁的竞 ...
- C#从数据库中加载照片的
从数据库中读取人员照片信息并加载到图片控件的代码 string conn = "Server=192.168.xx.xx;Database=dbName;User ID=sa;passwor ...
- uni-app之条件编译
ifdef 仅出现在XXx平台上 仅出现在 App 平台下的代码 #ifdef APP-PLUS 需条件编译的代码 #endif <!-- 只在H5上有哈 --> <!-- #ifd ...
- Q:浏览器不能上网,但是可以ping通外网ip,dns配置也没问题(TCP/IP 无法建立传出连接)
问题症状 每隔一段时间,浏览器不能访问外网,重启电脑又正常,重置网卡无效 可以ping通外网ip地址,可以ping通外网域名 ping不通外网端口端口 查看日志 每次出现不能上网情况时都会有至少两条T ...
- Recent 做题记录(重写)
重构. 2023.9 CF922D 考虑交换法即可.Livshits-Kladov 定理. CF1528C 第一棵树上是一条链:第二棵树上使用数据结构维护贪心(小的区间比大的更优:树上具有包含/无交性 ...
- Linux安装nodejs npm
1.检查 whereis nodejs whereis npm 2.下载 wget -c https://npm.taobao.org/mirrors/node/v12.12.0/node-v12.1 ...
- FLink写入Clickhouse优化
一.背景 ck因为有合并文件操作,适合批量写入.如单条插入则速度太慢 二.Flink写入ck优化 改为分批插入,代码如下 DataStream<Row> stream = ... stre ...
- 三种方式从jdbc中获取数据库表字段信息
一.整体代码 1.method1:执行select语句获取,select * from dims where 1 = 2 2.method2:执行show create table获取,show cr ...
- nginx出现: [error] open() "/usr/local/nginx/logs/nginx.pid" failed错误
问题情况 登陆服务器之后进到nginx使用./nginx -s reload重新读取配置文件,发现报==nginx: [error] open() "/usr/local/nginx/log ...