This release is a pre-release and may not be stable for production use.
elizaOS MCP Plugin (Python)
A Python implementation of the Model Context Protocol (MCP) client for elizaOS agents.
Installation
pip install elizaos-plugin-mcp
Features
- Stdio Transport: Connect to MCP servers via stdio (subprocess)
- HTTP/SSE Transport: Connect to MCP servers via HTTP/SSE
- Tool Calling: Execute tools from connected MCP servers
- Resource Reading: Read resources from MCP servers
- Strong Typing: Full type hints with Pydantic models
- Fail-Fast Validation: Strict validation with no error swallowing
Usage
import asyncio
from elizaos_plugin_mcp import McpClient, StdioTransport, StdioServerConfig
async def main():
# Create a stdio transport config
config = StdioServerConfig(
command="npx",
args=["-y", "@modelcontextprotocol/server-memory"]
)
async with StdioTransport(config) as transport:
client = McpClient(transport)
await client.connect()
# List available tools
tools = await client.list_tools()
for tool in tools:
print(f"Tool: {tool.name} - {tool.description}")
# Call a tool
result = await client.call_tool(
name="store_memory",
arguments={"key": "greeting", "value": "Hello, World!"}
)
print(f"Result: {result}")
asyncio.run(main())
Configuration
Stdio Transport
from elizaos_plugin_mcp import StdioServerConfig
config = StdioServerConfig(
command="npx",
args=["-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"],
env={"NODE_ENV": "production"},
cwd="/working/dir",
timeout_ms=60000
)
HTTP/SSE Transport
from elizaos_plugin_mcp import HttpServerConfig
config = HttpServerConfig(
url="https://mcp-server.example.com/sse",
timeout_ms=30000
)
Development
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Type checking
mypy elizaos_plugin_mcp
# Linting
ruff check .
ruff format .
License
MIT License - see LICENSE file for details.
Metadata
Release files for elizaos-plugin-mcp 2.0.0a5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| elizaos_plugin_mcp-2.0.0a5.tar.gz | 13.6 kB | Without provenance | Details for elizaos_plugin_mcp-2.0.0a5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| elizaos_plugin_mcp-2.0.0a5-py3-none-any.whl | Python 3 | none | any | Details for elizaos_plugin_mcp-2.0.0a5-py3-none-any.whl |
Total release size: 28.4 kB
Release files / elizaos_plugin_mcp-2.0.0a5.tar.gz
| Download URL | elizaos_plugin_mcp-2.0.0a5.tar.gz |
|---|---|
| Size | 13.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1a7a3592eec9322e8c28ffdffdc4d3072c1390404726a4335d1b3ef3815a686
|
|
BLAKE2b-256 checksum How to use checksums |
33e19090bf2bcfaddd9fe679cc669f0aefc5caa906d6ed42467237335bbbe55e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / elizaos_plugin_mcp-2.0.0a5-py3-none-any.whl
| Download URL | elizaos_plugin_mcp-2.0.0a5-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d8f9c2dd7398c7c0229d7c42a0c8b3d67b20f6f1a00b5e82b840a79b72cc783b
|
|
BLAKE2b-256 checksum How to use checksums |
9eba7e35a4cc254d30f7cd1d498ad882aa19fa0a41ab45b4ac096d5a9de3562b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Security for elizaos-plugin-mcp 2.0.0a5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.