@portofcontext/pctx 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -9,15 +9,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  ### Added
11
11
 
12
- -
12
+ ### Changed
13
+
14
+ ### Fixed
15
+
16
+ ## [v0.4.0] - 2025-12-31
17
+
18
+ ### Added
19
+
20
+ - Stdio MCP server support for upstreams via `pctx.json` (`command`, `args`, `env`).
21
+ - `pctx mcp add` now supports stdio MCP servers via `--command`, `--arg`, and `--env` flags.
22
+ - `pctx mcp start --stdio` to serve the MCP interface over stdio.
23
+ - Logger configuration now supports optional `file` field to write logs to a file.
13
24
 
14
25
  ### Changed
15
26
 
16
- -
27
+ - `pctx mcp add` now accepts either a URL (for HTTP servers) or `--command` (for stdio servers), making it a unified interface for adding all types of MCP servers.
28
+ - Logger output behavior is now mode-aware to ensure stdio compatibility:
29
+ - `--stdio` mode without `logger.file`: logging is automatically disabled to keep stdout/stderr clean for JSON-RPC communication
30
+ - `--stdio` mode with `logger.file`: logs write to the specified file
31
+ - HTTP mode: logs write to stdout (default behavior)
17
32
 
18
33
  ### Fixed
19
34
 
20
- -
35
+ - Improved error handling for stdio config and MCP initialization failures.
21
36
 
22
37
  ## [v0.3.0] - 2025-12-16
23
38
 
package/README.md CHANGED
@@ -30,9 +30,10 @@ npm i -g @portofcontext/pctx
30
30
  ```
31
31
 
32
32
  ## Core Functionality
33
+
33
34
  pctx can be run as a stateless HTTP server for Code Mode sessions or as a unified MCP server that exposes Code Mode functionality for registered upstream MCP servers.
34
35
 
35
- ```bash
36
+ ```bash
36
37
  # Start Code Mode for Python SDK
37
38
  pctx start
38
39
 
@@ -42,10 +43,13 @@ pctx mcp dev
42
43
  ```
43
44
 
44
45
  ## Python SDK
46
+
45
47
  Use the Python SDK if building agents in Python and want to run Code Mode with custom tools and/or MCP servers. The Python SDK is an HTTP client to the `pctx` server.
48
+
46
49
  ```bash
47
- uv pip install pctx-client
50
+ pip install pctx-client
48
51
  ```
52
+
49
53
  ```python
50
54
  from pctx_client import Pctx, tool
51
55
  from agents import Agent # Use any Agent SDK
@@ -66,26 +70,33 @@ agent = Agent(
66
70
  tools=tools,
67
71
  )
68
72
  ```
69
- Complete Docs: [Python SDK Quickstart and Docs](./pctx-py/README.md)
73
+
74
+ ### Links
75
+
76
+ - [Python SDK Quickstart and Docs](./pctx-py/README.md)
77
+ - [Python API Reference](https://pctx.readthedocs.io/en/latest/)
70
78
 
71
79
  ## Node SDK
80
+
72
81
  Coming soon
73
82
 
74
83
  ## Unified MCP
75
- Use the unified MCP to run Code Mode with MCP servers and want to persist the authentication connections and you do not need to register local tools.
84
+
85
+ Use the unified MCP to run Code Mode with MCP servers and want to persist the authentication connections and you do not need to use agent tools (non-mcp tools).
76
86
 
77
87
  ```bash
78
88
  # Initialize config for upstream mcp connections
79
89
  pctx mcp init
80
90
 
81
- # Connect to any MCP server
82
- pctx mcp add my-local-server http://localhost:3000/mcp
91
+ # Add HTTP or stdio MCP servers
83
92
  pctx mcp add stripe https://mcp.stripe.com
93
+ pctx mcp add memory --command "npx -y @modelcontextprotocol/server-memory"
84
94
 
85
- # Start the unified MCP server in dev mode
95
+ # Start as HTTP server (dev mode with UI)
86
96
  pctx mcp dev
87
97
 
88
- # copy server url and connect to agents with --transport http
98
+ # Or start as stdio MCP server
99
+ pctx mcp start --stdio
89
100
  ```
90
101
 
91
102
  For complete CLI documentation, see [CLI.md](docs/CLI.md).
@@ -126,6 +137,7 @@ console.log(`Found ${orders.length} orders`);
126
137
  - **Secure authentication**: Source secrets from environment variables, system keychain, and external commands. See [Authentication Section](docs/config.md#authentication) in the CLI configuration docs for more details.
127
138
 
128
139
  ## Architecture
140
+
129
141
  <img width="1020" height="757" alt="Screenshot 2025-11-21 at 11 03 20 AM" src="./docs/pctx-architecture.svg" />
130
142
 
131
143
  ## Security
@@ -150,6 +162,11 @@ npm upgrade -g @portofcontext/pctx
150
162
 
151
163
  ```
152
164
 
165
+ ## Develop
166
+
167
+ - For core dev: install rust and jump into `crates/`
168
+ - Client SDK dev: find the README in the SDK
169
+
153
170
  ## Learn More
154
171
 
155
172
  - [Model Context Protocol (MCP)](https://modelcontextprotocol.io/)
@@ -24,7 +24,7 @@
24
24
  "hasInstallScript": true,
25
25
  "license": "MIT",
26
26
  "name": "@portofcontext/pctx",
27
- "version": "0.3.0"
27
+ "version": "0.4.0"
28
28
  },
29
29
  "node_modules/@isaacs/balanced-match": {
30
30
  "engines": {
@@ -897,5 +897,5 @@
897
897
  }
898
898
  },
899
899
  "requires": true,
900
- "version": "0.3.0"
900
+ "version": "0.4.0"
901
901
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "artifactDownloadUrl": "https://github.com/portofcontext/pctx/releases/download/v0.3.0",
2
+ "artifactDownloadUrl": "https://github.com/portofcontext/pctx/releases/download/v0.4.0",
3
3
  "bin": {
4
4
  "generate-cli-docs": "run-generate-cli-docs.js",
5
5
  "pctx": "run-pctx.js"
@@ -92,7 +92,7 @@
92
92
  "zipExt": ".tar.gz"
93
93
  }
94
94
  },
95
- "version": "0.3.0",
95
+ "version": "0.4.0",
96
96
  "volta": {
97
97
  "node": "18.14.1",
98
98
  "npm": "9.5.0"