@@ -45,8 +45,6 @@ mcpify/
4545│ ├── backend.py # Backend adapters
4646│ ├── detect.py # API detection engine
4747│ └── validate.py # Configuration validation
48- ├── bin/ # Standalone executables
49- │ └── mcp-serve # Independent server script
5048├── examples/ # Example projects
5149├── docs/ # Documentation
5250│ └── usage.md # Detailed usage guide
@@ -77,17 +75,19 @@ This validates the generated configuration and shows any warnings or errors.
7775MCPify provides multiple ways to start MCP servers:
7876
7977``` bash
80- # Method 1: Using mcpify CLI
78+ # Method 1: Using mcpify CLI (recommended)
8179mcpify serve config.json
8280
83- # Method 2: Using standalone mcp-serve script (recommended for MCP clients)
84- ./bin/mcp-serve config.json
85-
86- # Method 3: Direct module invocation
81+ # Method 2: Direct module invocation
8782python -m mcpify serve config.json
8883
8984# HTTP mode for web integration
90- ./bin/mcp-serve config.json --mode streamable-http --port 8080
85+ mcpify serve config.json --mode streamable-http --port 8080
86+
87+ # Example with provided configurations
88+ mcpify serve examples/python-server-project/server.json
89+ mcpify serve examples/python-server-project/server.json --mode streamable-http --port 8888
90+ mcpify serve examples/python-cmd-tool/cmd-tool.json
9191```
9292
9393## 🎯 Usage Scenarios
@@ -103,14 +103,14 @@ mcpify serve my-project.json
103103### For MCP Clients (Server Integration)
104104``` bash
105105# MCP clients can start servers directly
106- ./bin/mcp- serve config.json # stdio mode
107- ./bin/mcp- serve config.json --mode streamable-http # HTTP mode
106+ mcpify serve config.json # stdio mode
107+ mcpify serve config.json --mode streamable-http # HTTP mode
108108```
109109
110110### For Production Deployment
111111``` bash
112112# Deploy as HTTP server
113- ./bin/mcp- serve config.json --mode streamable-http --host 0.0.0.0 --port 8080
113+ mcpify serve config.json --mode streamable-http --host 0.0.0.0 --port 8080
114114```
115115
116116## 📋 Backend Types & Examples
@@ -215,18 +215,85 @@ mcpify serve my-project.json
215215- Automatic type detection from source code
216216- Custom validation rules
217217
218+ ## ⚙️ Server Configuration
219+
220+ ### Command Line Options
221+
222+ ``` bash
223+ # Basic usage
224+ mcpify serve config.json
225+
226+ # Specify server mode
227+ mcpify serve config.json --mode stdio # Default mode
228+ mcpify serve config.json --mode streamable-http # HTTP mode
229+
230+ # Configure host and port (HTTP mode only)
231+ mcpify serve config.json --mode streamable-http --host localhost --port 8080
232+ mcpify serve config.json --mode streamable-http --host 0.0.0.0 --port 9999
233+
234+ # Real examples with provided configurations
235+ mcpify serve examples/python-server-project/server.json
236+ mcpify serve examples/python-server-project/server.json --mode streamable-http --port 8888
237+ mcpify serve examples/python-cmd-tool/cmd-tool.json --mode stdio
238+ ```
239+
240+ ### Server Modes Explained
241+
242+ #### STDIO Mode (Default)
243+ - Uses standard input/output for communication
244+ - Best for local MCP clients and development
245+ - No network configuration needed
246+
247+ ``` bash
248+ mcpify serve config.json
249+ # or explicitly
250+ mcpify serve config.json --mode stdio
251+ ```
252+
253+ #### Streamable HTTP Mode
254+ - Uses HTTP with Server-Sent Events
255+ - Best for web integration and remote clients
256+ - Requires host and port configuration
257+
258+ ``` bash
259+ # Local development
260+ mcpify serve config.json --mode streamable-http --port 8080
261+
262+ # Production deployment
263+ mcpify serve config.json --mode streamable-http --host 0.0.0.0 --port 8080
264+ ```
265+
266+ ### Environment Integration
267+
268+ #### For MCP Clients
269+ ``` bash
270+ # Claude Desktop or other MCP clients can invoke:
271+ mcpify serve your-config.json
272+ ```
273+
274+ #### For Web Applications
275+ ``` bash
276+ # Start HTTP server for web integration
277+ mcpify serve your-config.json --mode streamable-http --port 8080
278+ # Then connect from web clients to http://localhost:8080
279+ ```
280+
218281## 📁 Examples
219282
220283Explore the ` examples/ ` directory for ready-to-use configurations:
221284
222285``` bash
223286# View example configurations
224- mcpify view examples/fastapi-example.json
225- mcpify view examples/python-module-example.json
226- mcpify view examples/commandline-example.json
287+ mcpify view examples/python-server-project/server.json
288+ mcpify view examples/python-cmd-tool/cmd-tool.json
227289
228- # Test with examples
229- ./bin/mcp-serve examples/fastapi-example.json
290+ # Test with examples - STDIO mode (default)
291+ mcpify serve examples/python-server-project/server.json
292+ mcpify serve examples/python-cmd-tool/cmd-tool.json
293+
294+ # Test with examples - HTTP mode
295+ mcpify serve examples/python-server-project/server.json --mode streamable-http --port 8888
296+ mcpify serve examples/python-cmd-tool/cmd-tool.json --mode streamable-http --port 9999
230297```
231298
232299## 🧪 Development
@@ -261,27 +328,19 @@ mcpify validate <config_file> # Validate configuration
261328mcpify serve < config_file> [--mode < mode> ] # Start server
262329```
263330
264- #### MCP Server Commands
265- ``` bash
266- ./bin/mcp-serve < config_file> # Start stdio server
267- ./bin/mcp-serve < config_file> --mode streamable-http # Start HTTP server
268- ./bin/mcp-serve < config_file> --host < host> --port < port> # Custom host/port
269- ```
270-
271331## 🚀 Deployment Options
272332
273333### 1. Package Installation
274334``` bash
275335pip install mcpify
276- # Use mcpify for development, copy bin/mcp- serve for production
336+ # Use mcpify serve for all scenarios
277337```
278338
279- ### 2. Standalone Script
339+ ### 2. Module Invocation
280340``` bash
281- # Copy standalone script
282- cp bin/mcp-serve /usr/local/bin/
283- chmod +x /usr/local/bin/mcp-serve
284- mcp-serve config.json
341+ # Run as Python module
342+ python -m mcpify serve config.json
343+ python -m mcpify serve config.json --mode streamable-http --port 8080
285344```
286345
287346### 3. Docker Deployment
@@ -290,7 +349,16 @@ FROM python:3.10-slim
290349COPY . /app
291350WORKDIR /app
292351RUN pip install .
293- CMD ["./bin/mcp-serve" , "config.json" , "--mode" , "streamable-http" , "--host" , "0.0.0.0" ]
352+ CMD ["mcpify" , "serve" , "config.json" , "--mode" , "streamable-http" , "--host" , "0.0.0.0" , "--port" , "8080" ]
353+ ```
354+
355+ ### 4. Production HTTP Server
356+ ``` bash
357+ # Start HTTP server for production
358+ mcpify serve config.json --mode streamable-http --host 0.0.0.0 --port 8080
359+
360+ # With custom configuration
361+ mcpify serve config.json --mode streamable-http --host 127.0.0.1 --port 9999
294362```
295363
296364## 🤝 Contributing
0 commit comments