1.0.4 • Published 8 months ago
@cloudmcp/connect v1.0.4
Connect for CloudMCP
@cloudmcp/connect helps connect to MCP SSE servers and proxy them to stdio
This is useful to connect to @cloudmcp/gateway
Features
- Connect to Model Context Protocol (MCP) SSE servers
- Proxy server responses to standard input/output
- Configurable logging levels
- Custom header support
- Support for authentication via client credentials
- Works with Claude Desktop
Installation
Using npm/npx
npx -y @cloudmcp/connect --url "https://gateway.cloudmcp.dev/<id>/sse" --clientId "<client_id>" --clientSecret "<client_secret>"Options
--url <url>: The CloudMCP Gateway URL in the formathttps://gateway.cloudmcp.dev/<id>/sse--clientId <client_id>: Your CloudMCP client ID for authentication--clientSecret <client_secret>: Your CloudMCP client secret for authentication--logLevel debug | info | warn | error | none: Controls logging level (default:info). Usenoneto suppress all logs.--header <header>: Add a header to all responses (format: "Header-Name: value"). Can be used multiple times.
Using with Claude Desktop
Claude Desktop can use @cloudmcp/connect to connect to CloudMCP Gateway.
NPX-based MCP Server Example
{
"mcpServers": {
"cloudmcpNpx": {
"command": "npx",
"args": [
"-y",
"@cloudmcp/connect",
"--url",
"https://gateway.cloudmcp.dev/<id>/sse",
"--clientId",
"<client_id>",
"--clientSecret",
"<client_secret>"
]
}
}
}Development
Prerequisites
- Node.js 18 or later
- pnpm 8.x
Setup
# Clone the repository
git clone https://github.com/cloudmcp/cloudmcp-connect.git
cd cloudmcp-connect
# Install dependencies
pnpm install
# Build the project
pnpm build
# Run tests
pnpm testAvailable Scripts
pnpm start- Run the built applicationpnpm build- Build the TypeScript projectpnpm dev- Run the application in development mode with hot reloadingpnpm clean- Clean the build directorypnpm test- Run testspnpm test:watch- Run tests in watch modepnpm test:coverage- Run tests with coverage reporting
Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin feature/my-new-feature - Submit a pull request
Make sure your code passes all tests and follows the project's coding style.
License
This project is licensed under the MIT License - see the LICENSE file for details.