vielhuber/codemcp 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

vielhuber/codemcp

Composer 安装命令:

composer require vielhuber/codemcp

包简介

MCP-capable PHP orchestrator for agentic coding via Codex and Claude Code.

README 文档

README

GitHub Tag Code Style License Last Commit PHP Version Support Packagist Downloads

📟 codemcp 📟

codemcp is a small mcp server that exposes agentic coding through codex and claude code. it does not reimplement a coding agent, it forwards normalized MCP tools to the closest official agent interface:

  • Codex via codex mcp-server
  • Claude Code via claude -p / claude --resume

installation

install once with composer:

composer require vielhuber/codemcp

then add this to your files:

require __DIR__ . '/vendor/autoload.php';
use vielhuber\codemcp\codemcp;

setup

codemcp reads configuration from the .env in your project root.

CODEMCP_PROVIDER=codex
CODEMCP_WORKDIR=/app
CODEMCP_ALLOW_WRITE=false

MCP_TOKEN=

Claude Code also has claude mcp serve, but that exposes Claude Code's tools to another MCP client. For running Claude Code as the coding agent, codemcp uses print/resume mode.

codemcp expects codex and claude in the local node_modules/.bin directory of the project where the MCP server is started.

usage

$code = codemcp::create();

$result = $code->start(
    prompt: 'Review this project and list the highest-risk bugs.',
    workdir: '/app',
    provider: 'codex'
);

print_r($result);

mcp server

codemcp ships as a standalone MCP server:

vendor/bin/mcp-server.php

available tools:

  • start(prompt, workdir?, provider?)
  • continue(session_id, prompt)
  • status(session_id?)
  • providers()

write access

Set CODEMCP_ALLOW_WRITE=true when the agent may edit files. Otherwise Codex runs read-only and Claude Code runs in plan mode.

tests

vendor/bin/phpunit

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固