MCP协议,全称 Model Context Protocol,是一套让 AI 模型与本地工具、数据源之间用统一格式对话的约定。它能做什么?简单说,你写一个 Python 函数,加上装饰器,AI 就能通过 JSON-RPC 2.0 消息调用它,拿到结构化结果后再转成自然语言回复。适合谁?适合需要把本地 ...
Framework-agnostic JSON-RPC 2.0 toolkit for Python. Use this package when you need a small Python JSON-RPC 2.0 client/server core that can be embedded directly or adapted to HTTP frameworks. It ...
如果你正在用 Python 写 Agent,大概率遇到过这种场景:本地写了一个查天气的函数,想让大模型调用它,结果要么是手写 JSON Schema 写到吐,要么是客户端 tools/list 返回空列表,要么是 tools/call 报 Method not found。这些问题的根源,往往不是模型不行,而是工具暴露 ...
JSON-RPC 提供 request ID、method、result/error 和 notification 的最小约定,适合 stdio 自动化。它不定义 Session 业务,因此 method schema 仍 ...
JSON-RPC is a type of Remote Procedure Call (RPC) that uses JSON as a protocol for exchanging messages between a client and a server. RPC(https://medium.com ...