A PHP sample implementation of an MCP (Model Context Protocol) server for retrieving time information.
Setup
Choose your client, copy the config, then fill in any required environment variables.
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"
]
}
}
}