Skip to content

Commit 0f53ed9

Browse files
committed
remove bin/
1 parent ccd355b commit 0f53ed9

File tree

5 files changed

+109
-125
lines changed

5 files changed

+109
-125
lines changed

README.md

Lines changed: 98 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -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.
7775
MCPify provides multiple ways to start MCP servers:
7876

7977
```bash
80-
# Method 1: Using mcpify CLI
78+
# Method 1: Using mcpify CLI (recommended)
8179
mcpify 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
8782
python -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

220283
Explore 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
261328
mcpify 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
275335
pip 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
290349
COPY . /app
291350
WORKDIR /app
292351
RUN 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

bin/mcp-serve

Lines changed: 0 additions & 88 deletions
This file was deleted.

examples/python-cmd-tool/cmd-tool.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
"name": "python-cmd-tool",
3+
"description": "Example Python command-line tool with various operations",
24
"backend": {
35
"type": "commandline",
46
"config": {
@@ -39,12 +41,12 @@
3941
"parameters": [
4042
{
4143
"name": "num1",
42-
"type": "float",
44+
"type": "number",
4345
"description": "The first number to add"
4446
},
4547
{
4648
"name": "num2",
47-
"type": "float",
49+
"type": "number",
4850
"description": "The second number to add"
4951
}
5052
]

examples/python-server-project/server.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
2+
"name": "python-server-project",
3+
"description": "Example Python server project with interactive commands",
24
"backend": {
3-
"type": "server",
5+
"type": "commandline",
46
"config": {
57
"command": "python3",
68
"args": ["examples/python-server-project/server.py"],
@@ -13,13 +15,13 @@
1315
{
1416
"name": "say_hello",
1517
"description": "Prints a greeting message using server",
16-
"command": "hello",
18+
"args": ["hello"],
1719
"parameters": []
1820
},
1921
{
2022
"name": "echo_message",
2123
"description": "Echo the input message using server",
22-
"command": "echo {message}",
24+
"args": ["echo", "{message}"],
2325
"parameters": [
2426
{
2527
"name": "message",
@@ -31,7 +33,7 @@
3133
{
3234
"name": "get_time",
3335
"description": "Returns the current time using server",
34-
"command": "time",
36+
"args": ["time"],
3537
"parameters": []
3638
}
3739
]

mcpify/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""MCPify - Turn existing projects into MCP servers."""
22

3-
__version__ = "0.1.3"
3+
__version__ = "0.1.4"

0 commit comments

Comments
 (0)