A Python CLI package that provides an interactive interface to Dview’s DMCP server. Users can submit queries directly from the command line, which are processed on the server using MCP tools, with results returned seamlessly to the user.
Project description
DMCP-SETU
Effortless Conversational Access to Dview MCP from Your Terminal
Dmcp-Setu is a lightweight, terminal-first Python CLI tool that enables real-time interaction with Dview’s MCP (Message Control Plane). It abstracts authentication, WebSocket handling, and streaming so you can focus purely on communication.
⚡ Built for developers who prefer speed, simplicity, and the terminal.
🚀 Overview
Dmcp-Setu allows you to:
- Authenticate with Dview services
- Establish real-time WebSocket communication
- Send and receive messages interactively
- Stream live responses directly in your terminal
⚠️ This is a CLI utility, not a Python SDK.
✨ Features
-
🔐 Flexible Authentication
- Email & Password
- Cookie-based (
token=Bearer xxxx)
-
🌐 Real-Time Messaging
- WebSocket-based communication
- Live streaming responses
-
💬 Interactive CLI
- Chat-like interface
- Built with Rich for clean output
-
⚙️ Configurable
- Environment variable support
- Custom endpoint support
📦 Installation
Using pip
pip install dmcp-setu
Using poetry
poetry add dmcp-setu
⚙️ Configuration
You must configure the Cosmos endpoint before using the CLI.
Environment Variable (Recommended)
export DVIEW_COSMOS_ENDPOINT="https://<your-cosmos-endpoint>"
Or via CLI
dmcp chat --cosmos <endpoint>
🔐 Authentication
1. Email & Password
dmcp chat --email <email> --password <password>
Or interactive mode:
dmcp chat
2. Cookie-Based Authentication
dmcp chat --cookie "token=Bearer xxxx"
Or via environment variable:
export DMCP_COOKIE="token=Bearer xxxx"
💬 Usage
Start the CLI:
dmcp chat
Example
you ▶ Hello
⋯ Processing...
dmcp ▶ Hi! How can I help you today?
Exit
- Type
exitorquit - Press
Ctrl + C
🧠 How It Works
- Credentials are validated via Cosmos API
- WebSocket connection is established
- Authentication token is sent
- Server responds with
auth_ok - Interactive chat session begins
🌍 Environment Variables
| Variable | Description |
|---|---|
| DVIEW_COSMOS_ENDPOINT | Cosmos API endpoint (required) |
| DMCP_EMAIL | Email for authentication |
| DMCP_PASSWORD | Password for authentication |
| DMCP_COOKIE | Cookie for authentication |
| DMCP_WS_URL | Override WebSocket URL |
🛠 Error Handling
User-friendly CLI errors:
- ❌ Authentication Failed
- ❌ Missing Values
- ❌ Connection Error
- ❌ Unexpected Error
All internal exceptions are abstracted.
🎯 Use Cases
- Internal Dview tooling
- MCP debugging
- Workflow testing
- CLI-based automation
⚠️ Important Notes
- This is a CLI-only tool
- Internal classes like
_DMCPare not public APIs - Direct imports may break in future versions
🧾 Best Practices
- Use environment variables for credentials
- Prefer cookie-based auth for persistent sessions
- Avoid relying on internal modules
🔗 Repository
GitHub: https://github.com/dview-io/dmcp-setu
📄 License
MIT License
Project details
Release history Release notifications | RSS feed
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 dmcp_setu-0.1.3.tar.gz.
File metadata
- Download URL: dmcp_setu-0.1.3.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.12.7 Darwin/22.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93927562cdbbe3ebc34d5fdbcd32d48135bf9f2fc0051ac73e8ff58683faa661
|
|
| MD5 |
80f7d6789d927ebe3700347b7ae5bae5
|
|
| BLAKE2b-256 |
f42eef92e647db39743cbe7494775b8e5330f93ac872338d4e485a119e35739a
|
File details
Details for the file dmcp_setu-0.1.3-py3-none-any.whl.
File metadata
- Download URL: dmcp_setu-0.1.3-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.12.7 Darwin/22.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c65481d80553ef612e1c2be81e61a210988e77869600ed3d05a0075b7115dfe8
|
|
| MD5 |
f42d2cb1757e16088ff2852fcb15838c
|
|
| BLAKE2b-256 |
36b66659b02351a521ed74c3591dc5f0d3e5d2cecb6dc889c84b454729d1ccd4
|