定义

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使用的更多相关文章

  1. The entity type <type> is not part of the model for the current context

    这是在网站里遇到的一个错误,自动生成的不能手动添加, reference: http://stackoverflow.com/questions/19695545/the-entity-type-xx ...

  2. CBOW and Skip-gram model

    转自:https://iksinc.wordpress.com/tag/continuous-bag-of-words-cbow/ 清晰易懂. Vector space model is well k ...

  3. Model的验证

    ModelValidator与ModelValidatorProvider ModelValidator public abstract class ModelValidator { public v ...

  4. UDP protocol

    Characteristics of the UDP protocol The UDP protocol (User Datagram Protocol) is a connectionless or ...

  5. HttpClient(4.3.5) - HTTP Protocol Interceptors

    The HTTP protocol interceptor is a routine that implements a specific aspect of the HTTP protocol. U ...

  6. C# 实体model验证输出

    新建Model实体: [Required(ErrorMessage = @"地址 1 为必填项!")] [StringLength(, ErrorMessage = @" ...

  7. httpcomponents-client-4.4.x

    Chapter 1. Fundamentals Prev     Next Chapter 1. Fundamentals 1.1. Request execution The most essent ...

  8. httpcomponents-client-ga(4.5)

    http://hc.apache.org/httpcomponents-client-ga/tutorial/html/   Chapter 1. Fundamentals Prev     Next ...

  9. httpcomponents-client-4.3.x DOC

    Chapter 1. Fundamentals Prev     Next Chapter 1. Fundamentals 1.1. Request execution The most essent ...

  10. NetCore WebSocket 即时通讯示例

    1.新建Netcore Web项目 2.创建简易通讯协议 public class MsgTemplate { public string SenderID { get; set; } public ...

随机推荐

  1. KKRT-PSI

    KKRT库:https://github.com/osu-crypto/BaRK-OPRF 文章:Efficient Batched Oblivious PRF with Applications t ...

  2. Codeforces Round 961 (Div. 2)

    题目链接:Codeforces Round 961 (Div. 2) 总结:B1wa两发可惜,C出得有点小慢. A. Diagonals fag:贪心 Description:给定一个\(n * n\ ...

  3. win10 linux子系统的一些想法

    什么是linux子系统 具体的概念网上很多,作为个技术人简单粗暴来说就是微软脑子瓦特,突然爱上了linux, 可以在win10安装linux子系统 子系统不同于虚拟机,但是其优点是安装很快,对于新手和 ...

  4. FastReport实现遍历Dataset数据集计算

    delphi在使用fastreport进行打印时,需要对数据进行计算求和. 在打印文本框的OnBeforePrint事件中进行以下代码即可实现效果 procedure Memo7OnBeforePri ...

  5. Q:jar包启动脚本备份

    jarServer.sh #!/bin/bash #APP_NAME必须配置. cd `dirname $0` cd .. DEPLOY_DIR=`pwd` APP_HOME=$DEPLOY_DIR/ ...

  6. Luogu P9180 [COCI2022-2023#5] Slastičarnica 题解 [ 蓝 ] [ 区间 dp ] [ dp 状态优化 ] [ 前缀和优化 ]

    Slastičarnica:非常好的区间 dp 题. 暴力 不难设计出暴力状态:\(dp_{q,i,j}\) 表示进行到第 \(q\) 次操作,剩下区间 \([i,j]\) 是否可行. 直到全部状态都 ...

  7. FreeSql学习笔记——6.修改

    前言   FreeSql 提供丰富的数据库更新功能,支持单条或批量更新,支持更新指定的字段,在特定的数据库执行还可以返回更新后的记录.与删除一样,没有条件的话不会执行,避免全表修改到全表:     指 ...

  8. 最小生成树可并行化的 Sollin(Boruvka)算法

    上期回顾:https://www.cnblogs.com/ofnoname/p/18715203 在前文中,我们剖析了最小生成树(MST)问题中的两大经典算法: Kruskal 以"边权平等 ...

  9. C#如何MeasureString、Graphics获取字符串的像素长度

    1. 当单元格展示的字符串需要自动换行的时候,使用GDI绘制文本信息,需要计算字符串文本的实际高度信息(需要固定宽度) 方法一:代码如下,会出现文本没有挤满当前行,但是文本实际高度已换行. priva ...

  10. Android高版本Service在后台一分钟被杀死

    最近公司出现了一个Bug,Service在后台写log时候一分钟左右被杀死,或者运行一会就被杀死了,上网搜了一下原来是Android高版本为了保护电量,流量什么的,会在后台杀死这些Service,现在 ...