Stratagem.php 快速开始指南
环境要求
- PHP >= 8.0
- 建议开启
curl、dom、libxml扩展(部分网络锦囊需要)
安装步骤
git clone https://github.com/linkerlin/stratagem.php.git
cd stratagem.php
chmod +x bin/stratagem-server.php
启动服务器
# Stdio 模式(默认)
php bin/stratagem-server.php
# SSE 模式
php bin/stratagem-server.php --transport=sse
# HTTP 模式
php bin/stratagem-server.php --transport=http
配置 Claude Desktop
编辑配置文件(通常位于 %APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"stratagem": {
"command": "php",
"args": ["/path/to/stratagem.php/bin/stratagem-server.php"]
}
}
}
其他客户端配置
- Gemini CLI:
mcp_config_stdio add --name "stratagem" --command "php" --args "/path/to/stratagem.php/bin/stratagem-server.php" - Cursor:Settings > Features > MCP > Add New MCP Server
- Opencode:设置 > MCP Stdio 配置
运行演示
php examples/mcp_server_demo.php
运行测试
php tests/Unit/MCPServerEnhancementTest.php
来源:Stratagem.php README
登录后可参与表态
讨论回复
0 条回复还没有人回复,快来发表你的看法吧!
推荐
推荐
智谱 GLM-5 已上线
我正在智谱大模型开放平台 BigModel.cn 上打造 AI 应用,智谱新一代旗舰模型 GLM-5 已上线,在推理、代码、智能体综合能力达到开源模型 SOTA 水平。
领取 2000万 Tokens
通过邀请链接注册即可获得大礼包,期待和你一起在 BigModel 上畅享卓越模型能力