xyberos-mcp
Model Context Protocol client plugin — RFC-0019, M3. Xyberos → MCP →
an enormous ecosystem. Speaks the MCP protocol (JSON-RPC 2.0) over stdio
(local servers) and streamable HTTP (remote servers) using only the
standard library. Each configured server's tools/list becomes one typed
Tool (named {server}_{tool}), with arguments coerced through
FunctionTool / coerce_arguments.
Install
pip install -e ./mcp
The client is stdlib-only; the [mcp] optional extra installs the official SDK
(not required). xyberos[mcp] is also declared in the core extras.
Usage
from xyberos import create_app
from xyberos_mcp import McpPlugin
servers = {
"demo": {"command": ["python", "examples/demo_mcp_server.py"]},
"remote": {"url": "https://example.com/mcp", "headers": {"Authorization": "Bearer ..."}},
}
app = create_app()
app.load_plugin(McpPlugin(servers))
app.tools.execute("demo_echo", None, text="hello", repeat=2)
Or configure entirely through the environment (MCP_SERVERS = JSON path or
inline JSON). An unconfigured instance registers nothing (logs a warning).
Direct client use
from xyberos_mcp import McpClient
from xyberos_mcp.registry import ServerConfig
with McpClient(ServerConfig(name="demo", command=["python", "demo_mcp_server.py"])) as client:
client.list_tools() # -> [{name, description, inputSchema}]
client.call_tool("echo", {"text": "hi"})
Design
- Transports —
StdioTransport(newline-delimited JSON-RPC over a subprocess) andHttpTransport(streamable HTTP; handlesapplication/jsonandtext/event-streamresponses). - Lifecycle —
connect/disconnect/reconnect,initializehandshake +notifications/initialized, per-request timeouts, andutils.resilience.retryon connect. - Security —
shell=False+ literal argv (no shell interpolation), new session / hidden-window subprocess isolation, and aServerAllowlistthat refuses unlisted servers. - Typed tools — MCP
inputSchema→FunctionToolsignature (same__signature__technique as the M2 HTTP connector).
Examples
examples/demo_mcp_server.py— a minimal local MCP server (echo,add).examples/mcp_client.py— connects to it, lists tools, calls one.examples/servers.json— stdio + remote HTTP config reference.
Tests
pip install pytest
pytest tests/
The tests launch the bundled fake MCP server (stdio) and a local HTTP endpoint
(both application/json and SSE modes) — no external network, no SDK.
Ship location
Plugin (xyberos.plugins entry point) + optional [mcp] extra. Depends on
M2's HTTP/typed-tool patterns.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xyberos_mcp-0.1.0.tar.gz.
File metadata
- Download URL: xyberos_mcp-0.1.0.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9ac676672921b6515870b9a0422a5614b33cf8b41db2236ff4433678308565e
|
|
| MD5 |
99cf039de351ca06a40decaa5da0da90
|
|
| BLAKE2b-256 |
cc95653ab7a1ac29528c73bf1ce3336600560eb57f3c8f56ed838d667e349bd4
|
Provenance
The following attestation bundles were made for xyberos_mcp-0.1.0.tar.gz:
Publisher:
pypi-plugins.yml on xyberos/xyberos-plugins
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xyberos_mcp-0.1.0.tar.gz -
Subject digest:
c9ac676672921b6515870b9a0422a5614b33cf8b41db2236ff4433678308565e - Sigstore transparency entry: 2495240430
- Sigstore integration time:
-
Permalink:
xyberos/xyberos-plugins@cd98ad6193005275396bb763df8de0468830de4a -
Branch / Tag:
refs/heads/master - Owner: https://github.com/xyberos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-plugins.yml@cd98ad6193005275396bb763df8de0468830de4a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file xyberos_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: xyberos_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8cdfe5590a8d3f91fa0c3601847e007e5193109cd39b27973e26b880d5162263
|
|
| MD5 |
ac574fb59702bed69fd65a9eb9ac39f1
|
|
| BLAKE2b-256 |
6f3c51cae7ae30c883d36f8f97e9381e846fd74985e5e49333ff6cbce3998cf0
|
Provenance
The following attestation bundles were made for xyberos_mcp-0.1.0-py3-none-any.whl:
Publisher:
pypi-plugins.yml on xyberos/xyberos-plugins
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xyberos_mcp-0.1.0-py3-none-any.whl -
Subject digest:
8cdfe5590a8d3f91fa0c3601847e007e5193109cd39b27973e26b880d5162263 - Sigstore transparency entry: 2495240463
- Sigstore integration time:
-
Permalink:
xyberos/xyberos-plugins@cd98ad6193005275396bb763df8de0468830de4a -
Branch / Tag:
refs/heads/master - Owner: https://github.com/xyberos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-plugins.yml@cd98ad6193005275396bb763df8de0468830de4a -
Trigger Event:
workflow_dispatch
-
Statement type: