Challenge10k · Discovery

MCP Server Springfield App - logbook

13 October 2025 6 h 6 h total
Czysty kod

6h of work on a custom MCP server: separate Node.js module, SDK configuration, five tools integrating PHP and GPT, and CLI tests.

Focus area
Node.js + MCP + automation
Mood
Curious builder
Tags
mcp nodejs typescript php ai

What we did

  1. Created the mcp-server/ directory as an independent Node.js module next to the PHP application.
  2. Configured the TypeScript environment with the MCP SDK (@modelcontextprotocol/sdk) and StdioServerTransport.
  3. Registered five tools in the PHPProjectServer class: read_php_file, write_php_file, list_php_files, generate_php_class, ask_gpt.
  4. Built (npx tsc) and launched (node build/index.js), verifying the log [MCP] Tools registered: ....
  5. Checked integration with Copilot MCP; lack of visible “Tools” GUI forced a pivot to CLI operation.
  6. Summarized the server’s potential as a base for future AI scaffolding in the Springfield-App project.

Schedule (6h)

Project modularization (1.5h)

  • Structured the mcp-server/ folder with its own package.json and TypeScript configuration.
  • Aligned compilation paths (src/, build/) and shared resources with the PHP application.
  • Updated team documentation on maintaining the module in the repository.

Tool implementation (2h)

  • Created the PHPProjectServer class and registered tools via server.registerTool(...).
  • Unified input/output interfaces for PHP file operations.
  • Added a layer for generating PHP classes with namespace, methods, and comments parameters.

CLI integration tests (1.5h)

  • Compiled TypeScript (npx tsc) and started the server (node build/index.js).
  • Validated tool registration logs and manual invocations via stdio.
  • Diagnosed Copilot MCP integration; “Tools” GUI inactive in the used extension version.

Retrospective and documentation (1h)

  • Gathered conclusions about MCP ecosystem readiness in VS Code.
  • Decided to maintain CLI + Codex workflow as the default.
  • Noted potential directions for expansion (scaffolding, code generation automations).

Results

  • Working MCP Server module compatible with the Springfield-App project.
  • Integrated set of tools operating on PHP code and supporting GPT.
  • Stable TypeScript build and launch commands available from the terminal.
  • Clear documentation of decisions regarding GUI vs CLI.

Conclusions

  • The MCP ecosystem in VS Code is still maturing; not all features are widely available.
  • CLI + Codex allow for faster iteration until full editor integration is implemented.
  • Separating the MCP module makes later automation of PHP app scaffolding easier.

Metrics

  • Net time: 6h
  • MCP tools: 5 active (read, write, list, generate, ask_gpt)
  • TypeScript build: approx. 3s on local machine
  • CLI events: 4 node build/index.js iterations during tests

Next steps

  1. Add unit tests for the generate_php_class tool.
  2. Prepare CLI scripts for task orchestration (e.g., npm run mcp:tool -- <name>).
  3. Monitor Copilot MCP updates and retry GUI integration. *