A sample client implementation to interact with Kyvos MCP server.
Project description
MCP Kyvos Sample Client
The mcp-kyvos-sample-client is a sample client implementation that demonstrates how to interact with a Kyvos MCP server. It enables users to send natural language queries using either:
- SSE (Server-Sent Events) for web-based communication, or
- STDIO for command-line interaction.
The client supports both Basic Authentication and OAuth 2.0, with credentials and the Kyvos platform URL specified through a JSON configuration file.
Installation
Install the MCP Kyvos sample client package from pip:
pip install mcp-kyvos-sample-client==1.0.0a2
Configuration Overview
The client configuration is defined in a JSON file (e.g., mcp.json) or via environment files. There are two primary properties:
- clientConfiguration
- mcpServers
{
"clientConfiguration": {
"openai-api-key": "sk-...",
"auth_type": "basic"
},
"mcpServers": {
"my-stdio-server": {
"type": "stdio",
"command": "mcp-kyvos-server",
"args": [
"--env-file", "/path/to/.env"
]
}
}
}
Client Credentials
These settings apply globally to the MCP client and control logging and authentication to OpenAI:
| Parameter | Description | Example | Required | Default value |
|---|---|---|---|---|
log_level |
Log level Options: DEBUG (default), INFO |
"INFO" |
No | "DEBUG" |
log_file |
File path for client logs. | "/var/log/mcp/client.log" |
No | - |
openai-api-key |
API key for OpenAI integration. | "sk-..." |
Yes | - |
auth_type |
Type of authorization client need to use. | basic/oauth |
No | Oauth |
client_port |
The port on which the client receives the callback from the server during the OAuth flow. | 3001 |
No | 3000 |
openai_model_name |
OpenAI model name to use for generating responses. | gpt-4o-mini |
No | gpt-4o |
folder_name |
Folder name to use for getting available semantic models. | Business Catalog |
No | - |
Example:
"clientConfiguration":{
"log_level": "INFO",
"log_file": "/var/log/mcp/client.log",
"openai-api-key": "sk-...",
"folder_name":"Business_Catalog"
}
STDIO Mode
Runs synchronously over standard input/output, ideal for scripts and pipelines.
Connect with stdio:
| Field | Description | Examples | Required |
|---|---|---|---|
type |
Server connection type. | "stdio" or "sse" |
No |
command |
The command used to start the server executable. It must be either an absolute path or available on the system PATH. | "uv","python", or any command installed via pip. |
Yes |
args |
Array of arguments passed to the command. | ["--kyvos-url", "https://your-kyvos-endpoint", "--verify-ssl", "false"] | Yes |
env |
Environment variables for the server. | "USERNAME":"user123" |
No |
Example configuration in mcp.json:
{
"clientConfiguration": {
"log_level": "INFO",
"log_file": "/var/log/mcp/analytics-stdio.log",
"openai-api-key": "sk-..."
},
"mcpServers": {
"my-stdio-server": {
"type": "stdio",
"command": "mcp-kyvos-server",
"args": [
"--kyvos-url", "https://your-kyvos-endpoint",
"--kyvos-username", "user123",
"--kyvos-password", "secret",
"--openai-api-key", "sk-...",
"--kyvos-prompt-file", "./prompt.txt",
"--kyvos-default-folder", "/shared/folder",
"--verify-ssl", "false"
]
}
}
}
Or via environment file:
{
"clientConfiguration": {
"openai-api-key": "sk-..."
},
"mcpServers": {
"my-stdio-server": {
"type": "stdio",
"command": "mcp-kyvos-server",
"args": [
"--env-file", "/path/to/.env"
]
}
}
}
Or set env vars:
{
"clientConfiguration": {
"openai-api-key": "sk-..."
},
"mcpServers": {
"my-stdio-server": {
"type": "stdio",
"command": "mcp-kyvos-server",
"args": [],
"env": {
"KYVOS_URL": "https://your-kyvos-endpoint",
"KYVOS_USERNAME": "user123",
"KYVOS_PASSWORD": "secreat"
}
}
}
}
SSE Mode
Provides a persistent stream of responses from the MCP Kyvos server using HTTP SSE protocol.
Connect with sse:
| Field | Description | Examples | Required |
|---|---|---|---|
type |
Server connection type. | "sse" |
No |
url |
URL of the SSE server. | "http://<machine_ip>:<port>/sse" |
Yes |
username |
Username for HTTP Basic Auth. | "user123" |
No |
password |
Password for HTTP Basic Auth. | "secret" |
No |
Note: Username and password will be base64 encoded and passed as a Basic Auth token in the
Authorizationheader.Note: The
typeparameter is optional. If a url is provided, the client will automatically detect the type assse; if a command is provided, it will detectstdiomode.Tip: Ensure that the MCP server is running before starting the client in SSE mode.
{
"clientConfiguration": {
"log_level": "DEBUG",
"log_file": "/var/log/mcp/analytics-sse.log",
"openai-api-key": "sk-..."
},
"mcpServers": {
"analytics-sse": {
"type": "sse",
"url": "http://<machine_ip>:port/sse",
"username": "user123",
"password": "secret"
}
}
}
For reference on the MCP Kyvos server and its supported command-line arguments, see mcp-kyvos-server.
Running the Client
To start the MCP Kyvos sample client using a configuration file, run:
mcp-kyvos-sample-client --config /path/to/mcp.json
Note: On error like "Your input exceeds the context window of this model" use the command '/clear ' without quotes to reset the context. All previous context will be lost after using this command.
License
This project is licensed under the 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 mcp_kyvos_sample_client-1.0.0a2.tar.gz.
File metadata
- Download URL: mcp_kyvos_sample_client-1.0.0a2.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
068a1d4a5506913f28e630846d141eda304d654e36a0f2fd6322441f8072b5ec
|
|
| MD5 |
c6b4a16ab994c97cc186485bb45d270e
|
|
| BLAKE2b-256 |
be35f3131635f0397d2b7db2462506eb478e76bbf295c6d91465e0ccd7db39fb
|
File details
Details for the file mcp_kyvos_sample_client-1.0.0a2-py3-none-any.whl.
File metadata
- Download URL: mcp_kyvos_sample_client-1.0.0a2-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5436da70b299e160dd219e9bf98eca1d697b189a170db1e7e8b634414a8c1765
|
|
| MD5 |
8e9e9099c4e4391b91d44c27699e7ec2
|
|
| BLAKE2b-256 |
ba586dff49cfe583ac72e645dffacd38e9901c032baaa933b69caef2c2da66ef
|