- Explore MCP Servers
- cdk-remotify-stdio-mcp
Cdk Remotify Stdio Mcp
What is Cdk Remotify Stdio Mcp
cdk-remotify-stdio-mcp is a CDK construct that allows users to easily convert local MCP servers that use STDIO transport into remote servers using Server-Sent Events (SSE). It automates the deployment of the necessary infrastructure to host the MCP server.
Use cases
Use cases include deploying time services, data processing applications, and any other MCP-based applications that need to be accessed remotely via SSE.
How to use
To use cdk-remotify-stdio-mcp, import the RemoteSTDIOMCP class and create an instance by specifying the MCP command you wish to run. The construct will handle the deployment of the required infrastructure, including ECS Fargate service and load balancer.
Key features
Key features include the ability to deploy a remote MCP server with minimal configuration, support for injecting existing AWS resources like VPCs and ECS clusters, and plans for future enhancements such as support for WebSocket and Streamable HTTP.
Where to use
cdk-remotify-stdio-mcp is suitable for cloud-based applications that require remote access to MCP servers, particularly in environments where Server-Sent Events are supported.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Cdk Remotify Stdio Mcp
cdk-remotify-stdio-mcp is a CDK construct that allows users to easily convert local MCP servers that use STDIO transport into remote servers using Server-Sent Events (SSE). It automates the deployment of the necessary infrastructure to host the MCP server.
Use cases
Use cases include deploying time services, data processing applications, and any other MCP-based applications that need to be accessed remotely via SSE.
How to use
To use cdk-remotify-stdio-mcp, import the RemoteSTDIOMCP class and create an instance by specifying the MCP command you wish to run. The construct will handle the deployment of the required infrastructure, including ECS Fargate service and load balancer.
Key features
Key features include the ability to deploy a remote MCP server with minimal configuration, support for injecting existing AWS resources like VPCs and ECS clusters, and plans for future enhancements such as support for WebSocket and Streamable HTTP.
Where to use
cdk-remotify-stdio-mcp is suitable for cloud-based applications that require remote access to MCP servers, particularly in environments where Server-Sent Events are supported.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
Remotify MCP
Easily convert local (STDIO transport) MCP servers to remote (sse for now) transport.
The flexible CDK construct allows you to deploy a remote MCP server that can be used by any MCP client supporting SSE (Server-Sent Events).
Simply specify the mcp command to run and the construct will spin up the necessary infrastructure to host it.
Video demo for usage in MCP clients
Usage
import { RemoteSTDIOMCP } from './remote-stdio-mcp';
const remoteTimeMCP = new RemoteSTDIOMCP(this, 'RemoteTimeMCP', {
mcpCommand: 'uvx mcp-server-time --local-timezone=Australia/Melbourne'
});
Architecture
Currently the construct deploys a ECSFargate service with a load balancer in front of it. The service runs a Docker container that executes the specified MCP command and serves the output over SSE.
Injecting Existing Resources
If no infrastructure is specified, the construct will create a new VPC, ECS cluster, and load balancer. However, you can also inject existing resources to avoid creating new ones.
- VPC: If you have an existing VPC, you can pass it to the construct to deploy the service within that VPC.
- Cluster: If you have an existing ECS cluster, you can pass it to the construct to deploy the service in that cluster.
interface RemoteSTDIOMCPProps {
vpc?: IVpc;
cluster?: Cluster;
}
Next steps
- Add support for more transports (e.g. WebSocket)
- Add support for Streamable HTTP
- Support hosting via Lambda (for simple commands) - this would allow for a more cost-effective solution for low-traffic commands.
- Provide a way to easily get HTTP(S) URLs for the deployed services (probably via hosting in API Gateway)
Useful commands
npm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testsnpx cdk deploy
deploy this stack to your default AWS account/regionnpx cdk diff
compare deployed stack with current statenpx cdk synth
emits the synthesized CloudFormation template
DevTools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.