A PHP sample implementation of an MCP (Model Context Protocol) server for retrieving time information.
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
claude mcp add time-server-by-php -- npx @modelcontextprotocol/inspector ./bin/time-server~/.codex/config.toml
[mcp_servers.time-server-by-php]
command = "npx"
args = ["@modelcontextprotocol/inspector", "./bin/time-server"]
# codex mcp add time-server-by-php -- npx @modelcontextprotocol/inspector ./bin/time-server~/.cursor/mcp.json
{
"mcpServers": {
"time-server-by-php": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector",
"./bin/time-server"
]
}
}
}.vscode/mcp.json
{
"servers": {
"time-server-by-php": {
"type": "stdio",
"command": "npx",
"args": [
"@modelcontextprotocol/inspector",
"./bin/time-server"
]
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"time-server-by-php": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector",
"./bin/time-server"
]
}
}
}claude_desktop_config.json
{
"mcpServers": {
"time-server-by-php": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector",
"./bin/time-server"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"time-server-by-php": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector",
"./bin/time-server"
]
}
}
}