This is page 2 of 20. Use http://codebase.md/fujitsu-ai/mcp-server-for-mas-developments?lines=true&page={x} to view the full context.
# Directory Structure
```
├── .gitattributes
├── .gitignore
├── agents
│ ├── __init__.py
│ ├── AgentInterface
│ │ ├── __init__.py
│ │ ├── Python
│ │ │ ├── __init__.py
│ │ │ ├── agent.py
│ │ │ ├── color.py
│ │ │ ├── config.py
│ │ │ ├── language.py
│ │ │ ├── local_file_handler.py
│ │ │ └── network.py
│ │ └── requirements.txt
│ ├── AgentMonitoring
│ │ ├── ChatBot-Agent Dashboard Example - Grafana.json
│ │ ├── images
│ │ │ ├── Grafana.png
│ │ │ └── Prometheus.png
│ │ ├── IoT-Agent Dashboard Example - Grafana.json
│ │ ├── OpenAI compatible API - Agent Dashboard Example - Grafana.json
│ │ ├── prometheus Example.yml
│ │ └── README.md
│ ├── ChatBotAgent
│ │ ├── __init__.py
│ │ ├── config.json.example
│ │ ├── html
│ │ │ ├── favicon.ico
│ │ │ ├── index_de.html
│ │ │ ├── index.html
│ │ │ ├── Logo_light.svg
│ │ │ ├── start_http_server.ps1
│ │ │ └── start_http_server.sh
│ │ ├── Python
│ │ │ ├── __init__.py
│ │ │ └── chatbot_agent.py
│ │ ├── README.md
│ │ └── requirements.txt
│ ├── IoTAgent
│ │ ├── config_example.json
│ │ ├── Python
│ │ │ ├── iot_mqtt_agent.py
│ │ │ └── language.py
│ │ ├── README.md
│ │ └── requirements.txt
│ ├── ISMAgent
│ │ ├── config_example.json
│ │ ├── PGPT Scenario Prompts
│ │ │ ├── ISM System Prompt - Detecting Error State.txt
│ │ │ ├── ISM User Post-Prompt - Detecting Error State.txt
│ │ │ ├── ISM User Pre-Prompt - Detecting Error State.txt
│ │ │ └── README.md
│ │ ├── Python
│ │ │ ├── ism_agent.py
│ │ │ └── language.py
│ │ ├── README.md
│ │ ├── requirements.txt
│ │ └── start_ism_agent.ps1
│ ├── MCP-Client
│ │ ├── __init__.py
│ │ ├── .env.example
│ │ ├── Python
│ │ │ ├── __init__.py
│ │ │ ├── chat_handler.py
│ │ │ ├── config.py
│ │ │ ├── environment.py
│ │ │ ├── llm_client.py
│ │ │ ├── mcp_client_sse.py
│ │ │ ├── mcp_client.py
│ │ │ ├── messages
│ │ │ │ ├── __init__.py
│ │ │ │ ├── message_types
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── incrementing_id_message.py
│ │ │ │ │ ├── initialize_message.py
│ │ │ │ │ ├── json_rpc_message.py
│ │ │ │ │ ├── ping_message.py
│ │ │ │ │ ├── prompts_messages.py
│ │ │ │ │ ├── prompts_models.py
│ │ │ │ │ ├── resources_messages.py
│ │ │ │ │ └── tools_messages.py
│ │ │ │ ├── send_call_tool.py
│ │ │ │ ├── send_initialize_message.py
│ │ │ │ ├── send_message.py
│ │ │ │ ├── send_ping.py
│ │ │ │ ├── send_prompts.py
│ │ │ │ ├── send_resources.py
│ │ │ │ └── send_tools_list.py
│ │ │ ├── system_prompt_generator.py
│ │ │ ├── tools_handler.py
│ │ │ └── transport
│ │ │ ├── __init__.py
│ │ │ └── stdio
│ │ │ ├── __init__.py
│ │ │ ├── stdio_client.py
│ │ │ ├── stdio_server_parameters.py
│ │ │ └── stdio_server_shutdown.py
│ │ ├── README.md
│ │ ├── requirements.txt
│ │ └── server_config.json
│ ├── OpenAI_Compatible_API_Agent
│ │ ├── __init__.py
│ │ ├── docker-compose.yml
│ │ ├── Dockerfile
│ │ ├── pgpt_openai_api_mcp.json.example
│ │ ├── pgpt_openai_api_proxy.json.example
│ │ ├── Python
│ │ │ ├── __init__.py
│ │ │ ├── client_tests
│ │ │ │ ├── __init__.py
│ │ │ │ ├── openai_test_client_structured.py
│ │ │ │ ├── openai_test_client_tools.py
│ │ │ │ ├── openai_test_client.py
│ │ │ │ ├── vllm_client_multimodal.py
│ │ │ │ ├── vllm_client.py
│ │ │ │ ├── vllm_structured.py
│ │ │ │ └── vllm_structured2.py
│ │ │ ├── generate_api_key.py
│ │ │ ├── open_ai_helper.py
│ │ │ ├── openai_compatible_api.py
│ │ │ ├── openai_mcp_api.py
│ │ │ ├── pgpt_api.py
│ │ │ ├── privategpt_api.py
│ │ │ └── vllmproxy.py
│ │ ├── README.md
│ │ └── requirements.txt
│ └── SourceManagerAgent
│ ├── __init__.py
│ ├── config.json.example
│ └── Python
│ ├── __init__.py
│ ├── file_tools
│ │ └── loader_factory.py
│ ├── file_upload_agent.py
│ └── local_db.py
├── clients
│ ├── __init__.py
│ ├── C# .Net
│ │ ├── 1.0 mcp_login
│ │ │ ├── bin
│ │ │ │ └── Debug
│ │ │ │ └── net9.0
│ │ │ │ ├── mcp_login.deps.json
│ │ │ │ ├── mcp_login.dll
│ │ │ │ ├── mcp_login.exe
│ │ │ │ ├── mcp_login.pdb
│ │ │ │ ├── mcp_login.runtimeconfig.json
│ │ │ │ └── Newtonsoft.Json.dll
│ │ │ ├── mcp_login.csproj
│ │ │ ├── obj
│ │ │ │ ├── Debug
│ │ │ │ │ └── net9.0
│ │ │ │ │ ├── .NETCoreApp,Version=v9.0.AssemblyAttributes.cs
│ │ │ │ │ ├── apphost.exe
│ │ │ │ │ ├── mcp_login.AssemblyInfo.cs
│ │ │ │ │ ├── mcp_login.AssemblyInfoInputs.cache
│ │ │ │ │ ├── mcp_login.assets.cache
│ │ │ │ │ ├── mcp_login.csproj.AssemblyReference.cache
│ │ │ │ │ ├── mcp_login.csproj.CoreCompileInputs.cache
│ │ │ │ │ ├── mcp_login.csproj.FileListAbsolute.txt
│ │ │ │ │ ├── mcp_login.csproj.Up2Date
│ │ │ │ │ ├── mcp_login.dll
│ │ │ │ │ ├── mcp_login.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ │ ├── mcp_login.genruntimeconfig.cache
│ │ │ │ │ ├── mcp_login.GlobalUsings.g.cs
│ │ │ │ │ ├── mcp_login.pdb
│ │ │ │ │ ├── ref
│ │ │ │ │ │ └── mcp_login.dll
│ │ │ │ │ └── refint
│ │ │ │ │ └── mcp_login.dll
│ │ │ │ ├── mcp_login.csproj.nuget.dgspec.json
│ │ │ │ ├── mcp_login.csproj.nuget.g.props
│ │ │ │ ├── mcp_login.csproj.nuget.g.targets
│ │ │ │ ├── project.assets.json
│ │ │ │ └── project.nuget.cache
│ │ │ └── Program.cs
│ │ ├── 1.1 mcp_logout
│ │ │ ├── bin
│ │ │ │ └── Debug
│ │ │ │ └── net9.0
│ │ │ │ ├── mcp_logout.deps.json
│ │ │ │ ├── mcp_logout.dll
│ │ │ │ ├── mcp_logout.exe
│ │ │ │ ├── mcp_logout.pdb
│ │ │ │ ├── mcp_logout.runtimeconfig.json
│ │ │ │ └── Newtonsoft.Json.dll
│ │ │ ├── mcp_logout.csproj
│ │ │ ├── obj
│ │ │ │ ├── Debug
│ │ │ │ │ └── net9.0
│ │ │ │ │ ├── .NETCoreApp,Version=v9.0.AssemblyAttributes.cs
│ │ │ │ │ ├── apphost.exe
│ │ │ │ │ ├── mcp_logout.AssemblyInfo.cs
│ │ │ │ │ ├── mcp_logout.AssemblyInfoInputs.cache
│ │ │ │ │ ├── mcp_logout.assets.cache
│ │ │ │ │ ├── mcp_logout.csproj.AssemblyReference.cache
│ │ │ │ │ ├── mcp_logout.csproj.CoreCompileInputs.cache
│ │ │ │ │ ├── mcp_logout.csproj.FileListAbsolute.txt
│ │ │ │ │ ├── mcp_logout.csproj.Up2Date
│ │ │ │ │ ├── mcp_logout.dll
│ │ │ │ │ ├── mcp_logout.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ │ ├── mcp_logout.genruntimeconfig.cache
│ │ │ │ │ ├── mcp_logout.GlobalUsings.g.cs
│ │ │ │ │ ├── mcp_logout.pdb
│ │ │ │ │ ├── ref
│ │ │ │ │ │ └── mcp_logout.dll
│ │ │ │ │ └── refint
│ │ │ │ │ └── mcp_logout.dll
│ │ │ │ ├── mcp_logout.csproj.nuget.dgspec.json
│ │ │ │ ├── mcp_logout.csproj.nuget.g.props
│ │ │ │ ├── mcp_logout.csproj.nuget.g.targets
│ │ │ │ ├── project.assets.json
│ │ │ │ └── project.nuget.cache
│ │ │ └── Program.cs
│ │ ├── 2.0 mcp_chat
│ │ │ ├── bin
│ │ │ │ └── Debug
│ │ │ │ └── net9.0
│ │ │ │ ├── mcp_chat.deps.json
│ │ │ │ ├── mcp_chat.dll
│ │ │ │ ├── mcp_chat.exe
│ │ │ │ ├── mcp_chat.pdb
│ │ │ │ ├── mcp_chat.runtimeconfig.json
│ │ │ │ └── Newtonsoft.Json.dll
│ │ │ ├── mcp_chat.csproj
│ │ │ ├── obj
│ │ │ │ ├── Debug
│ │ │ │ │ └── net9.0
│ │ │ │ │ ├── .NETCoreApp,Version=v9.0.AssemblyAttributes.cs
│ │ │ │ │ ├── apphost.exe
│ │ │ │ │ ├── mcp_chat.AssemblyInfo.cs
│ │ │ │ │ ├── mcp_chat.AssemblyInfoInputs.cache
│ │ │ │ │ ├── mcp_chat.assets.cache
│ │ │ │ │ ├── mcp_chat.csproj.AssemblyReference.cache
│ │ │ │ │ ├── mcp_chat.csproj.CoreCompileInputs.cache
│ │ │ │ │ ├── mcp_chat.csproj.FileListAbsolute.txt
│ │ │ │ │ ├── mcp_chat.csproj.Up2Date
│ │ │ │ │ ├── mcp_chat.dll
│ │ │ │ │ ├── mcp_chat.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ │ ├── mcp_chat.genruntimeconfig.cache
│ │ │ │ │ ├── mcp_chat.GlobalUsings.g.cs
│ │ │ │ │ ├── mcp_chat.pdb
│ │ │ │ │ ├── ref
│ │ │ │ │ │ └── mcp_chat.dll
│ │ │ │ │ └── refint
│ │ │ │ │ └── mcp_chat.dll
│ │ │ │ ├── mcp_chat.csproj.nuget.dgspec.json
│ │ │ │ ├── mcp_chat.csproj.nuget.g.props
│ │ │ │ ├── mcp_chat.csproj.nuget.g.targets
│ │ │ │ ├── project.assets.json
│ │ │ │ └── project.nuget.cache
│ │ │ └── Program.cs
│ │ ├── 2.1 mcp_continue_chat
│ │ │ ├── bin
│ │ │ │ └── Debug
│ │ │ │ └── net9.0
│ │ │ │ ├── mcp_continue_chat.deps.json
│ │ │ │ ├── mcp_continue_chat.dll
│ │ │ │ ├── mcp_continue_chat.exe
│ │ │ │ ├── mcp_continue_chat.pdb
│ │ │ │ ├── mcp_continue_chat.runtimeconfig.json
│ │ │ │ └── Newtonsoft.Json.dll
│ │ │ ├── mcp_continue_chat.csproj
│ │ │ ├── obj
│ │ │ │ ├── Debug
│ │ │ │ │ └── net9.0
│ │ │ │ │ ├── .NETCoreApp,Version=v9.0.AssemblyAttributes.cs
│ │ │ │ │ ├── apphost.exe
│ │ │ │ │ ├── mcp_cont.EF178231.Up2Date
│ │ │ │ │ ├── mcp_continue_chat.AssemblyInfo.cs
│ │ │ │ │ ├── mcp_continue_chat.AssemblyInfoInputs.cache
│ │ │ │ │ ├── mcp_continue_chat.assets.cache
│ │ │ │ │ ├── mcp_continue_chat.csproj.AssemblyReference.cache
│ │ │ │ │ ├── mcp_continue_chat.csproj.CoreCompileInputs.cache
│ │ │ │ │ ├── mcp_continue_chat.csproj.FileListAbsolute.txt
│ │ │ │ │ ├── mcp_continue_chat.dll
│ │ │ │ │ ├── mcp_continue_chat.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ │ ├── mcp_continue_chat.genruntimeconfig.cache
│ │ │ │ │ ├── mcp_continue_chat.GlobalUsings.g.cs
│ │ │ │ │ ├── mcp_continue_chat.pdb
│ │ │ │ │ ├── ref
│ │ │ │ │ │ └── mcp_continue_chat.dll
│ │ │ │ │ └── refint
│ │ │ │ │ └── mcp_continue_chat.dll
│ │ │ │ ├── mcp_continue_chat.csproj.nuget.dgspec.json
│ │ │ │ ├── mcp_continue_chat.csproj.nuget.g.props
│ │ │ │ ├── mcp_continue_chat.csproj.nuget.g.targets
│ │ │ │ ├── project.assets.json
│ │ │ │ └── project.nuget.cache
│ │ │ └── Program.cs
│ │ ├── 2.2 mcp_get_chat_info
│ │ │ ├── bin
│ │ │ │ └── Debug
│ │ │ │ └── net9.0
│ │ │ │ ├── mcp_get_chat_info.deps.json
│ │ │ │ ├── mcp_get_chat_info.dll
│ │ │ │ ├── mcp_get_chat_info.exe
│ │ │ │ ├── mcp_get_chat_info.pdb
│ │ │ │ ├── mcp_get_chat_info.runtimeconfig.json
│ │ │ │ └── Newtonsoft.Json.dll
│ │ │ ├── Dokumente - Verknüpfung.lnk
│ │ │ ├── mcp_get_chat_info.csproj
│ │ │ ├── obj
│ │ │ │ ├── Debug
│ │ │ │ │ └── net9.0
│ │ │ │ │ ├── .NETCoreApp,Version=v9.0.AssemblyAttributes.cs
│ │ │ │ │ ├── apphost.exe
│ │ │ │ │ ├── mcp_get_.DFF47B4E.Up2Date
│ │ │ │ │ ├── mcp_get_chat_info.AssemblyInfo.cs
│ │ │ │ │ ├── mcp_get_chat_info.AssemblyInfoInputs.cache
│ │ │ │ │ ├── mcp_get_chat_info.assets.cache
│ │ │ │ │ ├── mcp_get_chat_info.csproj.AssemblyReference.cache
│ │ │ │ │ ├── mcp_get_chat_info.csproj.CoreCompileInputs.cache
│ │ │ │ │ ├── mcp_get_chat_info.csproj.FileListAbsolute.txt
│ │ │ │ │ ├── mcp_get_chat_info.dll
│ │ │ │ │ ├── mcp_get_chat_info.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ │ ├── mcp_get_chat_info.genruntimeconfig.cache
│ │ │ │ │ ├── mcp_get_chat_info.GlobalUsings.g.cs
│ │ │ │ │ ├── mcp_get_chat_info.pdb
│ │ │ │ │ ├── ref
│ │ │ │ │ │ └── mcp_get_chat_info.dll
│ │ │ │ │ └── refint
│ │ │ │ │ └── mcp_get_chat_info.dll
│ │ │ │ ├── mcp_get_chat_info.csproj.nuget.dgspec.json
│ │ │ │ ├── mcp_get_chat_info.csproj.nuget.g.props
│ │ │ │ ├── mcp_get_chat_info.csproj.nuget.g.targets
│ │ │ │ ├── project.assets.json
│ │ │ │ └── project.nuget.cache
│ │ │ └── Program.cs
│ │ ├── 3.0 mcp_create_source
│ │ │ ├── bin
│ │ │ │ └── Debug
│ │ │ │ └── net9.0
│ │ │ │ ├── mcp_create_source.deps.json
│ │ │ │ ├── mcp_create_source.dll
│ │ │ │ ├── mcp_create_source.exe
│ │ │ │ ├── mcp_create_source.pdb
│ │ │ │ ├── mcp_create_source.runtimeconfig.json
│ │ │ │ └── Newtonsoft.Json.dll
│ │ │ ├── mcp_create_source.csproj
│ │ │ ├── obj
│ │ │ │ ├── Debug
│ │ │ │ │ └── net9.0
│ │ │ │ │ ├── .NETCoreApp,Version=v9.0.AssemblyAttributes.cs
│ │ │ │ │ ├── apphost.exe
│ │ │ │ │ ├── mcp_crea.CB4ED912.Up2Date
│ │ │ │ │ ├── mcp_create_source.AssemblyInfo.cs
│ │ │ │ │ ├── mcp_create_source.AssemblyInfoInputs.cache
│ │ │ │ │ ├── mcp_create_source.assets.cache
│ │ │ │ │ ├── mcp_create_source.csproj.AssemblyReference.cache
│ │ │ │ │ ├── mcp_create_source.csproj.CoreCompileInputs.cache
│ │ │ │ │ ├── mcp_create_source.csproj.FileListAbsolute.txt
│ │ │ │ │ ├── mcp_create_source.dll
│ │ │ │ │ ├── mcp_create_source.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ │ ├── mcp_create_source.genruntimeconfig.cache
│ │ │ │ │ ├── mcp_create_source.GlobalUsings.g.cs
│ │ │ │ │ ├── mcp_create_source.pdb
│ │ │ │ │ ├── ref
│ │ │ │ │ │ └── mcp_create_source.dll
│ │ │ │ │ └── refint
│ │ │ │ │ └── mcp_create_source.dll
│ │ │ │ ├── mcp_create_source.csproj.nuget.dgspec.json
│ │ │ │ ├── mcp_create_source.csproj.nuget.g.props
│ │ │ │ ├── mcp_create_source.csproj.nuget.g.targets
│ │ │ │ ├── project.assets.json
│ │ │ │ └── project.nuget.cache
│ │ │ └── Program.cs
│ │ ├── 3.1 mcp_get_source
│ │ │ ├── bin
│ │ │ │ └── Debug
│ │ │ │ └── net9.0
│ │ │ │ ├── mcp_get_source.deps.json
│ │ │ │ ├── mcp_get_source.dll
│ │ │ │ ├── mcp_get_source.exe
│ │ │ │ ├── mcp_get_source.pdb
│ │ │ │ ├── mcp_get_source.runtimeconfig.json
│ │ │ │ └── Newtonsoft.Json.dll
│ │ │ ├── mcp_get_source.csproj
│ │ │ ├── obj
│ │ │ │ ├── Debug
│ │ │ │ │ └── net9.0
│ │ │ │ │ ├── .NETCoreApp,Version=v9.0.AssemblyAttributes.cs
│ │ │ │ │ ├── apphost.exe
│ │ │ │ │ ├── mcp_get_.4E61956F.Up2Date
│ │ │ │ │ ├── mcp_get_source.AssemblyInfo.cs
│ │ │ │ │ ├── mcp_get_source.AssemblyInfoInputs.cache
│ │ │ │ │ ├── mcp_get_source.assets.cache
│ │ │ │ │ ├── mcp_get_source.csproj.AssemblyReference.cache
│ │ │ │ │ ├── mcp_get_source.csproj.CoreCompileInputs.cache
│ │ │ │ │ ├── mcp_get_source.csproj.FileListAbsolute.txt
│ │ │ │ │ ├── mcp_get_source.dll
│ │ │ │ │ ├── mcp_get_source.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ │ ├── mcp_get_source.genruntimeconfig.cache
│ │ │ │ │ ├── mcp_get_source.GlobalUsings.g.cs
│ │ │ │ │ ├── mcp_get_source.pdb
│ │ │ │ │ ├── ref
│ │ │ │ │ │ └── mcp_get_source.dll
│ │ │ │ │ └── refint
│ │ │ │ │ └── mcp_get_source.dll
│ │ │ │ ├── mcp_get_source.csproj.nuget.dgspec.json
│ │ │ │ ├── mcp_get_source.csproj.nuget.g.props
│ │ │ │ ├── mcp_get_source.csproj.nuget.g.targets
│ │ │ │ ├── project.assets.json
│ │ │ │ └── project.nuget.cache
│ │ │ └── Program.cs
│ │ ├── 3.2 mcp_list_sources
│ │ │ ├── bin
│ │ │ │ └── Debug
│ │ │ │ └── net9.0
│ │ │ │ ├── mcp_list_sources.deps.json
│ │ │ │ ├── mcp_list_sources.dll
│ │ │ │ ├── mcp_list_sources.exe
│ │ │ │ ├── mcp_list_sources.pdb
│ │ │ │ ├── mcp_list_sources.runtimeconfig.json
│ │ │ │ └── Newtonsoft.Json.dll
│ │ │ ├── mcp_list_sources.csproj
│ │ │ ├── obj
│ │ │ │ ├── Debug
│ │ │ │ │ └── net9.0
│ │ │ │ │ ├── .NETCoreApp,Version=v9.0.AssemblyAttributes.cs
│ │ │ │ │ ├── apphost.exe
│ │ │ │ │ ├── mcp_list_sources.AssemblyInfo.cs
│ │ │ │ │ ├── mcp_list_sources.AssemblyInfoInputs.cache
│ │ │ │ │ ├── mcp_list_sources.assets.cache
│ │ │ │ │ ├── mcp_list_sources.csproj.AssemblyReference.cache
│ │ │ │ │ ├── mcp_list_sources.csproj.CoreCompileInputs.cache
│ │ │ │ │ ├── mcp_list_sources.csproj.FileListAbsolute.txt
│ │ │ │ │ ├── mcp_list_sources.dll
│ │ │ │ │ ├── mcp_list_sources.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ │ ├── mcp_list_sources.genruntimeconfig.cache
│ │ │ │ │ ├── mcp_list_sources.GlobalUsings.g.cs
│ │ │ │ │ ├── mcp_list_sources.pdb
│ │ │ │ │ ├── mcp_list.A720E197.Up2Date
│ │ │ │ │ ├── ref
│ │ │ │ │ │ └── mcp_list_sources.dll
│ │ │ │ │ └── refint
│ │ │ │ │ └── mcp_list_sources.dll
│ │ │ │ ├── mcp_list_sources.csproj.nuget.dgspec.json
│ │ │ │ ├── mcp_list_sources.csproj.nuget.g.props
│ │ │ │ ├── mcp_list_sources.csproj.nuget.g.targets
│ │ │ │ ├── project.assets.json
│ │ │ │ └── project.nuget.cache
│ │ │ └── Program.cs
│ │ ├── 3.3 mcp_edit_source
│ │ │ ├── bin
│ │ │ │ └── Debug
│ │ │ │ └── net9.0
│ │ │ │ ├── mcp_edit_source.deps.json
│ │ │ │ ├── mcp_edit_source.dll
│ │ │ │ ├── mcp_edit_source.exe
│ │ │ │ ├── mcp_edit_source.pdb
│ │ │ │ ├── mcp_edit_source.runtimeconfig.json
│ │ │ │ └── Newtonsoft.Json.dll
│ │ │ ├── mcp_edit_source.csproj
│ │ │ ├── obj
│ │ │ │ ├── Debug
│ │ │ │ │ └── net9.0
│ │ │ │ │ ├── .NETCoreApp,Version=v9.0.AssemblyAttributes.cs
│ │ │ │ │ ├── apphost.exe
│ │ │ │ │ ├── mcp_edit_source.AssemblyInfo.cs
│ │ │ │ │ ├── mcp_edit_source.AssemblyInfoInputs.cache
│ │ │ │ │ ├── mcp_edit_source.assets.cache
│ │ │ │ │ ├── mcp_edit_source.csproj.AssemblyReference.cache
│ │ │ │ │ ├── mcp_edit_source.csproj.CoreCompileInputs.cache
│ │ │ │ │ ├── mcp_edit_source.csproj.FileListAbsolute.txt
│ │ │ │ │ ├── mcp_edit_source.dll
│ │ │ │ │ ├── mcp_edit_source.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ │ ├── mcp_edit_source.genruntimeconfig.cache
│ │ │ │ │ ├── mcp_edit_source.GlobalUsings.g.cs
│ │ │ │ │ ├── mcp_edit_source.pdb
│ │ │ │ │ ├── mcp_edit.7303BE3B.Up2Date
│ │ │ │ │ ├── ref
│ │ │ │ │ │ └── mcp_edit_source.dll
│ │ │ │ │ └── refint
│ │ │ │ │ └── mcp_edit_source.dll
│ │ │ │ ├── mcp_edit_source.csproj.nuget.dgspec.json
│ │ │ │ ├── mcp_edit_source.csproj.nuget.g.props
│ │ │ │ ├── mcp_edit_source.csproj.nuget.g.targets
│ │ │ │ ├── project.assets.json
│ │ │ │ └── project.nuget.cache
│ │ │ └── Program.cs
│ │ ├── 3.4 mcp_delete_source
│ │ │ ├── bin
│ │ │ │ └── Debug
│ │ │ │ └── net9.0
│ │ │ │ ├── mcp_delete_source.deps.json
│ │ │ │ ├── mcp_delete_source.dll
│ │ │ │ ├── mcp_delete_source.exe
│ │ │ │ ├── mcp_delete_source.pdb
│ │ │ │ ├── mcp_delete_source.runtimeconfig.json
│ │ │ │ └── Newtonsoft.Json.dll
│ │ │ ├── mcp_delete_source.csproj
│ │ │ ├── obj
│ │ │ │ ├── Debug
│ │ │ │ │ └── net9.0
│ │ │ │ │ ├── .NETCoreApp,Version=v9.0.AssemblyAttributes.cs
│ │ │ │ │ ├── apphost.exe
│ │ │ │ │ ├── mcp_dele.67DD13F9.Up2Date
│ │ │ │ │ ├── mcp_delete_source.AssemblyInfo.cs
│ │ │ │ │ ├── mcp_delete_source.AssemblyInfoInputs.cache
│ │ │ │ │ ├── mcp_delete_source.assets.cache
│ │ │ │ │ ├── mcp_delete_source.csproj.AssemblyReference.cache
│ │ │ │ │ ├── mcp_delete_source.csproj.CoreCompileInputs.cache
│ │ │ │ │ ├── mcp_delete_source.csproj.FileListAbsolute.txt
│ │ │ │ │ ├── mcp_delete_source.dll
│ │ │ │ │ ├── mcp_delete_source.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ │ ├── mcp_delete_source.genruntimeconfig.cache
│ │ │ │ │ ├── mcp_delete_source.GlobalUsings.g.cs
│ │ │ │ │ ├── mcp_delete_source.pdb
│ │ │ │ │ ├── ref
│ │ │ │ │ │ └── mcp_delete_source.dll
│ │ │ │ │ └── refint
│ │ │ │ │ └── mcp_delete_source.dll
│ │ │ │ ├── mcp_delete_source.csproj.nuget.dgspec.json
│ │ │ │ ├── mcp_delete_source.csproj.nuget.g.props
│ │ │ │ ├── mcp_delete_source.csproj.nuget.g.targets
│ │ │ │ ├── project.assets.json
│ │ │ │ └── project.nuget.cache
│ │ │ └── Program.cs
│ │ ├── 4.0 mcp_list_groups
│ │ │ ├── bin
│ │ │ │ └── Debug
│ │ │ │ └── net9.0
│ │ │ │ ├── mcp_list_groups.deps.json
│ │ │ │ ├── mcp_list_groups.dll
│ │ │ │ ├── mcp_list_groups.exe
│ │ │ │ ├── mcp_list_groups.pdb
│ │ │ │ ├── mcp_list_groups.runtimeconfig.json
│ │ │ │ └── Newtonsoft.Json.dll
│ │ │ ├── mcp_list_groups.csproj
│ │ │ ├── obj
│ │ │ │ ├── Debug
│ │ │ │ │ └── net9.0
│ │ │ │ │ ├── .NETCoreApp,Version=v9.0.AssemblyAttributes.cs
│ │ │ │ │ ├── apphost.exe
│ │ │ │ │ ├── mcp_list_groups.AssemblyInfo.cs
│ │ │ │ │ ├── mcp_list_groups.AssemblyInfoInputs.cache
│ │ │ │ │ ├── mcp_list_groups.assets.cache
│ │ │ │ │ ├── mcp_list_groups.csproj.AssemblyReference.cache
│ │ │ │ │ ├── mcp_list_groups.csproj.CoreCompileInputs.cache
│ │ │ │ │ ├── mcp_list_groups.csproj.FileListAbsolute.txt
│ │ │ │ │ ├── mcp_list_groups.dll
│ │ │ │ │ ├── mcp_list_groups.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ │ ├── mcp_list_groups.genruntimeconfig.cache
│ │ │ │ │ ├── mcp_list_groups.GlobalUsings.g.cs
│ │ │ │ │ ├── mcp_list_groups.pdb
│ │ │ │ │ ├── mcp_list.EBD5E0D2.Up2Date
│ │ │ │ │ ├── ref
│ │ │ │ │ │ └── mcp_list_groups.dll
│ │ │ │ │ └── refint
│ │ │ │ │ └── mcp_list_groups.dll
│ │ │ │ ├── mcp_list_groups.csproj.nuget.dgspec.json
│ │ │ │ ├── mcp_list_groups.csproj.nuget.g.props
│ │ │ │ ├── mcp_list_groups.csproj.nuget.g.targets
│ │ │ │ ├── project.assets.json
│ │ │ │ └── project.nuget.cache
│ │ │ └── Program.cs
│ │ ├── 4.1 mcp_store_group
│ │ │ ├── bin
│ │ │ │ └── Debug
│ │ │ │ └── net9.0
│ │ │ │ ├── mcp_store_group.deps.json
│ │ │ │ ├── mcp_store_group.dll
│ │ │ │ ├── mcp_store_group.exe
│ │ │ │ ├── mcp_store_group.pdb
│ │ │ │ ├── mcp_store_group.runtimeconfig.json
│ │ │ │ └── Newtonsoft.Json.dll
│ │ │ ├── mcp_store_group.csproj
│ │ │ ├── obj
│ │ │ │ ├── Debug
│ │ │ │ │ └── net9.0
│ │ │ │ │ ├── .NETCoreApp,Version=v9.0.AssemblyAttributes.cs
│ │ │ │ │ ├── apphost.exe
│ │ │ │ │ ├── mcp_stor.AFB4AA35.Up2Date
│ │ │ │ │ ├── mcp_store_group.AssemblyInfo.cs
│ │ │ │ │ ├── mcp_store_group.AssemblyInfoInputs.cache
│ │ │ │ │ ├── mcp_store_group.assets.cache
│ │ │ │ │ ├── mcp_store_group.csproj.AssemblyReference.cache
│ │ │ │ │ ├── mcp_store_group.csproj.CoreCompileInputs.cache
│ │ │ │ │ ├── mcp_store_group.csproj.FileListAbsolute.txt
│ │ │ │ │ ├── mcp_store_group.dll
│ │ │ │ │ ├── mcp_store_group.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ │ ├── mcp_store_group.genruntimeconfig.cache
│ │ │ │ │ ├── mcp_store_group.GlobalUsings.g.cs
│ │ │ │ │ ├── mcp_store_group.pdb
│ │ │ │ │ ├── ref
│ │ │ │ │ │ └── mcp_store_group.dll
│ │ │ │ │ └── refint
│ │ │ │ │ └── mcp_store_group.dll
│ │ │ │ ├── mcp_store_group.csproj.nuget.dgspec.json
│ │ │ │ ├── mcp_store_group.csproj.nuget.g.props
│ │ │ │ ├── mcp_store_group.csproj.nuget.g.targets
│ │ │ │ ├── project.assets.json
│ │ │ │ └── project.nuget.cache
│ │ │ └── Program.cs
│ │ ├── 4.2 mcp_delete_group
│ │ │ ├── bin
│ │ │ │ └── Debug
│ │ │ │ └── net9.0
│ │ │ │ ├── mcp_delete_group.deps.json
│ │ │ │ ├── mcp_delete_group.dll
│ │ │ │ ├── mcp_delete_group.exe
│ │ │ │ ├── mcp_delete_group.pdb
│ │ │ │ ├── mcp_delete_group.runtimeconfig.json
│ │ │ │ └── Newtonsoft.Json.dll
│ │ │ ├── mcp_delete_group.csproj
│ │ │ ├── obj
│ │ │ │ ├── Debug
│ │ │ │ │ └── net9.0
│ │ │ │ │ ├── .NETCoreApp,Version=v9.0.AssemblyAttributes.cs
│ │ │ │ │ ├── apphost.exe
│ │ │ │ │ ├── mcp_dele.FE1C6298.Up2Date
│ │ │ │ │ ├── mcp_delete_group.AssemblyInfo.cs
│ │ │ │ │ ├── mcp_delete_group.AssemblyInfoInputs.cache
│ │ │ │ │ ├── mcp_delete_group.assets.cache
│ │ │ │ │ ├── mcp_delete_group.csproj.AssemblyReference.cache
│ │ │ │ │ ├── mcp_delete_group.csproj.CoreCompileInputs.cache
│ │ │ │ │ ├── mcp_delete_group.csproj.FileListAbsolute.txt
│ │ │ │ │ ├── mcp_delete_group.dll
│ │ │ │ │ ├── mcp_delete_group.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ │ ├── mcp_delete_group.genruntimeconfig.cache
│ │ │ │ │ ├── mcp_delete_group.GlobalUsings.g.cs
│ │ │ │ │ ├── mcp_delete_group.pdb
│ │ │ │ │ ├── ref
│ │ │ │ │ │ └── mcp_delete_group.dll
│ │ │ │ │ └── refint
│ │ │ │ │ └── mcp_delete_group.dll
│ │ │ │ ├── mcp_delete_group.csproj.nuget.dgspec.json
│ │ │ │ ├── mcp_delete_group.csproj.nuget.g.props
│ │ │ │ ├── mcp_delete_group.csproj.nuget.g.targets
│ │ │ │ ├── project.assets.json
│ │ │ │ └── project.nuget.cache
│ │ │ └── Program.cs
│ │ ├── 5.0 mcp_store_user
│ │ │ ├── bin
│ │ │ │ └── Debug
│ │ │ │ └── net9.0
│ │ │ │ ├── mcp_store_user.deps.json
│ │ │ │ ├── mcp_store_user.dll
│ │ │ │ ├── mcp_store_user.exe
│ │ │ │ ├── mcp_store_user.pdb
│ │ │ │ ├── mcp_store_user.runtimeconfig.json
│ │ │ │ └── Newtonsoft.Json.dll
│ │ │ ├── mcp_store_user.csproj
│ │ │ ├── obj
│ │ │ │ ├── Debug
│ │ │ │ │ └── net9.0
│ │ │ │ │ ├── .NETCoreApp,Version=v9.0.AssemblyAttributes.cs
│ │ │ │ │ ├── apphost.exe
│ │ │ │ │ ├── mcp_stor.6C0F0C8A.Up2Date
│ │ │ │ │ ├── mcp_store_user.AssemblyInfo.cs
│ │ │ │ │ ├── mcp_store_user.AssemblyInfoInputs.cache
│ │ │ │ │ ├── mcp_store_user.assets.cache
│ │ │ │ │ ├── mcp_store_user.csproj.AssemblyReference.cache
│ │ │ │ │ ├── mcp_store_user.csproj.CoreCompileInputs.cache
│ │ │ │ │ ├── mcp_store_user.csproj.FileListAbsolute.txt
│ │ │ │ │ ├── mcp_store_user.dll
│ │ │ │ │ ├── mcp_store_user.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ │ ├── mcp_store_user.genruntimeconfig.cache
│ │ │ │ │ ├── mcp_store_user.GlobalUsings.g.cs
│ │ │ │ │ ├── mcp_store_user.pdb
│ │ │ │ │ ├── ref
│ │ │ │ │ │ └── mcp_store_user.dll
│ │ │ │ │ └── refint
│ │ │ │ │ └── mcp_store_user.dll
│ │ │ │ ├── mcp_store_user.csproj.nuget.dgspec.json
│ │ │ │ ├── mcp_store_user.csproj.nuget.g.props
│ │ │ │ ├── mcp_store_user.csproj.nuget.g.targets
│ │ │ │ ├── project.assets.json
│ │ │ │ └── project.nuget.cache
│ │ │ └── Program.cs
│ │ ├── 5.1 mcp_edit_user
│ │ │ ├── bin
│ │ │ │ └── Debug
│ │ │ │ └── net9.0
│ │ │ │ ├── mcp_edit_user.deps.json
│ │ │ │ ├── mcp_edit_user.dll
│ │ │ │ ├── mcp_edit_user.exe
│ │ │ │ ├── mcp_edit_user.pdb
│ │ │ │ ├── mcp_edit_user.runtimeconfig.json
│ │ │ │ └── Newtonsoft.Json.dll
│ │ │ ├── mcp_edit_user.csproj
│ │ │ ├── obj
│ │ │ │ ├── Debug
│ │ │ │ │ └── net9.0
│ │ │ │ │ ├── .NETCoreApp,Version=v9.0.AssemblyAttributes.cs
│ │ │ │ │ ├── apphost.exe
│ │ │ │ │ ├── mcp_edit_user.AssemblyInfo.cs
│ │ │ │ │ ├── mcp_edit_user.AssemblyInfoInputs.cache
│ │ │ │ │ ├── mcp_edit_user.assets.cache
│ │ │ │ │ ├── mcp_edit_user.csproj.AssemblyReference.cache
│ │ │ │ │ ├── mcp_edit_user.csproj.CoreCompileInputs.cache
│ │ │ │ │ ├── mcp_edit_user.csproj.FileListAbsolute.txt
│ │ │ │ │ ├── mcp_edit_user.dll
│ │ │ │ │ ├── mcp_edit_user.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ │ ├── mcp_edit_user.genruntimeconfig.cache
│ │ │ │ │ ├── mcp_edit_user.GlobalUsings.g.cs
│ │ │ │ │ ├── mcp_edit_user.pdb
│ │ │ │ │ ├── mcp_edit.94A30270.Up2Date
│ │ │ │ │ ├── ref
│ │ │ │ │ │ └── mcp_edit_user.dll
│ │ │ │ │ └── refint
│ │ │ │ │ └── mcp_edit_user.dll
│ │ │ │ ├── mcp_edit_user.csproj.nuget.dgspec.json
│ │ │ │ ├── mcp_edit_user.csproj.nuget.g.props
│ │ │ │ ├── mcp_edit_user.csproj.nuget.g.targets
│ │ │ │ ├── project.assets.json
│ │ │ │ └── project.nuget.cache
│ │ │ └── Program.cs
│ │ ├── 5.2 mcp_delete_user
│ │ │ ├── bin
│ │ │ │ └── Debug
│ │ │ │ └── net9.0
│ │ │ │ ├── mcp_delete_user.deps.json
│ │ │ │ ├── mcp_delete_user.dll
│ │ │ │ ├── mcp_delete_user.exe
│ │ │ │ ├── mcp_delete_user.pdb
│ │ │ │ ├── mcp_delete_user.runtimeconfig.json
│ │ │ │ └── Newtonsoft.Json.dll
│ │ │ ├── mcp_delete_user.csproj
│ │ │ ├── obj
│ │ │ │ ├── Debug
│ │ │ │ │ └── net9.0
│ │ │ │ │ ├── .NETCoreApp,Version=v9.0.AssemblyAttributes.cs
│ │ │ │ │ ├── apphost.exe
│ │ │ │ │ ├── mcp_dele.CEB7E33D.Up2Date
│ │ │ │ │ ├── mcp_delete_user.AssemblyInfo.cs
│ │ │ │ │ ├── mcp_delete_user.AssemblyInfoInputs.cache
│ │ │ │ │ ├── mcp_delete_user.assets.cache
│ │ │ │ │ ├── mcp_delete_user.csproj.AssemblyReference.cache
│ │ │ │ │ ├── mcp_delete_user.csproj.CoreCompileInputs.cache
│ │ │ │ │ ├── mcp_delete_user.csproj.FileListAbsolute.txt
│ │ │ │ │ ├── mcp_delete_user.dll
│ │ │ │ │ ├── mcp_delete_user.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ │ ├── mcp_delete_user.genruntimeconfig.cache
│ │ │ │ │ ├── mcp_delete_user.GlobalUsings.g.cs
│ │ │ │ │ ├── mcp_delete_user.pdb
│ │ │ │ │ ├── ref
│ │ │ │ │ │ └── mcp_delete_user.dll
│ │ │ │ │ └── refint
│ │ │ │ │ └── mcp_delete_user.dll
│ │ │ │ ├── mcp_delete_user.csproj.nuget.dgspec.json
│ │ │ │ ├── mcp_delete_user.csproj.nuget.g.props
│ │ │ │ ├── mcp_delete_user.csproj.nuget.g.targets
│ │ │ │ ├── project.assets.json
│ │ │ │ └── project.nuget.cache
│ │ │ └── Program.cs
│ │ ├── Code Archiv
│ │ │ ├── mcp_chat.cs
│ │ │ ├── mcp_continue_chat.cs
│ │ │ ├── mcp_create_source.cs
│ │ │ ├── mcp_delete_group.cs
│ │ │ ├── mcp_delete_source.cs
│ │ │ ├── mcp_delete_user.cs
│ │ │ ├── mcp_edit_source.cs
│ │ │ ├── mcp_edit_user.cs
│ │ │ ├── mcp_get_chat_info.cs
│ │ │ ├── mcp_get_source.cs
│ │ │ ├── mcp_list_groups.cs
│ │ │ ├── mcp_list_sources.cs
│ │ │ ├── mcp_login.cs
│ │ │ ├── mcp_logout.cs
│ │ │ ├── mcp_store_group.cs
│ │ │ └── mcp_store_user.cs
│ │ └── README.md
│ ├── C++
│ │ ├── .vscode
│ │ │ └── launch.json
│ │ ├── 1.0 mcp_login
│ │ │ ├── MCPLoginClient.cpp
│ │ │ └── Non-TLS version
│ │ │ ├── MCPLoginClient.cpp
│ │ │ └── MCPLoginClient.exe
│ │ ├── 1.1 mcp_logout
│ │ │ ├── MCPLogoutClient.cpp
│ │ │ └── MCPLogoutClient.exe
│ │ ├── 2.0 mcp_chat
│ │ │ ├── MCPChatClient.cpp
│ │ │ └── MCPChatClient.exe
│ │ ├── 2.1 mcp_continue_chat
│ │ │ ├── MCPChatContinuationClient.cpp
│ │ │ └── MCPChatContinuationClient.exe
│ │ ├── 2.2 mcp_get_chat_info
│ │ │ ├── MCPGetChatInfoClient.cpp
│ │ │ └── MCPGetChatInfoClient.exe
│ │ ├── 3.0 mcp_create_source
│ │ │ ├── MCPCreateSourceClient.cpp
│ │ │ └── MCPCreateSourceClient.exe
│ │ ├── 3.1 mcp_get_source
│ │ │ ├── MCPGetSourceClient.cpp
│ │ │ └── MCPGetSourceClient.exe
│ │ ├── 3.2 mcp_list_sources
│ │ │ ├── MCPListSourcesClient.cpp
│ │ │ └── MCPListSourcesClient.exe
│ │ ├── 3.3 mcp_edit_source
│ │ │ ├── MCPEditSourceClient.cpp
│ │ │ └── MCPEditSourceClient.exe
│ │ ├── 3.4 mcp_delete_source
│ │ │ ├── MCPDeleteSourceClient.cpp
│ │ │ └── MCPDeleteSourceClient.exe
│ │ ├── 4.0 mcp_list_groups
│ │ │ ├── MCPListGroupsClient.cpp
│ │ │ └── MCPListGroupsClient.exe
│ │ ├── 4.1 mcp_store_group
│ │ │ ├── MCPStoreGroupClient.cpp
│ │ │ └── MCPStoreGroupClient.exe
│ │ ├── 4.2 mcp_delete_group
│ │ │ ├── MPCDeleteGroupClient.cpp
│ │ │ └── MPCDeleteGroupClient.exe
│ │ ├── 5.0 mcp_store_user
│ │ │ ├── MCPStoreUserClient.cpp
│ │ │ └── MCPStoreUserClient.exe
│ │ ├── 5.1 mcp_edit_user
│ │ │ ├── MCPEditUserClient.cpp
│ │ │ └── MCPEditUserClient.exe
│ │ ├── 5.2 mcp_delete_user
│ │ │ ├── MCPDeleteUserClient.cpp
│ │ │ └── MCPDeleteUserClient.exe
│ │ ├── 9.0 mcp_keygen
│ │ │ ├── MCPKeygenClient.cpp
│ │ │ └── MCPKeygenClient.exe
│ │ └── README.md
│ ├── Go
│ │ ├── 1.0 mcp_login
│ │ │ ├── go.mod
│ │ │ ├── MCPLoginClient.exe
│ │ │ └── MCPLoginClient.go
│ │ ├── 1.1 mcp_logout
│ │ │ ├── MCPLogoutClient.exe
│ │ │ └── MCPLogoutClient.go
│ │ ├── 2.0 mcp_chat
│ │ │ ├── MCPChatClient.exe
│ │ │ └── MCPChatClient.go
│ │ ├── 2.1 mcp_continue_chat
│ │ │ ├── MCPChatContinuationClient.exe
│ │ │ └── MCPChatContinuationClient.go
│ │ ├── 2.2 mcp_get_chat_info
│ │ │ ├── MCPGetChatInfoClient.exe
│ │ │ └── MCPGetChatInfoClient.go
│ │ ├── 3.0 mcp_create_source
│ │ │ ├── MCPCreateSourceClient.exe
│ │ │ └── MCPCreateSourceClient.go
│ │ ├── 3.1 mcp_get_source
│ │ │ ├── MCPGetSourceClient.exe
│ │ │ └── MCPGetSourceClient.go
│ │ ├── 3.2 mcp_list_sources
│ │ │ ├── MCPListSourcesClient.exe
│ │ │ └── MCPListSourcesClient.go
│ │ ├── 3.3 mcp_edit_source
│ │ │ ├── MCPEditSourceClient.exe
│ │ │ └── MCPEditSourceClient.go
│ │ ├── 3.4 mcp_delete_source
│ │ │ ├── MCPDeleteSourceClient.exe
│ │ │ └── MCPDeleteSourceClient.go
│ │ ├── 4.0 mcp_list_groups
│ │ │ ├── MCPListGroupsClient.exe
│ │ │ └── MCPListGroupsClient.go
│ │ ├── 4.1 mcp_store_group
│ │ │ ├── MCPStoreGroupClient.exe
│ │ │ └── MCPStoreGroupClient.go
│ │ ├── 4.2 mcp_delete_group
│ │ │ ├── MCPDeleteGroupClient.exe
│ │ │ └── MCPDeleteGroupClient.go
│ │ ├── 5.0 mcp_store_user
│ │ │ ├── MCPStoreUserClient.exe
│ │ │ └── MCPStoreUserClient.go
│ │ ├── 5.1 mcp_edit_user
│ │ │ ├── MCPEditUserClient.exe
│ │ │ └── MCPEditUserClient.go
│ │ ├── 5.2 mcp_delete_user
│ │ │ ├── MCPDeleteUserClient.exe
│ │ │ └── MCPDeleteUserClient.go
│ │ ├── 9.0 mcp_keygen
│ │ │ ├── MCPKeygenClient.exe
│ │ │ └── MCPKeygenClient.go
│ │ └── README.md
│ ├── Gradio
│ │ ├── Api.py
│ │ ├── config.json.example
│ │ ├── config.py
│ │ ├── favicon.ico
│ │ ├── file_tools
│ │ │ └── loader_factory.py
│ │ ├── language.py
│ │ ├── logos
│ │ │ ├── fsas.png
│ │ │ └── Logo_dark.svg
│ │ ├── main.py
│ │ ├── mcp_client.py
│ │ ├── mcp_servers
│ │ │ ├── arxiv
│ │ │ │ ├── arxiv-stdio.js
│ │ │ │ ├── package.json
│ │ │ │ ├── README.md
│ │ │ │ ├── requirements.txt
│ │ │ │ └── server_config.example.json
│ │ │ ├── demo-mcp-server
│ │ │ │ ├── demo-tools-sse.js
│ │ │ │ ├── demo-tools-stdio.js
│ │ │ │ └── tools
│ │ │ │ ├── assets.js
│ │ │ │ ├── calculator.js
│ │ │ │ └── weather.js
│ │ │ ├── filesystem
│ │ │ │ ├── Dockerfile
│ │ │ │ ├── index.ts
│ │ │ │ ├── package.json
│ │ │ │ ├── README.md
│ │ │ │ ├── test
│ │ │ │ │ └── new.txt
│ │ │ │ └── tsconfig.json
│ │ │ ├── moondream
│ │ │ │ └── server.py
│ │ │ ├── pgpt
│ │ │ │ ├── __init__.py
│ │ │ │ ├── Api.py
│ │ │ │ ├── config.json.example
│ │ │ │ ├── config.py
│ │ │ │ ├── language.py
│ │ │ │ ├── pyproject.toml
│ │ │ │ ├── README.md
│ │ │ │ └── server.py
│ │ │ ├── replicate_flux
│ │ │ │ └── server.py
│ │ │ └── sqlite
│ │ │ ├── .python-version
│ │ │ ├── Dockerfile
│ │ │ ├── pyproject.toml
│ │ │ ├── README.md
│ │ │ └── src
│ │ │ └── mcp_server_sqlite
│ │ │ ├── __init__.py
│ │ │ └── server.py
│ │ ├── messages
│ │ │ ├── __init__.py
│ │ │ ├── message_types
│ │ │ │ ├── __init__.py
│ │ │ │ ├── incrementing_id_message.py
│ │ │ │ ├── initialize_message.py
│ │ │ │ ├── json_rpc_message.py
│ │ │ │ ├── ping_message.py
│ │ │ │ ├── prompts_messages.py
│ │ │ │ ├── prompts_models.py
│ │ │ │ ├── resources_messages.py
│ │ │ │ └── tools_messages.py
│ │ │ ├── send_call_tool.py
│ │ │ ├── send_initialize_message.py
│ │ │ ├── send_message.py
│ │ │ ├── send_ping.py
│ │ │ ├── send_prompts.py
│ │ │ ├── send_resources.py
│ │ │ └── send_tools_list.py
│ │ ├── README.md
│ │ ├── requirements.txt
│ │ ├── server_config.json
│ │ ├── SourceManagement.py
│ │ ├── transport
│ │ │ ├── __init__.py
│ │ │ └── stdio
│ │ │ ├── __init__.py
│ │ │ ├── stdio_client.py
│ │ │ ├── stdio_server_parameters.py
│ │ │ └── stdio_server_shutdown.py
│ │ ├── tsconfig.json
│ │ └── UserManagement.py
│ ├── Java
│ │ ├── 1.0 mcp_login
│ │ │ ├── json-20241224.jar
│ │ │ ├── MCPLoginClient.class
│ │ │ └── MCPLoginClient.java
│ │ ├── 1.1 mcp_logout
│ │ │ ├── json-20241224.jar
│ │ │ ├── MCPLogoutClient.class
│ │ │ └── MCPLogoutClient.java
│ │ ├── 2.0 mcp_chat
│ │ │ ├── json-20241224.jar
│ │ │ ├── MCPChatClient.class
│ │ │ └── MCPChatClient.java
│ │ ├── 2.1 mcp_continue_chat
│ │ │ ├── json-20241224.jar
│ │ │ ├── MCPContinueChatClient.class
│ │ │ └── MCPContinueChatClient.java
│ │ ├── 2.2 mcp_get_chat_info
│ │ │ ├── json-20241224.jar
│ │ │ ├── MCPGetChatInfoClient.class
│ │ │ └── MCPGetChatInfoClient.java
│ │ ├── 3.0 mcp_create_source
│ │ │ ├── json-20241224.jar
│ │ │ ├── MCPCreateSourceClient.class
│ │ │ └── MCPCreateSourceClient.java
│ │ ├── 3.1 mcp_get_source
│ │ │ ├── json-20241224.jar
│ │ │ ├── MCPGetSourceClient.class
│ │ │ └── MCPGetSourceClient.java
│ │ ├── 3.2 mcp_list_sources
│ │ │ ├── json-20241224.jar
│ │ │ ├── MCPListSourcesClient.class
│ │ │ └── MCPListSourcesClient.java
│ │ ├── 3.3 mcp_edit_source
│ │ │ ├── json-20241224.jar
│ │ │ ├── MCPEditSourceClient.class
│ │ │ └── MCPEditSourceClient.java
│ │ ├── 3.4 mcp_delete_source
│ │ │ ├── json-20241224.jar
│ │ │ ├── MCPDeleteSourceClient.class
│ │ │ └── MCPDeleteSourceClient.java
│ │ ├── 4.0 mcp_list_groups
│ │ │ ├── json-20241224.jar
│ │ │ ├── MCPListGroupsClient.class
│ │ │ └── MCPListGroupsClient.java
│ │ ├── 4.1 mcp_store_group
│ │ │ ├── json-20241224.jar
│ │ │ ├── MCPStoreGroupClient.class
│ │ │ └── MCPStoreGroupClient.java
│ │ ├── 4.2 mcp_delete_group
│ │ │ ├── json-20241224.jar
│ │ │ ├── MCPDeleteGroupClient.class
│ │ │ └── MCPDeleteGroupClient.java
│ │ ├── 5.0 mcp_store_user
│ │ │ ├── json-20241224.jar
│ │ │ ├── MCPStoreUserClient.class
│ │ │ └── MCPStoreUserClient.java
│ │ ├── 5.1 mcp_edit_user
│ │ │ ├── json-20241224.jar
│ │ │ ├── MCPEditUserClient.class
│ │ │ └── MCPEditUserClient.java
│ │ ├── 5.2 mcp_delete_user
│ │ │ ├── json-20241224.jar
│ │ │ ├── MCPDeleteUserClient.class
│ │ │ └── MCPDeleteUserClient.java
│ │ └── README.md
│ ├── JavaScript
│ │ ├── 1.0 mcp_login
│ │ │ └── MCPLoginClient.js
│ │ ├── 1.1 mcp_logout
│ │ │ └── MCPLogoutClient.js
│ │ ├── 2.0 mcp_chat
│ │ │ └── MCPChatClient.js
│ │ ├── 2.1 mcp_continue_chat
│ │ │ └── MCPContinueChatClient.js
│ │ ├── 2.2 mcp_get_chat_info
│ │ │ └── MCPGetChatInfoClient.js
│ │ ├── 3.0 mcp_create_source
│ │ │ └── MCPCreateSourceClient.js
│ │ ├── 3.1 mcp_get_source
│ │ │ └── MCPGetSourceClient.js
│ │ ├── 3.2 mcp_list_sources
│ │ │ └── MCPListSourcesClient.js
│ │ ├── 3.3 mcp_edit_source
│ │ │ └── MCPEditSourceClient.js
│ │ ├── 3.4 mcp_delete_source
│ │ │ └── MCPDeleteSourceClient.js
│ │ ├── 4.0 mcp_list_groups
│ │ │ └── MCPListGroupsClient.js
│ │ ├── 4.1 mcp_store_group
│ │ │ └── MCPStoreGroupClient.js
│ │ ├── 4.2 mcp_delete_group
│ │ │ └── MCPDeleteGroupClient.js
│ │ ├── 5.0 mcp_store_user
│ │ │ └── MCPStoreUserClient.js
│ │ ├── 5.1 mcp_edit_user
│ │ │ └── MCPEditUserClient.js
│ │ ├── 5.2 mcp_delete_user
│ │ │ └── MCPDeleteUserClient.js
│ │ ├── 9.0 mcp_keygen
│ │ │ └── MCPKeygenClient.js
│ │ └── README.md
│ ├── PHP
│ │ ├── 1.0 mcp_login
│ │ │ └── MCPLoginClient.php
│ │ ├── 1.1 mcp_logout
│ │ │ └── MCPLogoutClient.php
│ │ ├── 2.0 mcp_chat
│ │ │ └── MCPChatClient.php
│ │ ├── 2.1 mcp_continue_chat
│ │ │ └── MCPContinueChatClient.php
│ │ ├── 2.2 mcp_get_chat_info
│ │ │ └── MCPGetChatInfoClient.php
│ │ ├── 3.0 mcp_create_source
│ │ │ └── MCPCreateSourceClient.php
│ │ ├── 3.1 mcp_get_source
│ │ │ └── MCPGetSourceClient.php
│ │ ├── 3.2 mcp_list_sources
│ │ │ └── MCPListSourcesClient.php
│ │ ├── 3.3 mcp_edit_source
│ │ │ └── MCPEditSourceClient.php
│ │ ├── 3.4 mcp_delete_source
│ │ │ └── MCPDeleteSourceClient.php
│ │ ├── 4.0 mcp_list_groups
│ │ │ └── MCPListGroupsClient.php
│ │ ├── 4.1 mcp_store_group
│ │ │ └── MCPStoreGroupClient.php
│ │ ├── 4.2 mcp_delete_group
│ │ │ └── MCPDeleteGroupClient.php
│ │ ├── 5.0 mcp_store_user
│ │ │ └── MCPStoreUserClient.php
│ │ ├── 5.1 mcp_edit_user
│ │ │ └── MCPEditUserClient.php
│ │ ├── 5.2 mcp_delete_user
│ │ │ └── MCPDeleteUserClient.php
│ │ ├── 9.0 mcp_keygen
│ │ │ └── MCPKeygenClient.php
│ │ └── README.md
│ └── Python
│ ├── __init__.py
│ ├── 1.0 mcp_login
│ │ └── MCPLoginClient.py
│ ├── 1.1 mcp_logout
│ │ └── MCPLogoutClient.py
│ ├── 2.0 mcp_chat
│ │ └── MCPChatClient.py
│ ├── 2.1 mcp_continue_chat
│ │ └── MCPContinueChatClient.py
│ ├── 2.2 mcp_get_chat_info
│ │ └── MCPGetChatInfoClient.py
│ ├── 2.3 mcp_delete_all_chats
│ │ └── MCPDeleteAllChatsClient.py
│ ├── 2.4 mcp_delete_chat
│ │ └── MCPDeleteChatClient.py
│ ├── 3.0 mcp_create_source
│ │ └── MCPCreateSourceClient.py
│ ├── 3.1 mcp_get_source
│ │ └── MCPGetSourceClient.py
│ ├── 3.2 mcp_list_sources
│ │ └── MCPListSourcesClient.py
│ ├── 3.3 mcp_edit_source
│ │ └── MCPEditSourceClient.py
│ ├── 3.4 mcp_delete_source
│ │ └── MCPDeleteSourceClient.py
│ ├── 4.0 mcp_list_groups
│ │ └── MCPListGroupsClient.py
│ ├── 4.1 mcp_store_group
│ │ └── MCPStoreGroupClient.py
│ ├── 4.2 mcp_delete_group
│ │ └── MCPDeleteGroupClient.py
│ ├── 5.0 mcp_store_user
│ │ └── MCPStoreUserClient.py
│ ├── 5.1 mcp_edit_user
│ │ └── MCPEditUserClient.py
│ ├── 5.2 mcp_delete_user
│ │ └── MCPDeleteUserClient.py
│ ├── 9.0 mcp_keygen
│ │ └── MCPKeygenClient.py
│ ├── Gradio
│ │ ├── __init__.py
│ │ └── server_config.json
│ └── README.md
├── examples
│ ├── create_users_from_csv
│ │ ├── config.json.example
│ │ ├── config.py
│ │ ├── create_users_from_csv.py
│ │ └── language.py
│ ├── dynamic_sources
│ │ └── rss_reader
│ │ ├── Api.py
│ │ ├── config.json.example
│ │ ├── config.py
│ │ ├── demo_dynamic_sources.py
│ │ └── rss_parser.py
│ ├── example_users_to_add_no_tz.csv
│ └── sftp_upload_with_id
│ ├── Api.py
│ ├── config_ftp.json.example
│ ├── config.py
│ ├── demo_upload.py
│ ├── language.py
│ └── requirements.txt
├── images
│ ├── alternative mcp client.png
│ ├── favicon
│ │ ├── android-chrome-192x192.png
│ │ ├── android-chrome-512x512.png
│ │ ├── apple-touch-icon.png
│ │ ├── favicon-16x16.png
│ │ ├── favicon-32x32.png
│ │ ├── favicon.ico
│ │ └── site.webmanifest
│ ├── mcp-general-architecture.png
│ ├── privateGPT-MCP.png
│ └── privateGPT.png
├── InstallMPCServer.sh
├── jest.config.js
├── LICENSE
├── package.json
├── pgpt.env.json.example
├── README.md
├── security
│ ├── generate_decrypted_password.js
│ └── generate_encrypted_password.js
├── src
│ ├── helper.js
│ ├── index.js
│ ├── logger.js
│ ├── pgpt-messages.js
│ ├── public
│ │ ├── index.html
│ │ └── pgpt-mcp-logo.png
│ ├── services
│ │ └── pgpt-service.ts
│ └── types
│ └── api.ts
├── start_chatbot_agent.ps1
├── start_chatbot_agent.sh
├── start_iot_agent.ps1
├── start_iot_agent.sh
├── start_openai_compatible_api_agent.ps1
├── start_openai_compatible_api_agent.sh
├── tsconfig.json
├── ver
│ ├── index_np.js
│ └── index_proxy_np.js
└── WORKLOG.md
```
# Files
--------------------------------------------------------------------------------
/clients/C++/README.md:
--------------------------------------------------------------------------------
```markdown
1 | # MCP Client Examples (C++)
2 | This repository contains examples for interacting with the MCP server using **C++**. Each console application demonstrates a specific operation and its corresponding server interaction.
3 |
4 | ## Main Menu
5 | Choose an operation from the list below. Each example demonstrates a specific server interaction.
6 |
7 | ### 1. Authentication
8 | [1.1 Login User](#10-mcploginclient)
9 | [1.2 Logout User](#12-mcplogoutclient)
10 |
11 | ### 2. Chat Operations
12 | [2.1 Start a New Chat](#20-mcpchatclient)
13 | [2.2 Continue a Chat Session](#21-mcpcontinuechatclient)
14 | [2.3 Retrieve Chat Info](#22-mcpgetchatinfoClient)
15 |
16 | ### 3. Source Management
17 | [3.1 Create a New Source](#30-mcpcreatesourceclient)
18 | [3.2 Retrieve Source Details](#31-mcpgetsourceclient)
19 | [3.3 List All Sources in a Group](#32-mcplistsourcesclient)
20 | [3.4 Edit an Existing Source](#33-mcpeditsourceclient)
21 | [3.5 Delete a Source](#34-mcpdeletesourceclient)
22 |
23 | ### 4. Group Management
24 | [4.1 List All Groups](#40-mcplistgroupsclient)
25 | [4.2 Create/Update a Group](#41-mcpstoregroupclient)
26 | [4.3 Delete a Group](#42-mcpdeletegroupclient)
27 |
28 | ### 5. User Management
29 | [5.1 Create/Update a User](#50-mcpstoreuserclient)
30 | [5.2 Edit User Details](#51-mcpedituserclient)
31 | [5.3 Delete a User](#52-mcpdeleteuserclient)
32 |
33 | ---
34 |
35 |
36 | ### 1.0 MCPLoginClient
37 | - **Purpose**: Handles user authentication by sending login requests to the MCP server.
38 |
39 | - **Main Features**:
40 | - Sends a `login` command to the server with user credentials.
41 | - Handles JSON-based requests and parses the server's response.
42 |
43 | - **Key Arguments**:
44 | - `--server-ip`: IP address of the MCP server.
45 | - `--server-port`: Port number of the MCP server.
46 | - `--email`: User email for authentication.
47 | - `--password`: User password for authentication.
48 |
49 | - **Usage Example**:
50 | ```bash
51 | MCPLoginClient.exe --server-ip 127.0.0.1 --server-port 1234 --email [email protected] --password secret
52 | ```
53 |
54 | ### 1.2 MCPLogoutClient
55 | - **Purpose**: Logs out an authenticated user by invalidating their session token.
56 |
57 | - **Main Features**:
58 | - Sends a `logout` command to the server.
59 | - Invalidates the token provided in the request.
60 |
61 | - **Key Arguments**:
62 | - `--server-ip`: IP address of the MCP server.
63 | - `--server-port`: Port number of the MCP server.
64 | - `--token`: Authentication token to be invalidated.
65 |
66 | - **Usage Example**:
67 | ```bash
68 | MCPLogoutClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken
69 | ```
70 |
71 | ---
72 |
73 | ### 2.0 MCPChatClient
74 | - **Purpose**: Initiates a new chat session with the MCP server.
75 |
76 | - **Main Features**:
77 | - Sends a `chat` command to the server with a question.
78 | - Supports optional parameters for public chats, groups, and language.
79 |
80 | - **Key Arguments**:
81 | - `--server-ip`: IP address of the MCP server.
82 | - `--server-port`: Port number of the MCP server.
83 | - `--token`: Authentication token.
84 | - `--question`: Initial question for the chat session.
85 | - `--use-public`: Optional flag for public chat.
86 | - `--groups`: Optional group list.
87 | - `--language`: Optional language parameter.
88 |
89 | - **Usage Example**:
90 | ```bash
91 | MCPChatClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --question "Hello World" --use-public --groups "devops,hr" --language en
92 | ```
93 |
94 | ### 2.1 MCPContinueChatClient
95 | - **Purpose**: Continues an existing chat session by sending follow-up messages.
96 |
97 | - **Main Features**:
98 | - Sends a `continue_chat` command to the server.
99 | - Provides the conversation ID and follow-up message.
100 |
101 | - **Key Arguments**:
102 | - `--server-ip`: IP address of the MCP server.
103 | - `--server-port`: Port number of the MCP server.
104 | - `--token`: Authentication token.
105 | - `--conversation-id`: ID of the conversation to continue.
106 | - `--message`: Follow-up message.
107 |
108 | - **Usage Example**:
109 | ```bash
110 | MCPContinueChatClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --conversation-id 12345 --message "Can you provide an update?"
111 | ```
112 |
113 | ### 2.2 MCPGetChatInfoClient
114 | - **Purpose**: Retrieves metadata and status information about an existing chat session.
115 |
116 | - **Main Features**:
117 | - Sends a `get_chat_info` command to the server.
118 | - Extracts and displays information about the chat session.
119 |
120 | - **Key Arguments**:
121 | - `--server-ip`: IP address of the MCP server.
122 | - `--server-port`: Port number of the MCP server.
123 | - `--token`: Authentication token.
124 | - `--chat-id`: ID of the chat session to retrieve information for.
125 |
126 | - **Usage Example**:
127 | ```bash
128 | MCPGetChatInfoClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --chat-id 6789
129 | ```
130 |
131 | ---
132 |
133 | ### 3.0 MCPCreateSourceClient
134 | - **Purpose**: Creates a new source on the MCP server and associates it with specified groups.
135 |
136 | - **Main Features**:
137 | - Sends a `create_source` command with details such as name, content, and associated groups.
138 | - Provides robust error handling for missing arguments and server communication issues.
139 |
140 | - **Key Arguments**:
141 | - `--server-ip`: IP address of the MCP server.
142 | - `--server-port`: Port number of the MCP server.
143 | - `--token`: Authentication token for the session.
144 | - `--name`: Name of the source to create.
145 | - `--content`: Content of the source in plain text or markdown.
146 | - `--groups`: (Optional) List of groups to associate with the source.
147 |
148 | - **Usage Example**:
149 | ```bash
150 | MCPCreateSourceClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --name "Sample Source" --content "This is a test content" --groups devops hr
151 | ```
152 |
153 | ---
154 |
155 | ### 3.1 MCPGetSourceClient
156 | - **Purpose**: Fetches detailed information about a specific source from the MCP server.
157 |
158 | - **Main Features**:
159 | - Sends a `get_source` command to the server with the source ID as a parameter.
160 | - Retrieves and displays the source's metadata and contents.
161 |
162 | - **Key Arguments**:
163 | - `--server-ip`: IP address of the MCP server.
164 | - `--server-port`: Port number of the MCP server.
165 | - `--token`: Authentication token for the server.
166 | - `--source-id`: Unique ID of the source to retrieve.
167 |
168 | - **Usage Example**:
169 | ```bash
170 | MCPGetSourceClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --source-id 12345
171 | ```
172 |
173 | ### 3.2 MCPListSourcesClient
174 | - **Purpose**: Lists all sources belonging to a specified group on the MCP server.
175 |
176 | - **Main Features**:
177 | - Sends a `list_sources` command with the group name as a parameter.
178 | - Displays a list of sources available in the specified group.
179 |
180 | - **Key Arguments**:
181 | - `--server-ip`: IP address of the MCP server.
182 | - `--server-port`: Port number of the MCP server.
183 | - `--token`: Authentication token for the server.
184 | - `--group-name`: Name of the group for which to list sources.
185 |
186 | - **Usage Example**:
187 | ```bash
188 | MCPListSourcesClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --group-name devops
189 | ```
190 |
191 | ### 3.3 MCPEditSourceClient
192 | - **Purpose**: Edits the details of an existing source on the MCP server.
193 |
194 | - **Main Features**:
195 | - Sends an `edit_source` command with optional updates for the source title, content, and group associations.
196 | - Supports adding or updating multiple groups for the source.
197 |
198 | - **Key Arguments**:
199 | - `--server-ip`: IP address of the MCP server.
200 | - `--server-port`: Port number of the MCP server.
201 | - `--token`: Authentication token for the server.
202 | - `--source-id`: ID of the source to edit.
203 | - `--title`: (Optional) New title for the source.
204 | - `--content`: (Optional) New content for the source.
205 | - `--groups`: (Optional) List of groups to associate with the source.
206 |
207 | - **Usage Example**:
208 | ```bash
209 | MCPEditSourceClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --source-id 12345 --title "Updated Title" --content "Updated content for the source." --groups devops finance
210 | ```
211 |
212 | ### 3.4 MCPDeleteSourceClient
213 | - **Purpose**: Deletes a specific source from the MCP server.
214 |
215 | - **Main Features**:
216 | - Sends a `delete_source` command to remove the source identified by its ID.
217 |
218 | - **Key Arguments**:
219 | - `--server-ip`: IP address of the MCP server.
220 | - `--server-port`: Port number of the MCP server.
221 | - `--token`: Authentication token for the server.
222 | - `--source-id`: ID of the source to delete.
223 |
224 | - **Usage Example**:
225 | ```bash
226 | MCPDeleteSourceClient.exe --server-ip 127.0.0.1 --server-port 1234 -token MyToken --source-id 12345
227 | ```
228 |
229 | ---
230 |
231 | ### 4.0 MCPListGroupsClient
232 | - **Purpose**:
233 | Lists all the groups available on the MCP server.
234 |
235 | - **Main Features**:
236 | - Sends a `list_groups` command to retrieve the available groups.
237 | - Outputs the groups in JSON format.
238 |
239 | - **Key Arguments**:
240 | - `--server-ip`: IP address of the MCP server.
241 | - `--server-port`: Port number of the MCP server.
242 | - `--token`: Authentication token for the session.
243 |
244 | - **Usage Example**:
245 | ```bash
246 | MCPListGroupsClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken
247 | ```
248 |
249 | ### 4.1 MCPStoreGroupClient
250 | - **Purpose**:
251 | - Creates or updates a group on the MCP server.
252 |
253 | - **Main Features**:
254 | - Sends a `store_group` command with the group's name and description.
255 | - Allows creation of new groups or modification of existing ones.
256 |
257 | - **Key Arguments**:
258 | - `--server-ip`: IP address of the MCP server.
259 | - `--server-port`: Port number of the MCP server.
260 | - `--token`: Authentication token for the session.
261 | - `--group-name`: Name of the group to create or update.
262 | - `--description`: (Optional) Description of the group.
263 |
264 | - **Usage Example**:
265 | ```bash
266 | MCPStoreGroupClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --group-name "Team DevOps" --description "Group for development and operations"
267 | ```
268 |
269 | ### 4.2 MCPDeleteGroupClient
270 | - **Purpose**:
271 | - Deletes a specified group from the MCP server.
272 |
273 | - **Main Features**:
274 | - Sends a `delete_group` command with the group name.
275 | - Ensures the group is removed from the server.
276 |
277 | - **Key Arguments**:
278 | - `--server-ip`: IP address of the MCP server.
279 | - `--server-port`: Port number of the MCP server.
280 | - `--token`: Authentication token for the session.
281 | - `--group-name`: Name of the group to delete.
282 |
283 | - **Usage Example**:
284 | ```bash
285 | MCPDeleteGroupClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --group-name "Team DevOps"
286 | ```
287 |
288 | ---
289 |
290 | ### 5.0 MCPStoreUserClient
291 | - **Purpose:** Creates or updates user details on the MCP server.
292 |
293 | - **Main Features:**
294 | - Sends a `store_user` command with comprehensive user details.
295 | - Allows specification of default values for language and timezone if not provided.
296 |
297 | - **Key Arguments:**
298 | - `--server-ip`: IP address of the MCP server.
299 | - `--server-port`: Port number of the MCP server.
300 | - `--token`: Authentication token.
301 | - `--name`: Name of the user.
302 | - `--email`: Email address of the user.
303 | - `--password`: Password for the user account.
304 | - `--language` (Optional): User's preferred language (default: "en").
305 | - `--timezone` (Optional): User's timezone (default: "Europe/Berlin").
306 | - `--roles` (Optional): Roles assigned to the user.
307 | - `--groups` (Optional): Groups the user belongs to.
308 | - `--usePublic` (Optional): Flag to set the user as public.
309 | - `--activateFtp` (Optional): Flag to activate FTP access.
310 | - `--ftpPassword` (Optional): Password for FTP access.
311 |
312 | **Usage Example:**
313 | ```bash
314 | MCPStoreUserClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --name John --email [email protected] --password secret --language en --roles admin manager --groups devops finance --usePublic --activateFtp --ftpPassword ftpPass123
315 | ```
316 |
317 | ### 5.1 MCPEditUserClient
318 | - **Purpose:** Modifies the details of an existing user on the MCP server.
319 |
320 | - **Main Features:**
321 | - Sends an `edit_user` command with the specified user details.
322 | - Supports conditional sending of fields to avoid unnecessary data transmission.
323 |
324 | - **Key Arguments:**
325 | - `--server-ip`: IP address of the MCP server.
326 | - `--server-port`: Port number of the MCP server.
327 | - `--token`: Authentication token.
328 | - `--user-id`: ID of the user to modify.
329 | - `--name` (Optional): New name of the user.
330 | - `--email` (Optional): New email for the user.
331 | - `--password` (Optional): New password for the user.
332 | - `--language` (Optional): New language for the user.
333 | - `--timezone` (Optional): New timezone for the user.
334 | - `--roles` (Optional): New roles for the user.
335 | - `--groups` (Optional): New groups for the user.
336 | - `--usePublic` (Optional): Flag to set the user as public.
337 | - `--activateFtp` (Optional): Flag to activate FTP for the user.
338 | - `--ftpPassword` (Optional): New password for FTP access.
339 |
340 | - **Usage Example:**
341 | ```bash
342 | MCPEditUserClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --user-id 12345 --name Jane --roles manager devops --groups hr devops
343 | ```
344 |
345 | ### 5.2 MCPDeleteUserClient
346 | - **Purpose:** Deletes a user from the MCP server.
347 |
348 | - **Main Features:**
349 | - Sends a `delete_user` command using the user's email as an identifier.
350 |
351 | - **Key Arguments:**
352 | - `--server-ip`: IP address of the MCP server.
353 | - `--server-port`: Port number of the MCP server.
354 | - `--email`: Email address of the user to delete.
355 | - `--token`: Authentication token.
356 |
357 | - **Usage Example:**
358 | ```bash
359 | MCPDeleteUserClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --email [email protected]
360 | ```
361 |
362 | ---
363 |
364 | ## General Notes
365 | **JSON Communication:**
366 | - Each file constructs and sends JSON payloads specific to its functionality.
367 | - Responses from the server are parsed and displayed in JSON format.
368 |
369 | **Socket Communication:**
370 | - The files use C++'s Socket class for establishing TCP connections with the MCP server.
371 |
372 | **Error Handling:**
373 | - The scripts handle missing or invalid arguments gracefully, printing clear usage instructions where necessary.
374 |
375 | **Examples:**
376 | - Replace placeholders (e.g., `<SERVER_IP>`, `<TOKEN>`) with actual values relevant to your environment.
377 |
378 | ## Prerequisites and Dependencies:
379 | 1. **C-Compiler**: Those agents have been build using g++.
380 | 2. **JsonCpp **: The examples use the `JsonCpp ` library for JSON serialization/deserialization.
381 |
382 | ## Build
383 | Each C++ console application is designed to perform a specific operation. Below are the details for compiling an example application, in this case MCPKeygenClient:
384 | ```bash
385 | g++ -std=c++17 -o .\MCPKeygenClient .\MCPKeygenClient.cpp -I"C:\msys64\mingw64\include" -L"C:\msys64\mingw64\lib" -ljsoncpp -lws2_32
386 | ```
387 |
388 | ## Error Handling
389 | Both clients include error handling for:
390 | - Missing or invalid parameters.
391 | - Server connection issues.
392 | - Unexpected server responses.
393 |
394 | ## Future Enhancements
395 | - Add support for SSL/TLS encryption for secure communication.
396 | - Implement a configuration file to simplify the command-line parameters.
397 | - Enhance error reporting with detailed server-side error codes.
398 |
399 | ## License
400 | This project is licensed under the MIT License - see the LICENSE file for details.
401 | This repository and/or code is provided "as is" without warranty of any kind, and use is at your own risk.
402 |
403 |
404 |
```
--------------------------------------------------------------------------------
/clients/PHP/README.md:
--------------------------------------------------------------------------------
```markdown
1 | # MCP Agent Examples (PHP)
2 | This repository contains examples for interacting with the MCP server using **PHP**. Each console application demonstrates a specific operation and its corresponding server interaction.
3 |
4 | ## Main Menu
5 | Choose an operation from the list below. Each example demonstrates a specific server interaction.
6 |
7 | ### 1. Authentication
8 | [1.1 Login User](#10-mcploginclient)
9 | [1.2 Logout User](#12-mcplogoutclient)
10 |
11 | ### 2. Chat Operations
12 | [2.1 Start a New Chat](#20-mcpchatclient)
13 | [2.2 Continue a Chat Session](#21-mcpcontinuechatclient)
14 | [2.3 Retrieve Chat Info](#22-mcpgetchatinfoclient)
15 |
16 | ### 3. Source Management
17 | [3.1 Create a New Source](#30-mcpcreatesourceclient)
18 | [3.2 Retrieve Source Details](#31-mcpgetsourceclient)
19 | [3.3 List All Sources in a Group](#32-mcplistsourcesclient)
20 | [3.4 Edit an Existing Source](#33-mcpeditsourceclient)
21 | [3.5 Delete a Source](#34-mcpdeletesourceclient)
22 |
23 | ### 4. Group Management
24 | [4.1 List All Groups](#40-mcplistgroupsclient)
25 | [4.2 Create/Update a Group](#41-mcpstoregroupclient)
26 | [4.3 Delete a Group](#42-mcpdeletegroupclient)
27 |
28 | ### 5. User Management
29 | [5.1 Create/Update a User](#50-mcpstoreuserclient)
30 | [5.2 Edit User Details](#51-mcpedituserclient)
31 | [5.3 Delete a User](#52-mcpdeleteuserclient)
32 |
33 | ---
34 |
35 | ### 1.0 MCPLoginClient
36 | - **Purpose**: Handles user authentication by sending login requests to the MCP server.
37 |
38 | - **Main Features**:
39 | - Sends a `login` command to the server with user credentials.
40 | - Handles JSON-based requests and parses the server's response.
41 |
42 | - **Key Arguments**:
43 | - `--server-ip`: IP address of the MCP server.
44 | - `--server-port`: Port number of the MCP server.
45 | - `--email`: User email for authentication.
46 | - `--password`: User password for authentication.
47 |
48 | - **Usage Example**:
49 | ```bash
50 | php MCPLoginClient.php ^
51 | --server-ip 127.0.0.1 ^
52 | --server-port 1234 ^
53 | --email [email protected] ^
54 | --password secret
55 | ```
56 |
57 | ### 1.2 MCPLogoutClient
58 | - **Purpose**: Logs out an authenticated user by invalidating their session token.
59 |
60 | - **Main Features**:
61 | - Sends a `logout` command to the server.
62 | - Invalidates the token provided in the request.
63 |
64 | - **Key Arguments**:
65 | - `--server-ip`: IP address of the MCP server.
66 | - `--server-port`: Port number of the MCP server.
67 | - `--token`: Authentication token to be invalidated.
68 |
69 | - **Usage Example**:
70 | ```bash
71 | php MCPLogoutClient.php ^
72 | --server-ip 127.0.0.1 ^
73 | --server-port 1234 ^
74 | --token MyToken
75 | ```
76 |
77 | ---
78 |
79 | ### 2.0 MCPChatClient
80 | - **Purpose**: Initiates a new chat session with the MCP server.
81 |
82 | - **Main Features**:
83 | - Sends a `chat` command to the server with a question.
84 | - Supports optional parameters for public chats, groups, and language.
85 |
86 | - **Key Arguments**:
87 | - `--server-ip`: IP address of the MCP server.
88 | - `--server-port`: Port number of the MCP server.
89 | - `--token`: Authentication token.
90 | - `--question`: Initial question for the chat session.
91 | - `--use-public`: Optional flag for public chat.
92 | - `--groups`: Optional group list.
93 | - `--language`: Optional language parameter.
94 |
95 | - **Usage Example**:
96 | ```bash
97 | php MCPChatClient.php ^
98 | --server-ip 127.0.0.1 ^
99 | --server-port 1234 ^
100 | --token MyToken ^
101 | --question "Hello World" ^
102 | --use-public ^
103 | --groups "devops,hr" ^
104 | --language en
105 | ```
106 |
107 | ### 2.1 MCPContinueChatClient
108 | - **Purpose**: Continues an existing chat session by sending follow-up messages.
109 |
110 | - **Main Features**:
111 | - Sends a `continue_chat` command to the server.
112 | - Provides the conversation ID and follow-up message.
113 |
114 | - **Key Arguments**:
115 | - `--server-ip`: IP address of the MCP server.
116 | - `--server-port`: Port number of the MCP server.
117 | - `--token`: Authentication token.
118 | - `--conversation-id`: ID of the conversation to continue.
119 | - `--message`: Follow-up message.
120 |
121 | - **Usage Example**:
122 | ```bash
123 | php MCPContinueChatClient.php ^
124 | --server-ip 127.0.0.1 ^
125 | --server-port 1234 ^
126 | --token MyToken ^
127 | --conversation-id 12345 ^
128 | --message "Can you provide an update?"
129 | ```
130 |
131 | ### 2.2 MCPGetChatInfoClient
132 | - **Purpose**: Retrieves metadata and status information about an existing chat session.
133 |
134 | - **Main Features**:
135 | - Sends a `get_chat_info` command to the server.
136 | - Extracts and displays information about the chat session.
137 |
138 | - **Key Arguments**:
139 | - `--server-ip`: IP address of the MCP server.
140 | - `--server-port`: Port number of the MCP server.
141 | - `--token`: Authentication token.
142 | - `--chat-id`: ID of the chat session to retrieve information for.
143 |
144 | - **Usage Example**:
145 | ```bash
146 | php MCPGetChatInfo.php ^
147 | --server-ip 127.0.0.1 ^
148 | --server-port 1234 ^
149 | --token MyToken ^
150 | --chat-id 6789
151 | ```
152 |
153 | ---
154 |
155 | ### 3.0 MCPCreateSourceClient
156 | - **Purpose**: Creates a new source on the MCP server and associates it with specified groups.
157 |
158 | - **Main Features**:
159 | - Sends a `create_source` command with details such as name, content, and associated groups.
160 | - Provides robust error handling for missing arguments and server communication issues.
161 |
162 | - **Key Arguments**:
163 | - `--server-ip`: IP address of the MCP server.
164 | - `--server-port`: Port number of the MCP server.
165 | - `--token`: Authentication token for the session.
166 | - `--name`: Name of the source to create.
167 | - `--content`: Content of the source in plain text or markdown.
168 | - `--groups`: (Optional) List of groups to associate with the source.
169 |
170 | - **Usage Example**:
171 | ```bash
172 | php MCPCreateSourceClient.php ^
173 | --server-ip 127.0.0.1 ^
174 | --server-port 1234 ^
175 | --token MyToken ^
176 | --name "Sample Source" ^
177 | --content "This is a test content" ^
178 | --groups devops hr
179 | ```
180 |
181 | ---
182 |
183 | ### 3.1 MCPGetSourceClient
184 | - **Purpose**: Fetches detailed information about a specific source from the MCP server.
185 |
186 | - **Main Features**:
187 | - Sends a `get_source` command to the server with the source ID as a parameter.
188 | - Retrieves and displays the source's metadata and contents.
189 |
190 | - **Key Arguments**:
191 | - `--server-ip`: IP address of the MCP server.
192 | - `--server-port`: Port number of the MCP server.
193 | - `--token`: Authentication token for the server.
194 | - `--source-id`: Unique ID of the source to retrieve.
195 |
196 | - **Usage Example**:
197 | ```bash
198 | php MCPGetSourceClient.php ^
199 | --server-ip 127.0.0.1 ^
200 | --server-port 1234 ^
201 | --token MyToken ^
202 | --source-id 12345
203 | ```
204 |
205 | ### 3.2 MCPListSourcesClient
206 | - **Purpose**: Lists all sources belonging to a specified group on the MCP server.
207 |
208 | - **Main Features**:
209 | - Sends a `list_sources` command with the group name as a parameter.
210 | - Displays a list of sources available in the specified group.
211 |
212 | - **Key Arguments**:
213 | - `--server-ip`: IP address of the MCP server.
214 | - `--server-port`: Port number of the MCP server.
215 | - `--token`: Authentication token for the server.
216 | - `--group-name`: Name of the group for which to list sources.
217 |
218 | - **Usage Example**:
219 | ```bash
220 | php MCPListSourcesClient.php ^
221 | --server-ip 127.0.0.1 ^
222 | --server-port 1234 ^
223 | --token MyToken ^
224 | --group-name devops
225 | ```
226 |
227 | ### 3.3 MCPEditSourceClient
228 | - **Purpose**: Edits the details of an existing source on the MCP server.
229 |
230 | - **Main Features**:
231 | - Sends an `edit_source` command with optional updates for the source title, content, and group associations.
232 | - Supports adding or updating multiple groups for the source.
233 |
234 | - **Key Arguments**:
235 | - `--server-ip`: IP address of the MCP server.
236 | - `--server-port`: Port number of the MCP server.
237 | - `--token`: Authentication token for the server.
238 | - `--source-id`: ID of the source to edit.
239 | - `--title`: (Optional) New title for the source.
240 | - `--content`: (Optional) New content for the source.
241 | - `--groups`: (Optional) List of groups to associate with the source.
242 |
243 | - **Usage Example**:
244 | ```bash
245 | php MCPEditSourceClient.php ^
246 | --server-ip 127.0.0.1 ^
247 | --server-port 1234 ^
248 | --token MyToken ^
249 | --source-id 12345 ^
250 | --title "Updated Title" ^
251 | --content "Updated content for the source." ^
252 | --groups devops finance
253 | ```
254 |
255 | ### 3.4 MCPDeleteSourceClient
256 | - **Purpose**: Deletes a specific source from the MCP server.
257 |
258 | - **Main Features**:
259 | - Sends a `delete_source` command to remove the source identified by its ID.
260 |
261 | - **Key Arguments**:
262 | - `--server-ip`: IP address of the MCP server.
263 | - `--server-port`: Port number of the MCP server.
264 | - `--token`: Authentication token for the server.
265 | - `--source-id`: ID of the source to delete.
266 |
267 | - **Usage Example**:
268 | ```bash
269 | php MCPDeleteSourceClient.php ^
270 | --server-ip 127.0.0.1 ^
271 | --server-port 1234 ^
272 | --token MyToken ^
273 | --source-id 12345
274 | ```
275 |
276 | ---
277 |
278 | ### 4.0 MCPListGroupsClient
279 | - **Purpose**:
280 | Lists all the groups available on the MCP server.
281 |
282 | - **Main Features**:
283 | - Sends a `list_groups` command to retrieve the available groups.
284 | - Outputs the groups in JSON format.
285 |
286 | - **Key Arguments**:
287 | - `--server-ip`: IP address of the MCP server.
288 | - `--server-port`: Port number of the MCP server.
289 | - `--token`: Authentication token for the session.
290 |
291 | - **Usage Example**:
292 | ```bash
293 | php MCPListGroupsClient.php ^
294 | --server-ip 127.0.0.1 ^
295 | --server-port 1234 ^
296 | --token MyToken
297 | ```
298 |
299 | ### 4.1 MCPStoreGroupClient
300 | - **Purpose**:
301 | - Creates or updates a group on the MCP server.
302 |
303 | - **Main Features**:
304 | - Sends a `store_group` command with the group's name and description.
305 | - Allows creation of new groups or modification of existing ones.
306 |
307 | - **Key Arguments**:
308 | - `--server-ip`: IP address of the MCP server.
309 | - `--server-port`: Port number of the MCP server.
310 | - `--token`: Authentication token for the session.
311 | - `--group-name`: Name of the group to create or update.
312 | - `--description`: (Optional) Description of the group.
313 |
314 | - **Usage Example**:
315 | ```bash
316 | php MCPStoreGroupClient.php ^
317 | --server-ip 127.0.0.1 ^
318 | --server-port 1234 ^
319 | --token MyToken ^
320 | --group-name "Team DevOps" ^
321 | --description "Group for development and operations"
322 | ```
323 |
324 | ### 4.2 MCPDeleteGroupClient
325 | - **Purpose**:
326 | - Deletes a specified group from the MCP server.
327 |
328 | - **Main Features**:
329 | - Sends a `delete_group` command with the group name.
330 | - Ensures the group is removed from the server.
331 |
332 | - **Key Arguments**:
333 | - `--server-ip`: IP address of the MCP server.
334 | - `--server-port`: Port number of the MCP server.
335 | - `--token`: Authentication token for the session.
336 | - `--group-name`: Name of the group to delete.
337 |
338 | - **Usage Example**:
339 | ```bash
340 | php MCPDeleteGroupClient.php ^
341 | --server-ip 127.0.0.1 ^
342 | --server-port 1234 ^
343 | --token MyToken ^
344 | --group-name "Team DevOps"
345 | ```
346 |
347 | ---
348 |
349 | ### 5.0 MCPStoreUserClient
350 | - **Purpose:** Creates or updates user details on the MCP server.
351 |
352 | - **Main Features:**
353 | - Sends a `store_user` command with comprehensive user details.
354 | - Allows specification of default values for language and timezone if not provided.
355 |
356 | - **Key Arguments:**
357 | - `--server-ip`: IP address of the MCP server.
358 | - `--server-port`: Port number of the MCP server.
359 | - `--token`: Authentication token.
360 | - `--name`: Name of the user.
361 | - `--email`: Email address of the user.
362 | - `--password`: Password for the user account.
363 | - `--language` (Optional): User's preferred language (default: "en").
364 | - `--timezone` (Optional): User's timezone (default: "Europe/Berlin").
365 | - `--roles` (Optional): Roles assigned to the user.
366 | - `--groups` (Optional): Groups the user belongs to.
367 | - `--usePublic` (Optional): Flag to set the user as public.
368 | - `--activateFtp` (Optional): Flag to activate FTP access.
369 | - `--ftpPassword` (Optional): Password for FTP access.
370 |
371 | **Usage Example:**
372 | ```bash
373 | php MCPStoreUserClient.php ^
374 | --server-ip 127.0.0.1 ^
375 | --server-port 1234 ^
376 | --token MyToken ^
377 | --name John ^
378 | --email [email protected] ^
379 | --password secret ^
380 | --language en ^
381 | --roles admin manager ^
382 | --groups devops finance ^
383 | --usePublic ^
384 | --activateFtp ^
385 | --ftpPassword ftpPass123
386 | ```
387 |
388 | ### 5.1 MCPEditUserClient
389 | - **Purpose:** Modifies the details of an existing user on the MCP server.
390 |
391 | - **Main Features:**
392 | - Sends an `edit_user` command with the specified user details.
393 | - Supports conditional sending of fields to avoid unnecessary data transmission.
394 |
395 | - **Key Arguments:**
396 | - `--server-ip`: IP address of the MCP server.
397 | - `--server-port`: Port number of the MCP server.
398 | - `--token`: Authentication token.
399 | - `--user-id`: ID of the user to modify.
400 | - `--name` (Optional): New name of the user.
401 | - `--email` (Optional): New email for the user.
402 | - `--password` (Optional): New password for the user.
403 | - `--language` (Optional): New language for the user.
404 | - `--timezone` (Optional): New timezone for the user.
405 | - `--roles` (Optional): New roles for the user.
406 | - `--groups` (Optional): New groups for the user.
407 | - `--usePublic` (Optional): Flag to set the user as public.
408 | - `--activateFtp` (Optional): Flag to activate FTP for the user.
409 | - `--ftpPassword` (Optional): New password for FTP access.
410 |
411 | - **Usage Example:**
412 | ```bash
413 | php MCPEditUserClient.php ^
414 | --server-ip 127.0.0.1 ^
415 | --server-port 1234 ^
416 | --token MyToken ^
417 | --user-id 12345 ^
418 | --name Jane ^
419 | --roles manager devops ^
420 | --groups hr devops
421 | ```
422 |
423 | ### 5.2 MCPDeleteUserClient
424 | - **Purpose:** Deletes a user from the MCP server.
425 |
426 | - **Main Features:**
427 | - Sends a `delete_user` command using the user's email as an identifier.
428 |
429 | - **Key Arguments:**
430 | - `--server-ip`: IP address of the MCP server.
431 | - `--server-port`: Port number of the MCP server.
432 | - `--email`: Email address of the user to delete.
433 | - `--token`: Authentication token.
434 |
435 | - **Usage Example:**
436 | ```bash
437 | php MCPDeleteUserClient.php ^
438 | --server-ip 127.0.0.1 ^
439 | --server-port 1234 ^
440 | --token MyToken ^
441 | --email [email protected]
442 | ```
443 |
444 | ---
445 |
446 | ## General Notes
447 | **JSON Communication:**
448 | - Each file constructs and sends JSON payloads specific to its functionality.
449 | - Responses from the server are parsed and displayed in JSON format.
450 |
451 | **Socket Communication:**
452 | - The files use PHP's Socket class for establishing TCP connections with the MCP server.
453 |
454 | **Error Handling:**
455 | - The scripts handle missing or invalid arguments gracefully, printing clear usage instructions where necessary.
456 |
457 | **Examples:**
458 | - Replace placeholders (e.g., `<SERVER_IP>`, `<TOKEN>`) with actual values relevant to your environment.
459 |
460 | ## Prerequisites
461 | Ensure you have PHP installed. The code is compatible with PHP 7.1 and above.
462 |
463 | ## Dependencies:
464 | json which is meanwhile integrated in PHP directly
465 |
466 | ## Build and Run
467 | Use the `php` command to run the PHP files with the appropriate parameters as described above:
468 | ```bash
469 | php MCPLoginClient.php --<PARAMETER 1> --<PARAMETER 2> --<PARAMETER n> ...
470 | ```
471 |
472 | ## Error Handling
473 | Both clients include error handling for:
474 | - Missing or invalid parameters.
475 | - Server connection issues.
476 | - Unexpected server responses.
477 |
478 | ## Future Enhancements
479 | - Add support for SSL/TLS encryption for secure communication.
480 | - Implement a configuration file to simplify the command-line parameters.
481 | - Enhance error reporting with detailed server-side error codes.
482 |
483 | ## License
484 | This project is licensed under the MIT License - see the LICENSE file for details.
485 | This repository and/or code is provided "as is" without warranty of any kind, and use is at your own risk.
486 |
487 |
```
--------------------------------------------------------------------------------
/clients/JavaScript/README.md:
--------------------------------------------------------------------------------
```markdown
1 | # MCP Agent Examples (JavaScript)
2 | This repository contains examples for interacting with the MCP server using **JavaScript**. Each console application demonstrates a specific operation and its corresponding server interaction.
3 |
4 | ## Main Menu
5 | Choose an operation from the list below. Each example demonstrates a specific server interaction.
6 |
7 | ### 1. Authentication
8 | [1.1 Login User](#10-mcploginclient)
9 | [1.2 Logout User](#12-mcplogoutclient)
10 |
11 | ### 2. Chat Operations
12 | [2.1 Start a New Chat](#20-mcpchatclient)
13 | [2.2 Continue a Chat Session](#21-mcpcontinuechatclient)
14 | [2.3 Retrieve Chat Info](#22-mcpgetchatinfoclient)
15 |
16 | ### 3. Source Management
17 | [3.1 Create a New Source](#30-mcpcreatesourceclient)
18 | [3.2 Retrieve Source Details](#31-mcpgetsourceclient)
19 | [3.3 List All Sources in a Group](#32-mcplistsourcesclient)
20 | [3.4 Edit an Existing Source](#33-mcpeditsourceclient)
21 | [3.5 Delete a Source](#34-mcpdeletesourceclient)
22 |
23 | ### 4. Group Management
24 | [4.1 List All Groups](#40-mcplistgroupsclient)
25 | [4.2 Create/Update a Group](#41-mcpstoregroupclient)
26 | [4.3 Delete a Group](#42-mcpdeletegroupclient)
27 |
28 | ### 5. User Management
29 | [5.1 Create/Update a User](#50-mcpstoreuserclient)
30 | [5.2 Edit User Details](#51-mcpedituserclient)
31 | [5.3 Delete a User](#52-mcpdeleteuserclient)
32 |
33 | ---
34 |
35 | ### 1.0 MCPLoginClient
36 | - **Purpose**: Handles user authentication by sending login requests to the MCP server.
37 |
38 | - **Main Features**:
39 | - Sends a `login` command to the server with user credentials.
40 | - Handles JSON-based requests and parses the server's response.
41 |
42 | - **Key Arguments**:
43 | - `--server-ip`: IP address of the MCP server.
44 | - `--server-port`: Port number of the MCP server.
45 | - `--email`: User email for authentication.
46 | - `--password`: User password for authentication.
47 |
48 | - **Usage Example**:
49 | ```bash
50 | node MCPLoginClient.js ^
51 | --server-ip 127.0.0.1 ^
52 | --server-port 1234 ^
53 | --email [email protected] ^
54 | --password secret
55 | ```
56 |
57 | ### 1.2 MCPLogoutClient
58 | - **Purpose**: Logs out an authenticated user by invalidating their session token.
59 |
60 | - **Main Features**:
61 | - Sends a `logout` command to the server.
62 | - Invalidates the token provided in the request.
63 |
64 | - **Key Arguments**:
65 | - `--server-ip`: IP address of the MCP server.
66 | - `--server-port`: Port number of the MCP server.
67 | - `--token`: Authentication token to be invalidated.
68 |
69 | - **Usage Example**:
70 | ```bash
71 | node MCPLogoutClient.js ^
72 | --server-ip 127.0.0.1 ^
73 | --server-port 1234 ^
74 | --token MyToken
75 | ```
76 |
77 | ---
78 |
79 | ### 2.0 MCPChatClient
80 | - **Purpose**: Initiates a new chat session with the MCP server.
81 |
82 | - **Main Features**:
83 | - Sends a `chat` command to the server with a question.
84 | - Supports optional parameters for public chats, groups, and language.
85 |
86 | - **Key Arguments**:
87 | - `--server-ip`: IP address of the MCP server.
88 | - `--server-port`: Port number of the MCP server.
89 | - `--token`: Authentication token.
90 | - `--question`: Initial question for the chat session.
91 | - `--use-public`: Optional flag for public chat.
92 | - `--groups`: Optional group list.
93 | - `--language`: Optional language parameter.
94 |
95 | - **Usage Example**:
96 | ```bash
97 | node MCPChatClient.js ^
98 | --server-ip 127.0.0.1 ^
99 | --server-port 1234 ^
100 | --token MyToken ^
101 | --question "Hello World" ^
102 | --use-public ^
103 | --groups "devops,hr" ^
104 | --language en
105 | ```
106 |
107 | ### 2.1 MCPContinueChatClient
108 | - **Purpose**: Continues an existing chat session by sending follow-up messages.
109 |
110 | - **Main Features**:
111 | - Sends a `continue_chat` command to the server.
112 | - Provides the conversation ID and follow-up message.
113 |
114 | - **Key Arguments**:
115 | - `--server-ip`: IP address of the MCP server.
116 | - `--server-port`: Port number of the MCP server.
117 | - `--token`: Authentication token.
118 | - `--conversation-id`: ID of the conversation to continue.
119 | - `--message`: Follow-up message.
120 |
121 | - **Usage Example**:
122 | ```bash
123 | node MCPContinueChatClient.js ^
124 | --server-ip 127.0.0.1 ^
125 | --server-port 1234 ^
126 | --token MyToken ^
127 | --conversation-id 12345 ^
128 | --message "Can you provide an update?"
129 | ```
130 |
131 | ### 2.2 MCPGetChatInfoClient
132 | - **Purpose**: Retrieves metadata and status information about an existing chat session.
133 |
134 | - **Main Features**:
135 | - Sends a `get_chat_info` command to the server.
136 | - Extracts and displays information about the chat session.
137 |
138 | - **Key Arguments**:
139 | - `--server-ip`: IP address of the MCP server.
140 | - `--server-port`: Port number of the MCP server.
141 | - `--token`: Authentication token.
142 | - `--chat-id`: ID of the chat session to retrieve information for.
143 |
144 | - **Usage Example**:
145 | ```bash
146 | node MCPGetChatInfo.js ^
147 | --server-ip 127.0.0.1 ^
148 | --server-port 1234 ^
149 | --token MyToken ^
150 | --chat-id 6789
151 | ```
152 |
153 | ---
154 |
155 | ### 3.0 MCPCreateSourceClient
156 | - **Purpose**: Creates a new source on the MCP server and associates it with specified groups.
157 |
158 | - **Main Features**:
159 | - Sends a `create_source` command with details such as name, content, and associated groups.
160 | - Provides robust error handling for missing arguments and server communication issues.
161 |
162 | - **Key Arguments**:
163 | - `--server-ip`: IP address of the MCP server.
164 | - `--server-port`: Port number of the MCP server.
165 | - `--token`: Authentication token for the session.
166 | - `--name`: Name of the source to create.
167 | - `--content`: Content of the source in plain text or markdown.
168 | - `--groups`: (Optional) List of groups to associate with the source.
169 |
170 | - **Usage Example**:
171 | ```bash
172 | node MCPCreateSourceClient.js ^
173 | --server-ip 127.0.0.1 ^
174 | --server-port 1234 ^
175 | --token MyToken ^
176 | --name "Sample Source" ^
177 | --content "This is a test content" ^
178 | --groups devops hr
179 | ```
180 |
181 | ---
182 |
183 | ### 3.1 MCPGetSourceClient
184 | - **Purpose**: Fetches detailed information about a specific source from the MCP server.
185 |
186 | - **Main Features**:
187 | - Sends a `get_source` command to the server with the source ID as a parameter.
188 | - Retrieves and displays the source's metadata and contents.
189 |
190 | - **Key Arguments**:
191 | - `--server-ip`: IP address of the MCP server.
192 | - `--server-port`: Port number of the MCP server.
193 | - `--token`: Authentication token for the server.
194 | - `--source-id`: Unique ID of the source to retrieve.
195 |
196 | - **Usage Example**:
197 | ```bash
198 | node MCPGetSourceClient.js ^
199 | --server-ip 127.0.0.1 ^
200 | --server-port 1234 ^
201 | --token MyToken ^
202 | --source-id 12345
203 | ```
204 |
205 | ### 3.2 MCPListSourcesClient
206 | - **Purpose**: Lists all sources belonging to a specified group on the MCP server.
207 |
208 | - **Main Features**:
209 | - Sends a `list_sources` command with the group name as a parameter.
210 | - Displays a list of sources available in the specified group.
211 |
212 | - **Key Arguments**:
213 | - `--server-ip`: IP address of the MCP server.
214 | - `--server-port`: Port number of the MCP server.
215 | - `--token`: Authentication token for the server.
216 | - `--group-name`: Name of the group for which to list sources.
217 |
218 | - **Usage Example**:
219 | ```bash
220 | node MCPListSourcesClient.js ^
221 | --server-ip 127.0.0.1 ^
222 | --server-port 1234 ^
223 | --token MyToken ^
224 | --group-name devops
225 | ```
226 |
227 | ### 3.3 MCPEditSourceClient
228 | - **Purpose**: Edits the details of an existing source on the MCP server.
229 |
230 | - **Main Features**:
231 | - Sends an `edit_source` command with optional updates for the source title, content, and group associations.
232 | - Supports adding or updating multiple groups for the source.
233 |
234 | - **Key Arguments**:
235 | - `--server-ip`: IP address of the MCP server.
236 | - `--server-port`: Port number of the MCP server.
237 | - `--token`: Authentication token for the server.
238 | - `--source-id`: ID of the source to edit.
239 | - `--title`: (Optional) New title for the source.
240 | - `--content`: (Optional) New content for the source.
241 | - `--groups`: (Optional) List of groups to associate with the source.
242 |
243 | - **Usage Example**:
244 | ```bash
245 | node MCPEditSourceClient.js ^
246 | --server-ip 127.0.0.1 ^
247 | --server-port 1234 ^
248 | --token MyToken ^
249 | --source-id 12345 ^
250 | --title "Updated Title" ^
251 | --content "Updated content for the source." ^
252 | --groups devops finance
253 | ```
254 |
255 | ### 3.4 MCPDeleteSourceClient
256 | - **Purpose**: Deletes a specific source from the MCP server.
257 |
258 | - **Main Features**:
259 | - Sends a `delete_source` command to remove the source identified by its ID.
260 |
261 | - **Key Arguments**:
262 | - `--server-ip`: IP address of the MCP server.
263 | - `--server-port`: Port number of the MCP server.
264 | - `--token`: Authentication token for the server.
265 | - `--source-id`: ID of the source to delete.
266 |
267 | - **Usage Example**:
268 | ```bash
269 | node MCPDeleteSourceClient.js ^
270 | --server-ip 127.0.0.1 ^
271 | --server-port 1234 ^
272 | --token MyToken ^
273 | --source-id 12345
274 | ```
275 |
276 | ---
277 |
278 | ### 4.0 MCPListGroupsClient
279 | - **Purpose**:
280 | Lists all the groups available on the MCP server.
281 |
282 | - **Main Features**:
283 | - Sends a `list_groups` command to retrieve the available groups.
284 | - Outputs the groups in JSON format.
285 |
286 | - **Key Arguments**:
287 | - `--server-ip`: IP address of the MCP server.
288 | - `--server-port`: Port number of the MCP server.
289 | - `--token`: Authentication token for the session.
290 |
291 | - **Usage Example**:
292 | ```bash
293 | node MCPListGroupsClient.js ^
294 | --server-ip 127.0.0.1 ^
295 | --server-port 1234 ^
296 | --token MyToken
297 | ```
298 |
299 | ### 4.1 MCPStoreGroupClient
300 | - **Purpose**:
301 | - Creates or updates a group on the MCP server.
302 |
303 | - **Main Features**:
304 | - Sends a `store_group` command with the group's name and description.
305 | - Allows creation of new groups or modification of existing ones.
306 |
307 | - **Key Arguments**:
308 | - `--server-ip`: IP address of the MCP server.
309 | - `--server-port`: Port number of the MCP server.
310 | - `--token`: Authentication token for the session.
311 | - `--group-name`: Name of the group to create or update.
312 | - `--description`: (Optional) Description of the group.
313 |
314 | - **Usage Example**:
315 | ```bash
316 | node MCPStoreGroupClient.js ^
317 | --server-ip 127.0.0.1 ^
318 | --server-port 1234 ^
319 | --token MyToken ^
320 | --group-name "Team DevOps" ^
321 | --description "Group for development and operations"
322 | ```
323 |
324 | ### 4.2 MCPDeleteGroupClient
325 | - **Purpose**:
326 | - Deletes a specified group from the MCP server.
327 |
328 | - **Main Features**:
329 | - Sends a `delete_group` command with the group name.
330 | - Ensures the group is removed from the server.
331 |
332 | - **Key Arguments**:
333 | - `--server-ip`: IP address of the MCP server.
334 | - `--server-port`: Port number of the MCP server.
335 | - `--token`: Authentication token for the session.
336 | - `--group-name`: Name of the group to delete.
337 |
338 | - **Usage Example**:
339 | ```bash
340 | node MCPDeleteGroupClient.js ^
341 | --server-ip 127.0.0.1 ^
342 | --server-port 1234 ^
343 | --token MyToken ^
344 | --group-name "Team DevOps"
345 | ```
346 |
347 | ---
348 |
349 | ### 5.0 MCPStoreUserClient
350 | - **Purpose:** Creates or updates user details on the MCP server.
351 |
352 | - **Main Features:**
353 | - Sends a `store_user` command with comprehensive user details.
354 | - Allows specification of default values for language and timezone if not provided.
355 |
356 | - **Key Arguments:**
357 | - `--server-ip`: IP address of the MCP server.
358 | - `--server-port`: Port number of the MCP server.
359 | - `--token`: Authentication token.
360 | - `--name`: Name of the user.
361 | - `--email`: Email address of the user.
362 | - `--password`: Password for the user account.
363 | - `--language` (Optional): User's preferred language (default: "en").
364 | - `--timezone` (Optional): User's timezone (default: "Europe/Berlin").
365 | - `--roles` (Optional): Roles assigned to the user.
366 | - `--groups` (Optional): Groups the user belongs to.
367 | - `--usePublic` (Optional): Flag to set the user as public.
368 | - `--activateFtp` (Optional): Flag to activate FTP access.
369 | - `--ftpPassword` (Optional): Password for FTP access.
370 |
371 | **Usage Example:**
372 | ```bash
373 | node MCPStoreUserClient.js ^
374 | --server-ip 127.0.0.1 ^
375 | --server-port 1234 ^
376 | --token MyToken ^
377 | --name John ^
378 | --email [email protected] ^
379 | --password secret ^
380 | --language en ^
381 | --roles admin manager ^
382 | --groups devops finance ^
383 | --usePublic ^
384 | --activateFtp ^
385 | --ftpPassword ftpPass123
386 | ```
387 |
388 | ### 5.1 MCPEditUserClient
389 | - **Purpose:** Modifies the details of an existing user on the MCP server.
390 |
391 | - **Main Features:**
392 | - Sends an `edit_user` command with the specified user details.
393 | - Supports conditional sending of fields to avoid unnecessary data transmission.
394 |
395 | - **Key Arguments:**
396 | - `--server-ip`: IP address of the MCP server.
397 | - `--server-port`: Port number of the MCP server.
398 | - `--token`: Authentication token.
399 | - `--user-id`: ID of the user to modify.
400 | - `--name` (Optional): New name of the user.
401 | - `--email` (Optional): New email for the user.
402 | - `--password` (Optional): New password for the user.
403 | - `--language` (Optional): New language for the user.
404 | - `--timezone` (Optional): New timezone for the user.
405 | - `--roles` (Optional): New roles for the user.
406 | - `--groups` (Optional): New groups for the user.
407 | - `--usePublic` (Optional): Flag to set the user as public.
408 | - `--activateFtp` (Optional): Flag to activate FTP for the user.
409 | - `--ftpPassword` (Optional): New password for FTP access.
410 |
411 | - **Usage Example:**
412 | ```bash
413 | node MCPEditUserClient.js ^
414 | --server-ip 127.0.0.1 ^
415 | --server-port 1234 ^
416 | --token MyToken ^
417 | --user-id 12345 ^
418 | --name Jane ^
419 | --roles manager devops ^
420 | --groups hr devops
421 | ```
422 |
423 | ### 5.2 MCPDeleteUserClient
424 | - **Purpose:** Deletes a user from the MCP server.
425 |
426 | - **Main Features:**
427 | - Sends a `delete_user` command using the user's email as an identifier.
428 |
429 | - **Key Arguments:**
430 | - `--server-ip`: IP address of the MCP server.
431 | - `--server-port`: Port number of the MCP server.
432 | - `--email`: Email address of the user to delete.
433 | - `--token`: Authentication token.
434 |
435 | - **Usage Example:**
436 | ```bash
437 | node MCPDeleteUserClient.js ^
438 | --server-ip 127.0.0.1 ^
439 | --server-port 1234 ^
440 | --token MyToken ^
441 | --email [email protected]
442 | ```
443 |
444 | ---
445 |
446 | ## General Notes
447 | **JSON Communication:**
448 | - Each file constructs and sends JSON payloads specific to its functionality.
449 | - Responses from the server are parsed and displayed in JSON format.
450 |
451 | **Socket Communication:**
452 | - The files use JavaScript's Socket class for establishing TCP connections with the MCP server.
453 |
454 | **Error Handling:**
455 | - The scripts handle missing or invalid arguments gracefully, printing clear usage instructions where necessary.
456 |
457 | **Examples:**
458 | - Replace placeholders (e.g., `<SERVER_IP>`, `<TOKEN>`) with actual values relevant to your environment.
459 |
460 | ## Prerequisites
461 | JavaScript Development Kit (JDK): Ensure you have JDK installed. The code is compatible with JavaScript 8 and above.
462 |
463 | ## Dependencies:
464 | - org.json library for handling JSON data.
465 |
466 | ## Build and Run
467 | Use the `node` command to run the JavaScript files with the appropriate parameters as described above:
468 | ```bash
469 | node MCPLoginClient.js --<PARAMETER 1> --<PARAMETER 2> --<PARAMETER n>
470 | ```
471 |
472 | ## Error Handling
473 | Both clients include error handling for:
474 | - Missing or invalid parameters.
475 | - Server connection issues.
476 | - Unexpected server responses.
477 |
478 | ## Future Enhancements
479 | - Add support for SSL/TLS encryption for secure communication.
480 | - Implement a configuration file to simplify the command-line parameters.
481 | - Enhance error reporting with detailed server-side error codes.
482 |
483 | ## License
484 | This project is licensed under the MIT License - see the LICENSE file for details.
485 | This repository and/or code is provided "as is" without warranty of any kind, and use is at your own risk.
486 |
487 |
```
--------------------------------------------------------------------------------
/clients/Java/README.md:
--------------------------------------------------------------------------------
```markdown
1 | # MCP Client Examples (Java)
2 | This repository contains examples for interacting with the MCP server using **Java**. Each console application demonstrates a specific operation and its corresponding server interaction.
3 |
4 | ## Main Menu
5 | Choose an operation from the list below. Each example demonstrates a specific server interaction.
6 |
7 | ### 1. Authentication
8 | [1.1 Login User](#10-mcploginclient)
9 | [1.2 Logout User](#12-mcplogoutclient)
10 |
11 | ### 2. Chat Operations
12 | [2.1 Start a New Chat](#20-mcpchatclient)
13 | [2.2 Continue a Chat Session](#21-mcpcontinuechatclient)
14 | [2.3 Retrieve Chat Info](#22-mcpgetchatinfoclient)
15 |
16 | ### 3. Source Management
17 | [3.1 Create a New Source](#30-mcpcreatesourceclient)
18 | [3.2 Retrieve Source Details](#31-mcpgetsourceclient)
19 | [3.3 List All Sources in a Group](#32-mcplistsourcesclient)
20 | [3.4 Edit an Existing Source](#33-mcpeditsourceclient)
21 | [3.5 Delete a Source](#34-mcpdeletesourceclient)
22 |
23 | ### 4. Group Management
24 | [4.1 List All Groups](#40-mcplistgroupsclient)
25 | [4.2 Create/Update a Group](#41-mcpstoregroupclient)
26 | [4.3 Delete a Group](#42-mcpdeletegroupclient)
27 |
28 | ### 5. User Management
29 | [5.1 Create/Update a User](#50-mcpstoreuserclient)
30 | [5.2 Edit User Details](#51-mcpedituserclient)
31 | [5.3 Delete a User](#52-mcpdeleteuserclient)
32 |
33 | ---
34 |
35 |
36 | ### 1.0 MCPLoginClient
37 | - **Purpose**: Handles user authentication by sending login requests to the MCP server.
38 |
39 | - **Main Features**:
40 | - Sends a `login` command to the server with user credentials.
41 | - Handles JSON-based requests and parses the server's response.
42 |
43 | - **Key Arguments**:
44 | - `--server-ip`: IP address of the MCP server.
45 | - `--server-port`: Port number of the MCP server.
46 | - `--email`: User email for authentication.
47 | - `--password`: User password for authentication.
48 |
49 | - **Usage Example**:
50 | ```bash
51 | java -cp json-20241224.jar MCPLoginClient.java ^
52 | --server-ip 127.0.0.1 ^
53 | --server-port 1234 ^
54 | --email [email protected] ^
55 | --password secret
56 | ```
57 |
58 | ### 1.2 MCPLogoutClient
59 | - **Purpose**: Logs out an authenticated user by invalidating their session token.
60 |
61 | - **Main Features**:
62 | - Sends a `logout` command to the server.
63 | - Invalidates the token provided in the request.
64 |
65 | - **Key Arguments**:
66 | - `--server-ip`: IP address of the MCP server.
67 | - `--server-port`: Port number of the MCP server.
68 | - `--token`: Authentication token to be invalidated.
69 |
70 | - **Usage Example**:
71 | ```bash
72 | java -cp json-20241224.jar MCPLogoutClient.java ^
73 | --server-ip 127.0.0.1 ^
74 | --server-port 1234 ^
75 | --token MyToken
76 | ```
77 |
78 | ---
79 |
80 | ### 2.0 MCPChatClient
81 | - **Purpose**: Initiates a new chat session with the MCP server.
82 |
83 | - **Main Features**:
84 | - Sends a `chat` command to the server with a question.
85 | - Supports optional parameters for public chats, groups, and language.
86 |
87 | - **Key Arguments**:
88 | - `--server-ip`: IP address of the MCP server.
89 | - `--server-port`: Port number of the MCP server.
90 | - `--token`: Authentication token.
91 | - `--question`: Initial question for the chat session.
92 | - `--use-public`: Optional flag for public chat.
93 | - `--groups`: Optional group list.
94 | - `--language`: Optional language parameter.
95 |
96 | - **Usage Example**:
97 | ```bash
98 | java -cp json-20241224.jar MCPChatClient.java ^
99 | --server-ip 127.0.0.1 ^
100 | --server-port 1234 ^
101 | --token MyToken ^
102 | --question "Hello World" ^
103 | --use-public ^
104 | --groups "devops,hr" ^
105 | --language en
106 | ```
107 |
108 | ### 2.1 MCPContinueChatClient
109 | - **Purpose**: Continues an existing chat session by sending follow-up messages.
110 |
111 | - **Main Features**:
112 | - Sends a `continue_chat` command to the server.
113 | - Provides the conversation ID and follow-up message.
114 |
115 | - **Key Arguments**:
116 | - `--server-ip`: IP address of the MCP server.
117 | - `--server-port`: Port number of the MCP server.
118 | - `--token`: Authentication token.
119 | - `--conversation-id`: ID of the conversation to continue.
120 | - `--message`: Follow-up message.
121 |
122 | - **Usage Example**:
123 | ```bash
124 | java -cp json-20241224.jar MCPContinueChatClient.java ^
125 | --server-ip 127.0.0.1 ^
126 | --server-port 1234 ^
127 | --token MyToken ^
128 | --conversation-id 12345 ^
129 | --message "Can you provide an update?"
130 | ```
131 |
132 | ### 2.2 MCPGetChatInfoClient
133 | - **Purpose**: Retrieves metadata and status information about an existing chat session.
134 |
135 | - **Main Features**:
136 | - Sends a `get_chat_info` command to the server.
137 | - Extracts and displays information about the chat session.
138 |
139 | - **Key Arguments**:
140 | - `--server-ip`: IP address of the MCP server.
141 | - `--server-port`: Port number of the MCP server.
142 | - `--token`: Authentication token.
143 | - `--chat-id`: ID of the chat session to retrieve information for.
144 |
145 | - **Usage Example**:
146 | ```bash
147 | java -cp json-20241224.jar MCPGetChatInfoClient.java ^
148 | --server-ip 127.0.0.1 ^
149 | --server-port 1234 ^
150 | --token MyToken ^
151 | --chat-id 6789
152 | ```
153 |
154 | ---
155 |
156 | ### 3.0 MCPCreateSourceClient
157 | - **Purpose**: Creates a new source on the MCP server and associates it with specified groups.
158 |
159 | - **Main Features**:
160 | - Sends a `create_source` command with details such as name, content, and associated groups.
161 | - Provides robust error handling for missing arguments and server communication issues.
162 |
163 | - **Key Arguments**:
164 | - `--server-ip`: IP address of the MCP server.
165 | - `--server-port`: Port number of the MCP server.
166 | - `--token`: Authentication token for the session.
167 | - `--name`: Name of the source to create.
168 | - `--content`: Content of the source in plain text or markdown.
169 | - `--groups`: (Optional) List of groups to associate with the source.
170 |
171 | - **Usage Example**:
172 | ```bash
173 | java -cp json-20241224.jar MCPCreateSourceClient.java ^
174 | --server-ip 127.0.0.1 ^
175 | --server-port 1234 ^
176 | --token MyToken ^
177 | --name "Sample Source" ^
178 | --content "This is a test content" ^
179 | --groups devops hr
180 | ```
181 |
182 | ---
183 |
184 | ### 3.1 MCPGetSourceClient
185 | - **Purpose**: Fetches detailed information about a specific source from the MCP server.
186 |
187 | - **Main Features**:
188 | - Sends a `get_source` command to the server with the source ID as a parameter.
189 | - Retrieves and displays the source's metadata and contents.
190 |
191 | - **Key Arguments**:
192 | - `--server-ip`: IP address of the MCP server.
193 | - `--server-port`: Port number of the MCP server.
194 | - `--token`: Authentication token for the server.
195 | - `--source-id`: Unique ID of the source to retrieve.
196 |
197 | - **Usage Example**:
198 | ```bash
199 | java -cp json-20241224.jar MCPGetSourceClient.java ^
200 | --server-ip 127.0.0.1 ^
201 | --server-port 1234 ^
202 | --token MyToken ^
203 | --source-id 12345
204 | ```
205 |
206 | ### 3.2 MCPListSourcesClient
207 | - **Purpose**: Lists all sources belonging to a specified group on the MCP server.
208 |
209 | - **Main Features**:
210 | - Sends a `list_sources` command with the group name as a parameter.
211 | - Displays a list of sources available in the specified group.
212 |
213 | - **Key Arguments**:
214 | - `--server-ip`: IP address of the MCP server.
215 | - `--server-port`: Port number of the MCP server.
216 | - `--token`: Authentication token for the server.
217 | - `--group-name`: Name of the group for which to list sources.
218 |
219 | - **Usage Example**:
220 | ```bash
221 | java -cp json-20241224.jar MCPListSourcesClient.java ^
222 | --server-ip 127.0.0.1 ^
223 | --server-port 1234 ^
224 | --token MyToken ^
225 | --group-name devops
226 | ```
227 |
228 | ### 3.3 MCPEditSourceClient
229 | - **Purpose**: Edits the details of an existing source on the MCP server.
230 |
231 | - **Main Features**:
232 | - Sends an `edit_source` command with optional updates for the source title, content, and group associations.
233 | - Supports adding or updating multiple groups for the source.
234 |
235 | - **Key Arguments**:
236 | - `--server-ip`: IP address of the MCP server.
237 | - `--server-port`: Port number of the MCP server.
238 | - `--token`: Authentication token for the server.
239 | - `--source-id`: ID of the source to edit.
240 | - `--title`: (Optional) New title for the source.
241 | - `--content`: (Optional) New content for the source.
242 | - `--groups`: (Optional) List of groups to associate with the source.
243 |
244 | - **Usage Example**:
245 | ```bash
246 | java -cp json-20241224.jar MCPEditSourceClient.java ^
247 | --server-ip 127.0.0.1 ^
248 | --server-port 1234 ^
249 | --token MyToken ^
250 | --source-id 12345 ^
251 | --title "Updated Title" ^
252 | --content "Updated content for the source." ^
253 | --groups devops finance
254 | ```
255 |
256 | ### 3.4 MCPDeleteSourceClient
257 | - **Purpose**: Deletes a specific source from the MCP server.
258 |
259 | - **Main Features**:
260 | - Sends a `delete_source` command to remove the source identified by its ID.
261 |
262 | - **Key Arguments**:
263 | - `--server-ip`: IP address of the MCP server.
264 | - `--server-port`: Port number of the MCP server.
265 | - `--token`: Authentication token for the server.
266 | - `--source-id`: ID of the source to delete.
267 |
268 | - **Usage Example**:
269 | ```bash
270 | java -cp json-20241224.jar MCPDeleteSourceClient.java ^
271 | --server-ip 127.0.0.1 ^
272 | --server-port 1234 ^
273 | --token MyToken ^
274 | --source-id 12345
275 | ```
276 |
277 | ---
278 |
279 | ### 4.0 MCPListGroupsClient
280 | - **Purpose**:
281 | Lists all the groups available on the MCP server.
282 |
283 | - **Main Features**:
284 | - Sends a `list_groups` command to retrieve the available groups.
285 | - Outputs the groups in JSON format.
286 |
287 | - **Key Arguments**:
288 | - `--server-ip`: IP address of the MCP server.
289 | - `--server-port`: Port number of the MCP server.
290 | - `--token`: Authentication token for the session.
291 |
292 | - **Usage Example**:
293 | ```bash
294 | java -cp json-20241224.jar MCPListGroupsClient.java ^
295 | --server-ip 127.0.0.1 ^
296 | --server-port 1234 ^
297 | --token MyToken
298 | ```
299 |
300 | ### 4.1 MCPStoreGroupClient
301 | - **Purpose**:
302 | - Creates or updates a group on the MCP server.
303 |
304 | - **Main Features**:
305 | - Sends a `store_group` command with the group's name and description.
306 | - Allows creation of new groups or modification of existing ones.
307 |
308 | - **Key Arguments**:
309 | - `--server-ip`: IP address of the MCP server.
310 | - `--server-port`: Port number of the MCP server.
311 | - `--token`: Authentication token for the session.
312 | - `--group-name`: Name of the group to create or update.
313 | - `--description`: (Optional) Description of the group.
314 |
315 | - **Usage Example**:
316 | ```bash
317 | java -cp json-20241224.jar MCPStoreGroupClient.java ^
318 | --server-ip 127.0.0.1 ^
319 | --server-port 1234 ^
320 | --token MyToken ^
321 | --group-name "Team DevOps" ^
322 | --description "Group for development and operations"
323 | ```
324 |
325 | ### 4.2 MCPDeleteGroupClient
326 | - **Purpose**:
327 | - Deletes a specified group from the MCP server.
328 |
329 | - **Main Features**:
330 | - Sends a `delete_group` command with the group name.
331 | - Ensures the group is removed from the server.
332 |
333 | - **Key Arguments**:
334 | - `--server-ip`: IP address of the MCP server.
335 | - `--server-port`: Port number of the MCP server.
336 | - `--token`: Authentication token for the session.
337 | - `--group-name`: Name of the group to delete.
338 |
339 | - **Usage Example**:
340 | ```bash
341 | java -cp json-20241224.jar MCPDeleteGroupClient.java ^
342 | --server-ip 127.0.0.1 ^
343 | --server-port 1234 ^
344 | --token MyToken ^
345 | --group-name "Team DevOps"
346 | ```
347 |
348 | ---
349 |
350 | ### 5.0 MCPStoreUserClient
351 | - **Purpose:** Creates or updates user details on the MCP server.
352 |
353 | - **Main Features:**
354 | - Sends a `store_user` command with comprehensive user details.
355 | - Allows specification of default values for language and timezone if not provided.
356 |
357 | - **Key Arguments:**
358 | - `--server-ip`: IP address of the MCP server.
359 | - `--server-port`: Port number of the MCP server.
360 | - `--token`: Authentication token.
361 | - `--name`: Name of the user.
362 | - `--email`: Email address of the user.
363 | - `--password`: Password for the user account.
364 | - `--language` (Optional): User's preferred language (default: "en").
365 | - `--timezone` (Optional): User's timezone (default: "Europe/Berlin").
366 | - `--roles` (Optional): Roles assigned to the user.
367 | - `--groups` (Optional): Groups the user belongs to.
368 | - `--usePublic` (Optional): Flag to set the user as public.
369 | - `--activateFtp` (Optional): Flag to activate FTP access.
370 | - `--ftpPassword` (Optional): Password for FTP access.
371 |
372 | **Usage Example:**
373 | ```bash
374 | java -cp json-20241224.jar MCPStoreUserClient.java ^
375 | --server-ip 127.0.0.1 ^
376 | --server-port 1234 ^
377 | --token MyToken ^
378 | --name John ^
379 | --email [email protected] ^
380 | --password secret ^
381 | --language en ^
382 | --roles admin manager ^
383 | --groups devops finance ^
384 | --usePublic ^
385 | --activateFtp ^
386 | --ftpPassword ftpPass123
387 | ```
388 |
389 | ### 5.1 MCPEditUserClient
390 | - **Purpose:** Modifies the details of an existing user on the MCP server.
391 |
392 | - **Main Features:**
393 | - Sends an `edit_user` command with the specified user details.
394 | - Supports conditional sending of fields to avoid unnecessary data transmission.
395 |
396 | - **Key Arguments:**
397 | - `--server-ip`: IP address of the MCP server.
398 | - `--server-port`: Port number of the MCP server.
399 | - `--token`: Authentication token.
400 | - `--user-id`: ID of the user to modify.
401 | - `--name` (Optional): New name of the user.
402 | - `--email` (Optional): New email for the user.
403 | - `--password` (Optional): New password for the user.
404 | - `--language` (Optional): New language for the user.
405 | - `--timezone` (Optional): New timezone for the user.
406 | - `--roles` (Optional): New roles for the user.
407 | - `--groups` (Optional): New groups for the user.
408 | - `--usePublic` (Optional): Flag to set the user as public.
409 | - `--activateFtp` (Optional): Flag to activate FTP for the user.
410 | - `--ftpPassword` (Optional): New password for FTP access.
411 |
412 | - **Usage Example:**
413 | ```bash
414 | java -cp json-20241224.jar MCPEditUserClient.java ^
415 | --server-ip 127.0.0.1 ^
416 | --server-port 1234 ^
417 | --token MyToken ^
418 | --user-id 12345 ^
419 | --name Jane ^
420 | --roles manager devops ^
421 | --groups hr devops
422 | ```
423 |
424 | ### 5.2 MCPDeleteUserClient
425 | - **Purpose:** Deletes a user from the MCP server.
426 |
427 | - **Main Features:**
428 | - Sends a `delete_user` command using the user's email as an identifier.
429 |
430 | - **Key Arguments:**
431 | - `--server-ip`: IP address of the MCP server.
432 | - `--server-port`: Port number of the MCP server.
433 | - `--email`: Email address of the user to delete.
434 | - `--token`: Authentication token.
435 |
436 | - **Usage Example:**
437 | ```bash
438 | java -cp json-20241224.jar MCPDeleteUserClient.java ^
439 | --server-ip 127.0.0.1 ^
440 | --server-port 1234 ^
441 | --token MyToken ^
442 | --email [email protected]
443 | ```
444 |
445 | ---
446 |
447 | ## General Notes
448 | **JSON Communication:**
449 | - Each file constructs and sends JSON payloads specific to its functionality.
450 | - Responses from the server are parsed and displayed in JSON format.
451 |
452 | **Socket Communication:**
453 | - The files use Java's Socket class for establishing TCP connections with the MCP server.
454 |
455 | **Error Handling:**
456 | - The scripts handle missing or invalid arguments gracefully, printing clear usage instructions where necessary.
457 |
458 | **Examples:**
459 | - Replace placeholders (e.g., `<SERVER_IP>`, `<TOKEN>`) with actual values relevant to your environment.
460 |
461 | ## Prerequisites
462 | Java Development Kit (JDK): Ensure you have JDK installed. The code is compatible with Java 8 and above.
463 |
464 | ## Dependencies:
465 | - org.json library for handling JSON data.
466 |
467 | ## Build and Run
468 | Compile: Use the `javac` command to compile the Java files.
469 | ```bash
470 | javac -cp json-20241224.jar MCPGetChatInfoClient.java
471 | ```
472 |
473 | Run: Execute the compiled classes with the appropriate parameters as described above:
474 | Compile: Use the `java` command to run the Java files.
475 | ```bash
476 | java -cp json-20241224.jar MCPGetChatInfoClient.java
477 | ```
478 |
479 | ## Error Handling
480 | Both clients include error handling for:
481 | - Missing or invalid parameters.
482 | - Server connection issues.
483 | - Unexpected server responses.
484 |
485 | ## Future Enhancements
486 | - Add support for SSL/TLS encryption for secure communication.
487 | - Implement a configuration file to simplify the command-line parameters.
488 | - Enhance error reporting with detailed server-side error codes.
489 |
490 | ## License
491 | This project is licensed under the MIT License - see the LICENSE file for details.
492 | This repository and/or code is provided "as is" without warranty of any kind, and use is at your own risk.
493 |
494 |
```
--------------------------------------------------------------------------------
/clients/Python/README.md:
--------------------------------------------------------------------------------
```markdown
1 | # MCP Client Examples (Python)
2 | This repository contains examples for interacting with the MCP server using **Python**. Each console application demonstrates a specific operation and its corresponding server interaction.
3 |
4 | ## Main Menu
5 | Choose an operation from the list below. Each example demonstrates a specific server interaction.
6 |
7 | ### 1. Authentication
8 | [1.1 Login User](#10-mcploginclient)
9 | [1.2 Logout User](#12-mcplogoutclient)
10 |
11 | ### 2. Chat Operations
12 | [2.0 Start a New Chat](#20-mcpchatclient)
13 | [2.1 Continue a Chat Session](#21-mcpcontinuechatclient)
14 | [2.2 Retrieve Chat Info](#22-mcpgetchatinfoclient)
15 | [2.3 Delete all Chats](#23-mcpdeleteallchatsclient)
16 | [2.4 Delete Chat](#24-mcpdeletechatclient)
17 |
18 |
19 | ### 3. Source Management
20 | [3.1 Create a New Source](#30-mcpcreatesourceclient)
21 | [3.2 Retrieve Source Details](#31-mcpgetsourceclient)
22 | [3.3 List All Sources in a Group](#32-mcplistsourcesclient)
23 | [3.4 Edit an Existing Source](#33-mcpeditsourceclient)
24 | [3.5 Delete a Source](#34-mcpdeletesourceclient)
25 |
26 | ### 4. Group Management
27 | [4.1 List All Groups](#40-mcplistgroupsclient)
28 | [4.2 Create/Update a Group](#41-mcpstoregroupclient)
29 | [4.3 Delete a Group](#42-mcpdeletegroupclient)
30 |
31 | ### 5. User Management
32 | [5.1 Create/Update a User](#50-mcpstoreuserclient)
33 | [5.2 Edit User Details](#51-mcpedituserclient)
34 | [5.3 Delete a User](#52-mcpdeleteuserclient)
35 |
36 | ---
37 |
38 | ### 1.0 MCPLoginClient
39 | - **Purpose**: Handles user authentication by sending login requests to the MCP server.
40 |
41 | - **Main Features**:
42 | - Sends a `login` command to the server with user credentials.
43 | - Handles JSON-based requests and parses the server's response.
44 |
45 | - **Key Arguments**:
46 | - `--server-ip`: IP address of the MCP server.
47 | - `--server-port`: Port number of the MCP server.
48 | - `--email`: User email for authentication.
49 | - `--password`: User password for authentication.
50 | - `--use-ssl`: Use SSL/TLS security
51 | - `--accept-self-signed`: Accept self signed certificates
52 |
53 |
54 | - **Usage Example**:
55 | ```bash
56 | python MCPLoginClient.py ^
57 | --server-ip 127.0.0.1 ^
58 | --server-port 1234 ^
59 | --email [email protected] ^
60 | --password secret ^
61 | --use-ssl ^
62 | --accept-self-signed
63 | ```
64 |
65 | ### 1.2 MCPLogoutClient
66 | - **Purpose**: Logs out an authenticated user by invalidating their session token.
67 |
68 | - **Main Features**:
69 | - Sends a `logout` command to the server.
70 | - Invalidates the token provided in the request.
71 |
72 | - **Key Arguments**:
73 | - `--server-ip`: IP address of the MCP server.
74 | - `--server-port`: Port number of the MCP server.
75 | - `--use-ssl`: Use SSL/TLS security
76 | - `--accept-self-signed`: Accept self signed certificates
77 | - `--token`: Authentication token to be invalidated.
78 |
79 | - **Usage Example**:
80 | ```bash
81 | python MCPLogoutClient.py ^
82 | --server-ip 127.0.0.1 ^
83 | --server-port 1234 ^
84 | --use-ssl ^
85 | --accept-self-signed ^
86 | --token MyToken
87 | ```
88 |
89 | ---
90 |
91 | ### 2.0 MCPChatClient
92 | - **Purpose**: Initiates a new chat session with the MCP server.
93 |
94 | - **Main Features**:
95 | - Sends a `chat` command to the server with a question.
96 | - Supports optional parameters for public chats, groups, and language.
97 |
98 | - **Key Arguments**:
99 | - `--server-ip`: IP address of the MCP server.
100 | - `--server-port`: Port number of the MCP server.
101 | - `--use-ssl`: Use SSL/TLS security
102 | - `--accept-self-signed`: Accept self signed certificates
103 | - `--token`: Authentication token.
104 | - `--question`: Initial question for the chat session.
105 | - `--use-public`: Optional flag for public chat.
106 | - `--groups`: Optional group list.
107 | - `--language`: Optional language parameter.
108 |
109 | - **Usage Example**:
110 | ```bash
111 | python MCPChatClient.py ^
112 | --server-ip 127.0.0.1 ^
113 | --server-port 1234 ^
114 | --token MyToken ^
115 | --question "Hello World" ^
116 | --use-public ^
117 | --groups "devops,hr" ^
118 | --use-ssl ^
119 | --accept-self-signed ^
120 | --language en
121 | ```
122 |
123 | ### 2.1 MCPContinueChatClient
124 | - **Purpose**: Continues an existing chat session by sending follow-up messages.
125 |
126 | - **Main Features**:
127 | - Sends a `continue_chat` command to the server.
128 | - Provides the conversation ID and follow-up message.
129 |
130 | - **Key Arguments**:
131 | - `--server-ip`: IP address of the MCP server.
132 | - `--server-port`: Port number of the MCP server.
133 | - `--use-ssl`: Use SSL/TLS security
134 | - `--accept-self-signed`: Accept self signed certificates
135 | - `--token`: Authentication token.
136 | - `--conversation-id`: ID of the conversation to continue.
137 | - `--message`: Follow-up message.
138 |
139 | - **Usage Example**:
140 | ```bash
141 | python MCPContinueChatClient.py ^
142 | --server-ip 127.0.0.1 ^
143 | --server-port 1234 ^
144 | --token MyToken ^
145 | --conversation-id 12345 ^
146 | --use-ssl ^
147 | --accept-self-signed ^
148 | --message "Can you provide an update?"
149 | ```
150 |
151 | ### 2.2 MCPGetChatInfoClient
152 | - **Purpose**: Retrieves metadata and status information about an existing chat session.
153 |
154 | - **Main Features**:
155 | - Sends a `get_chat_info` command to the server.
156 | - Extracts and displays information about the chat session.
157 |
158 | - **Key Arguments**:
159 | - `--server-ip`: IP address of the MCP server.
160 | - `--server-port`: Port number of the MCP server.
161 | - `--use-ssl`: Use SSL/TLS security
162 | - `--accept-self-signed`: Accept self signed certificates
163 | - `--token`: Authentication token.
164 | - `--chat-id`: ID of the chat session to retrieve information for.
165 |
166 | - **Usage Example**:
167 | ```bash
168 | python MCPGetChatInfoClient.py ^
169 | --server-ip 127.0.0.1 ^
170 | --server-port 1234 ^
171 | --token MyToken ^
172 | --use-ssl ^
173 | --accept-self-signed ^
174 | --chat-id 6789
175 | ```
176 |
177 | ---
178 |
179 | ### 2.3 MCPDeleteAllChatsClient
180 | - **Purpose**: Deletes all chat history from the server.
181 |
182 | - **Main Features**:
183 | - Sends a `delete_all_chats` command to the MCP server.
184 | - Supports optional SSL/TLS encryption for secure communication.
185 | - Allows accepting self-signed certificates.
186 |
187 | - **Key Arguments**:
188 | - `--server-ip`: IP address of the MCP server.
189 | - `--server-port`: Port number of the MCP server.
190 | - `--token`: Authentication token.
191 | - `--use-ssl`: Enables SSL/TLS encryption.
192 | - `--accept-self-signed`: Accepts self-signed SSL certificates.
193 |
194 | - **Usage Example**:
195 | ```bash
196 | python MCPDeleteAllChatsClient.py ^
197 | --server-ip 127.0.0.1 ^
198 | --server-port 1234 ^
199 | --token MyToken ^
200 | --use-ssl ^
201 | --accept-self-signed
202 | ```
203 |
204 | ---
205 |
206 | ### 2.4 MCPDeleteChatClient
207 | - **Purpose**: Deletes a specific chat from the MCP server.
208 |
209 | - **Main Features**:
210 | - Sends a `delete_chat` command to the MCP server.
211 | - Supports optional SSL/TLS encryption for secure communication.
212 | - Allows accepting self-signed certificates.
213 |
214 | - **Key Arguments**:
215 | - `--server-ip`: IP address of the MCP server.
216 | - `--server-port`: Port number of the MCP server.
217 | - `--token`: Authentication token.
218 | - `--chat-id`: ID of the chat session to be deleted.
219 | - `--use-ssl`: Enables SSL/TLS encryption.
220 | - `--accept-self-signed`: Accepts self-signed SSL certificates.
221 |
222 | - **Usage Example**:
223 | ```bash
224 | python MCPDeleteChatClient.py ^
225 | --server-ip 127.0.0.1 ^
226 | --server-port 1234 ^
227 | --token MyToken ^
228 | --chat-id 6789 ^
229 | --use-ssl ^
230 | --accept-self-signed
231 | ```
232 | ---
233 |
234 | ### 3.0 MCPCreateSourceClient
235 | - **Purpose**: Creates a new source on the MCP server and associates it with specified groups.
236 |
237 | - **Main Features**:
238 | - Sends a `create_source` command with details such as name, content, and associated groups.
239 | - Provides robust error handling for missing arguments and server communication issues.
240 |
241 | - **Key Arguments**:
242 | - `--server-ip`: IP address of the MCP server.
243 | - `--server-port`: Port number of the MCP server.
244 | - `--use-ssl`: Use SSL/TLS security
245 | - `--accept-self-signed`: Accept self signed certificates
246 | - `--token`: Authentication token for the session.
247 | - `--name`: Name of the source to create.
248 | - `--content`: Content of the source in plain text or markdown.
249 | - `--groups`: (Optional) List of groups to associate with the source.
250 |
251 | - **Usage Example**:
252 | ```bash
253 | python MCPCreateSourceClient.py ^
254 | --server-ip 127.0.0.1 ^
255 | --server-port 1234 ^
256 | --token MyToken ^
257 | --name "Sample Source" ^
258 | --content "This is a test content" ^
259 | --use-ssl ^
260 | --accept-self-signed ^
261 | --groups devops hr
262 | ```
263 |
264 | ---
265 |
266 | ### 3.1 MCPGetSourceClient
267 | - **Purpose**: Fetches detailed information about a specific source from the MCP server.
268 |
269 | - **Main Features**:
270 | - Sends a `get_source` command to the server with the source ID as a parameter.
271 | - Retrieves and displays the source's metadata and contents.
272 |
273 | - **Key Arguments**:
274 | - `--server-ip`: IP address of the MCP server.
275 | - `--server-port`: Port number of the MCP server.
276 | - `--use-ssl`: Use SSL/TLS security
277 | - `--accept-self-signed`: Accept self signed certificates
278 | - `--token`: Authentication token for the server.
279 | - `--source-id`: Unique ID of the source to retrieve.
280 |
281 | - **Usage Example**:
282 | ```bash
283 | python MCPGetSourceClient.py ^
284 | --server-ip 127.0.0.1 ^
285 | --server-port 1234 ^
286 | --token MyToken ^
287 | --use-ssl ^
288 | --accept-self-signed ^
289 | --source-id 12345
290 | ```
291 |
292 | ### 3.2 MCPListSourcesClient
293 | - **Purpose**: Lists all sources belonging to a specified group on the MCP server.
294 |
295 | - **Main Features**:
296 | - Sends a `list_sources` command with the group name as a parameter.
297 | - Displays a list of sources available in the specified group.
298 |
299 | - **Key Arguments**:
300 | - `--server-ip`: IP address of the MCP server.
301 | - `--server-port`: Port number of the MCP server.
302 | - `--use-ssl`: Use SSL/TLS security
303 | - `--accept-self-signed`: Accept self signed certificates
304 | - `--token`: Authentication token for the server.
305 | - `--group-name`: Name of the group for which to list sources.
306 |
307 | - **Usage Example**:
308 | ```bash
309 | python MCPListSourcesClient.py ^
310 | --server-ip 127.0.0.1 ^
311 | --server-port 1234 ^
312 | --token MyToken ^
313 | --use-ssl ^
314 | --accept-self-signed ^
315 | --group-name devops
316 | ```
317 |
318 | ### 3.3 MCPEditSourceClient
319 | - **Purpose**: Edits the details of an existing source on the MCP server.
320 |
321 | - **Main Features**:
322 | - Sends an `edit_source` command with optional updates for the source title, content, and group associations.
323 | - Supports adding or updating multiple groups for the source.
324 |
325 | - **Key Arguments**:
326 | - `--server-ip`: IP address of the MCP server.
327 | - `--server-port`: Port number of the MCP server.
328 | - `--use-ssl`: Use SSL/TLS security
329 | - `--accept-self-signed`: Accept self signed certificates
330 | - `--token`: Authentication token for the server.
331 | - `--source-id`: ID of the source to edit.
332 | - `--title`: (Optional) New title for the source.
333 | - `--content`: (Optional) New content for the source.
334 | - `--groups`: (Optional) List of groups to associate with the source.
335 |
336 | - **Usage Example**:
337 | ```bash
338 | python MCPEditSourceClient.py ^
339 | --server-ip 127.0.0.1 ^
340 | --server-port 1234 ^
341 | --token MyToken ^
342 | --source-id 12345 ^
343 | --title "Updated Title" ^
344 | --content "Updated content for the source." ^
345 | --use-ssl ^
346 | --accept-self-signed ^
347 | --groups devops finance
348 | ```
349 |
350 | ### 3.4 MCPDeleteSourceClient
351 | - **Purpose**: Deletes a specific source from the MCP server.
352 |
353 | - **Main Features**:
354 | - Sends a `delete_source` command to remove the source identified by its ID.
355 |
356 | - **Key Arguments**:
357 | - `--server-ip`: IP address of the MCP server.
358 | - `--server-port`: Port number of the MCP server.
359 | - `--use-ssl`: Use SSL/TLS security
360 | - `--accept-self-signed`: Accept self signed certificates
361 | - `--token`: Authentication token for the server.
362 | - `--source-id`: ID of the source to delete.
363 |
364 | - **Usage Example**:
365 | ```bash
366 | python MCPDeleteSourceClient.py ^
367 | --server-ip 127.0.0.1 ^
368 | --server-port 1234 ^
369 | --token MyToken ^
370 | --use-ssl ^
371 | --accept-self-signed ^
372 | --source-id 12345
373 | ```
374 |
375 | ---
376 |
377 | ### 4.0 MCPListGroupsClient
378 | - **Purpose**:
379 | Lists all the groups available on the MCP server.
380 |
381 | - **Main Features**:
382 | - Sends a `list_groups` command to retrieve the available groups.
383 | - Outputs the groups in JSON format.
384 |
385 | - **Key Arguments**:
386 | - `--server-ip`: IP address of the MCP server.
387 | - `--server-port`: Port number of the MCP server.
388 | - `--use-ssl`: Use SSL/TLS security
389 | - `--accept-self-signed`: Accept self signed certificates
390 | - `--token`: Authentication token for the session.
391 |
392 | - **Usage Example**:
393 | ```bash
394 | python MCPListGroupsClient.py ^
395 | --server-ip 127.0.0.1 ^
396 | --server-port 1234 ^
397 | --use-ssl ^
398 | --accept-self-signed ^
399 | --token MyToken
400 | ```
401 |
402 | ### 4.1 MCPStoreGroupClient
403 | - **Purpose**:
404 | - Creates or updates a group on the MCP server.
405 |
406 | - **Main Features**:
407 | - Sends a `store_group` command with the group's name and description.
408 | - Allows creation of new groups or modification of existing ones.
409 |
410 | - **Key Arguments**:
411 | - `--server-ip`: IP address of the MCP server.
412 | - `--server-port`: Port number of the MCP server.
413 | - `--use-ssl`: Use SSL/TLS security
414 | - `--accept-self-signed`: Accept self signed certificates
415 | - `--token`: Authentication token for the session.
416 | - `--group-name`: Name of the group to create or update.
417 | - `--description`: (Optional) Description of the group.
418 |
419 | - **Usage Example**:
420 | ```bash
421 | python MCPStoreGroupClient.py ^
422 | --server-ip 127.0.0.1 ^
423 | --server-port 1234 ^
424 | --token MyToken ^
425 | --group-name "Team DevOps" ^
426 | --use-ssl ^
427 | --accept-self-signed ^
428 | --description "Group for development and operations"
429 | ```
430 |
431 | ### 4.2 MCPDeleteGroupClient
432 | - **Purpose**:
433 | - Deletes a specified group from the MCP server.
434 |
435 | - **Main Features**:
436 | - Sends a `delete_group` command with the group name.
437 | - Ensures the group is removed from the server.
438 |
439 | - **Key Arguments**:
440 | - `--server-ip`: IP address of the MCP server.
441 | - `--server-port`: Port number of the MCP server.
442 | - `--use-ssl`: Use SSL/TLS security
443 | - `--accept-self-signed`: Accept self signed certificates
444 | - `--token`: Authentication token for the session.
445 | - `--group-name`: Name of the group to delete.
446 |
447 | - **Usage Example**:
448 | ```bash
449 | python MCPDeleteGroupClient.py ^
450 | --server-ip 127.0.0.1 ^
451 | --server-port 1234 ^
452 | --token MyToken ^
453 | --use-ssl ^
454 | --accept-self-signed ^
455 | --group-name "Team DevOps"
456 | ```
457 |
458 | ---
459 |
460 | ### 5.0 MCPStoreUserClient
461 | - **Purpose:** Creates or updates user details on the MCP server.
462 |
463 | - **Main Features:**
464 | - Sends a `store_user` command with comprehensive user details.
465 | - Allows specification of default values for language and timezone if not provided.
466 |
467 | - **Key Arguments:**
468 | - `--server-ip`: IP address of the MCP server.
469 | - `--server-port`: Port number of the MCP server.
470 | - `--use-ssl`: Use SSL/TLS security
471 | - `--accept-self-signed`: Accept self signed certificates
472 | - `--token`: Authentication token.
473 | - `--name`: Name of the user.
474 | - `--email`: Email address of the user.
475 | - `--password`: Password for the user account.
476 | - `--language` (Optional): User's preferred language (default: "en").
477 | - `--timezone` (Optional): User's timezone (default: "Europe/Berlin").
478 | - `--roles` (Optional): Roles assigned to the user.
479 | - `--groups` (Optional): Groups the user belongs to.
480 | - `--usePublic` (Optional): Flag to set the user as public.
481 | - `--activateFtp` (Optional): Flag to activate FTP access.
482 | - `--ftpPassword` (Optional): Password for FTP access.
483 |
484 | **Usage Example:**
485 | ```bash
486 | python MCPStoreUserClient.py ^
487 | --server-ip 127.0.0.1 ^
488 | --server-port 1234 ^
489 | --use-ssl ^
490 | --accept-self-signed ^
491 | --token MyToken ^
492 | --name John ^
493 | --email [email protected] ^
494 | --password secret ^
495 | --language en ^
496 | --roles admin manager ^
497 | --groups devops finance ^
498 | --usePublic ^
499 | --activateFtp ^
500 | --ftpPassword ftpPass123
501 | ```
502 |
503 | ### 5.1 MCPEditUserClient
504 | - **Purpose:** Modifies the details of an existing user on the MCP server.
505 |
506 | - **Main Features:**
507 | - Sends an `edit_user` command with the specified user details.
508 | - Supports conditional sending of fields to avoid unnecessary data transmission.
509 |
510 | - **Key Arguments:**
511 | - `--server-ip`: IP address of the MCP server.
512 | - `--server-port`: Port number of the MCP server.
513 | - `--use-ssl`: Use SSL/TLS security
514 | - `--accept-self-signed`: Accept self signed certificates
515 | - `--token`: Authentication token.
516 | - `--user-id`: ID of the user to modify.
517 | - `--name` (Optional): New name of the user.
518 | - `--email` (Optional): New email for the user.
519 | - `--password` (Optional): New password for the user.
520 | - `--language` (Optional): New language for the user.
521 | - `--timezone` (Optional): New timezone for the user.
522 | - `--roles` (Optional): New roles for the user.
523 | - `--groups` (Optional): New groups for the user.
524 | - `--usePublic` (Optional): Flag to set the user as public.
525 | - `--activateFtp` (Optional): Flag to activate FTP for the user.
526 | - `--ftpPassword` (Optional): New password for FTP access.
527 |
528 | - **Usage Example:**
529 | ```bash
530 | python MCPEditUserClient.py ^
531 | --server-ip 127.0.0.1 ^
532 | --server-port 1234 ^
533 | --use-ssl ^
534 | --accept-self-signed ^
535 | --token MyToken ^
536 | --user-id 12345 ^
537 | --name Jane ^
538 | --roles manager devops ^
539 | --groups hr devops
540 | ```
541 |
542 | ### 5.2 MCPDeleteUserClient
543 | - **Purpose:** Deletes a user from the MCP server.
544 |
545 | - **Main Features:**
546 | - Sends a `delete_user` command using the user's email as an identifier.
547 |
548 | - **Key Arguments:**
549 | - `--server-ip`: IP address of the MCP server.
550 | - `--server-port`: Port number of the MCP server.
551 | - `--email`: Email address of the user to delete.
552 | - `--use-ssl`: Use SSL/TLS security
553 | - `--accept-self-signed`: Accept self signed certificates
554 | - `--token`: Authentication token.
555 |
556 | - **Usage Example:**
557 | ```bash
558 | python MCPDeleteUserClient.py ^
559 | --server-ip 127.0.0.1 ^
560 | --server-port 1234 ^
561 | --use-ssl ^
562 | --accept-self-signed ^
563 | --token MyToken ^
564 | --email [email protected]
565 | ```
566 |
567 | ---
568 |
569 | ## General Notes
570 | **JSON Communication:**
571 | - Each file constructs and sends JSON payloads specific to its functionality.
572 | - Responses from the server are parsed and displayed in JSON format.
573 |
574 | **Socket Communication:**
575 | - The files use Python's Socket class for establishing TCP connections with the MCP server.
576 |
577 | **Error Handling:**
578 | - The scripts handle missing or invalid arguments gracefully, printing clear usage instructions where necessary.
579 |
580 | **Examples:**
581 | - Replace placeholders (e.g., `<SERVER_IP>`, `<TOKEN>`) with actual values relevant to your environment.
582 |
583 | ## Prerequisites
584 | Python Environment: Make sure you have Python 3 installed on your system. You can check by running:
585 | ```bash
586 | python --version
587 | ```
588 |
589 | ## Dependencies:
590 | - No additional external modules are needed.
591 |
592 | ## Build and Run
593 | Run: Execute the python code (.py) with the appropriate parameters as described above.
594 |
595 | ## Error Handling
596 | Both clients include error handling for:
597 | - Missing or invalid parameters.
598 | - Server connection issues.
599 | - Unexpected server responses.
600 |
601 | ## Future Enhancements
602 | - Add support for SSL/TLS encryption for secure communication.
603 | - Implement a configuration file to simplify the command-line parameters.
604 | - Enhance error reporting with detailed server-side error codes.
605 |
606 | ## License
607 | This project is licensed under the MIT License - see the LICENSE file for details.
608 | This repository and/or code is provided "as is" without warranty of any kind, and use is at your own risk.
```