Skip to content

Conversation

@fmontes
Copy link
Member

@fmontes fmontes commented Oct 3, 2025

This pull request updates the mcp-server to run as an HTTP server using Streamable HTTP transport, replacing the previous stdio-based approach. It introduces a new Express-based server implementation, updates environment variable handling (notably adding the PORT variable), and revises documentation and configuration examples to reflect these changes.

Core server architecture changes:

  • Replaced the StdioServerTransport with StreamableHTTPServerTransport and implemented an Express server that handles /mcp POST, GET (SSE), and DELETE requests for session-based communication. Sessions are managed via a session ID, and the server now supports multiple concurrent sessions. (core-web/apps/mcp-server/src/main.ts) [1] [2] [3]
  • Added new dependencies: express and @types/express to support the HTTP server. (core-web/apps/mcp-server/package.json)

Configuration and documentation updates:

  • Added documentation for the new PORT environment variable, defaulting to 3000, and updated all example configurations to include it. (core-web/apps/mcp-server/README.md) [1] [2] [3] [4] [5]
  • Updated usage instructions and examples to show how to start the server as an HTTP service and connect tools (like MCP Inspector and AI assistants) to http://localhost:3000/mcp instead of using stdio. (core-web/apps/mcp-server/README.md) [1] [2]

These changes modernize the MCP server, making it easier to integrate with clients and tools that communicate over HTTP, and improve session management and extensibility.

This PR fixes: #33430

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request modernizes the dotCMS MCP server by migrating from stdio-based communication to HTTP transport, enabling better integration with AI assistants like ChatGPT and web-based tools.

  • Replaced StdioServerTransport with StreamableHTTPServerTransport and implemented an Express-based HTTP server
  • Added session management capabilities to support multiple concurrent client connections
  • Updated environment configuration to include a PORT variable with documentation and examples

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
core-web/apps/mcp-server/src/main.ts Complete rewrite to implement HTTP server with Express, session management, and streamable transport
core-web/apps/mcp-server/package.json Added Express dependencies for HTTP server functionality
core-web/apps/mcp-server/README.md Updated documentation to reflect HTTP transport usage and added PORT environment variable

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TASK] Add support to ChatGPT to the dotCMS MCP server

2 participants