使用说明
murl-MCP卷发器
一个类似curl的CLI 模型上下文协议(MCP) 服务器。使用类似REST的简单URL查询工具、资源和提示。
LLM友好: 紧凑的JSON输出、NDJSON流、stderr的结构化错误、语义退出代码。为代理从shell调用而构建。
安装
自制(推荐)
brew install turlockmike/murl/murl
点
pip install mcp-curl
外壳脚本
curl -sSL https://raw.githubusercontent.com/turlockmike/murl/master/install.sh | bash
要升级,请执行以下操作: brew upgrade turlockmike/murl/murl 或 murl --upgrade
快速开始
# List tools on a server (NDJSON output — one JSON object per line)
murl https://mcp.deepwiki.com/mcp/tools | jq -r '.name'
# Call a tool and extract the result
murl https://remote.mcpservers.org/fetch/mcp/tools/fetch -d url=https://example.com | jq -r '.text'
# Query a repo's wiki structure
murl https://mcp.deepwiki.com/mcp/tools/read_wiki_structure -d repoName=anthropics/claude-code | jq -r '.text'
公共演示服务器:
https://mcp.deepwiki.com/mcp--GitHub存储库文档https://remote.mcpservers.org/fetch/mcp--获取web内容
用法
murl <url> [options]
URL映射
| URL路径 | MCP方法 |
|---|---|
/tools |
tools/list |
/tools/<name> |
tools/call |
/resources |
resources/list |
/resources/<path> |
resources/read |
/prompts |
prompts/list |
/prompts/<name> |
prompts/get |
例子
# List tools
murl http://localhost:3000/tools
# Call a tool
murl http://localhost:3000/tools/echo -d message=hello
# Multiple arguments (auto type-coerced)
murl http://localhost:3000/tools/weather -d city=Paris -d metric=true
# JSON data
murl http://localhost:3000/tools/config -d '{"settings": {"theme": "dark"}}'
# Custom headers
murl http://localhost:3000/tools -H "Authorization: Bearer token123"
# Verbose mode (pretty-prints output, shows request debug info)
murl http://localhost:3000/tools -v
# Pipe NDJSON to jq
murl http://localhost:3000/tools | jq -r '.name'
选项
| 标志 | 描述 |
|---|---|
-d, --data |
添加键=值或JSON数据(可重复) |
-H, --header |
添加HTTP标头(可重复) |
-v, --verbose |
打印输出漂亮,显示请求调试信息 |
--login |
强制OAuth重新身份验证 |
--no-auth |
跳过所有身份验证 |
--version |
显示版本信息 |
--upgrade |
升级至最新版本 |
OAuth
murl通过动态客户端注册(RFC 7591)和PKCE支持OAuth 2.0。令牌会自动缓存。
# First call triggers browser-based OAuth flow
murl https://example.com/mcp/tools
# Skip auth for public servers
murl https://example.com/mcp/tools --no-auth
# Force re-authentication
murl https://example.com/mcp/tools --login
文档
需求
- Python 3.10+
许可证
麻省理工学院