This is page 5 of 16. Use http://codebase.md/fujitsu-ai/mcp-server-for-mas-developments?format=md&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
│   ├── 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# .Net/5.2 mcp_delete_user/Program.cs:
--------------------------------------------------------------------------------

```csharp
using System;
using System.Net.Sockets;
using System.Text;
using Newtonsoft.Json;

namespace MCPDeleteUserClient
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 8)
            {
                Console.WriteLine("Usage: --server-ip <IP> --server-port <PORT> --email <EMAIL> --token <TOKEN>");
                return;
            }

            string serverIp = GetArgument(args, "--server-ip");
            int serverPort = int.Parse(GetArgument(args, "--server-port"));
            string email = GetArgument(args, "--email");
            string token = GetArgument(args, "--token");

            var payload = new
            {
                command = "delete_user",
                token = token,
                arguments = new
                {
                    email = email
                }
            };

            Console.WriteLine("📤 Sending delete user request...");
            string response = SendRequest(serverIp, serverPort, payload);
            Console.WriteLine("✔️ Response from server:");
            Console.WriteLine(response);
        }

        static string GetArgument(string[] args, string key)
        {
            int index = Array.IndexOf(args, key);
            return index >= 0 && index < args.Length - 1 ? args[index + 1] : null;
        }

        static string SendRequest(string serverIp, int serverPort, object payload)
        {
            string payloadJson = JsonConvert.SerializeObject(payload);

            try
            {
                using (TcpClient client = new TcpClient(serverIp, serverPort))
                {
                    NetworkStream stream = client.GetStream();

                    // Send payload
                    byte[] data = Encoding.UTF8.GetBytes(payloadJson);
                    stream.Write(data, 0, data.Length);

                    // Receive response
                    byte[] buffer = new byte[4096];
                    int bytesRead;
                    StringBuilder response = new StringBuilder();

                    do
                    {
                        bytesRead = stream.Read(buffer, 0, buffer.Length);
                        response.Append(Encoding.UTF8.GetString(buffer, 0, bytesRead));
                    } while (bytesRead == buffer.Length);

                    return response.ToString();
                }
            }
            catch (Exception e)
            {
                return $"Error: {e.Message}";
            }
        }
    }
}

```

--------------------------------------------------------------------------------
/clients/C# .Net/Code Archiv/mcp_delete_user.cs:
--------------------------------------------------------------------------------

```csharp
using System;
using System.Net.Sockets;
using System.Text;
using Newtonsoft.Json;

namespace MCPDeleteUserClient
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 8)
            {
                Console.WriteLine("Usage: --server-ip <IP> --server-port <PORT> --email <EMAIL> --token <TOKEN>");
                return;
            }

            string serverIp = GetArgument(args, "--server-ip");
            int serverPort = int.Parse(GetArgument(args, "--server-port"));
            string email = GetArgument(args, "--email");
            string token = GetArgument(args, "--token");

            var payload = new
            {
                command = "delete_user",
                token = token,
                arguments = new
                {
                    email = email
                }
            };

            Console.WriteLine("📤 Sending delete user request...");
            string response = SendRequest(serverIp, serverPort, payload);
            Console.WriteLine("✔️ Response from server:");
            Console.WriteLine(response);
        }

        static string GetArgument(string[] args, string key)
        {
            int index = Array.IndexOf(args, key);
            return index >= 0 && index < args.Length - 1 ? args[index + 1] : null;
        }

        static string SendRequest(string serverIp, int serverPort, object payload)
        {
            string payloadJson = JsonConvert.SerializeObject(payload);

            try
            {
                using (TcpClient client = new TcpClient(serverIp, serverPort))
                {
                    NetworkStream stream = client.GetStream();

                    // Send payload
                    byte[] data = Encoding.UTF8.GetBytes(payloadJson);
                    stream.Write(data, 0, data.Length);

                    // Receive response
                    byte[] buffer = new byte[4096];
                    int bytesRead;
                    StringBuilder response = new StringBuilder();

                    do
                    {
                        bytesRead = stream.Read(buffer, 0, buffer.Length);
                        response.Append(Encoding.UTF8.GetString(buffer, 0, bytesRead));
                    } while (bytesRead == buffer.Length);

                    return response.ToString();
                }
            }
            catch (Exception e)
            {
                return $"Error: {e.Message}";
            }
        }
    }
}

```

--------------------------------------------------------------------------------
/clients/Python/2.3 mcp_delete_all_chats/MCPDeleteAllChatsClient.py:
--------------------------------------------------------------------------------

```python
import socket
import ssl
import json
import argparse

def send_request(server_ip, server_port, payload, use_ssl=True, accept_self_signed=False):
    """
    Sends a generic request to the server.
    """
    payload_json = json.dumps(payload)
    
    raw_socket = None
    client_socket = None
    
    try:
        raw_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        raw_socket.settimeout(10)

        if use_ssl:
            context = ssl.create_default_context()
            if accept_self_signed:
                context.check_hostname = False
                context.verify_mode = ssl.CERT_NONE
            client_socket = context.wrap_socket(raw_socket, server_hostname=server_ip)
        else:
            client_socket = raw_socket
        
        client_socket.connect((server_ip, server_port))
        client_socket.sendall(payload_json.encode('utf-8'))

        response = b""
        while True:
            part = client_socket.recv(4096)
            if not part:
                break
            response += part

        return json.loads(response.decode('utf-8'))
    except ssl.SSLError:
        return {"status": "error", "message": "Connection failed: Server and/or client may require TLS encryption. Please enable SSL/TLS."}
    except Exception as e:
        return {"status": "error", "message": str(e)}
    
    finally:
        if client_socket is not None:
            try:
                client_socket.shutdown(socket.SHUT_RDWR)
            except:
                pass
            client_socket.close()

if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Deletes all chat history from the server.")
    parser.add_argument("--server-ip", required=True, help="IP address of the MCP server")
    parser.add_argument("--server-port", required=True, type=int, help="Port number of the MCP server")
    parser.add_argument("--token", required=True, help="Authentication token")
    parser.add_argument("--use-ssl", action="store_true", help="Connect using SSL/TLS")
    parser.add_argument("--accept-self-signed", action="store_true", help="Accept self-signed certificates (disable certificate verification)")

    args = parser.parse_args()

    payload = {
        "command": "delete_all_chats",
        "token": args.token
    }

    print("📤 Sending request to delete all chats...")
    response = send_request(args.server_ip, args.server_port, payload, use_ssl=args.use_ssl, accept_self_signed=args.accept_self_signed)
    print("✔️ Response:", json.dumps(response, indent=2))

```

--------------------------------------------------------------------------------
/clients/C# .Net/3.4 mcp_delete_source/Program.cs:
--------------------------------------------------------------------------------

```csharp
using System;
using System.Net.Sockets;
using System.Text;
using Newtonsoft.Json;

namespace MCPDeleteSourceClient
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 4)
            {
                Console.WriteLine("Usage: --server-ip <IP> --server-port <PORT> --token <TOKEN> --source-id <SOURCE_ID>");
                return;
            }

            string serverIp = GetArgument(args, "--server-ip");
            int serverPort = int.Parse(GetArgument(args, "--server-port"));
            string token = GetArgument(args, "--token");
            string sourceId = GetArgument(args, "--source-id");

            Console.WriteLine("📤 Sending request to delete source...");

            var payload = new
            {
                command = "delete_source",
                token = token,
                arguments = new
                {
                    sourceId = sourceId
                }
            };

            string response = SendRequest(serverIp, serverPort, payload);

            Console.WriteLine("✔️ Response from server:");
            Console.WriteLine(response);
        }

        static string GetArgument(string[] args, string key)
        {
            int index = Array.IndexOf(args, key);
            return index >= 0 && index < args.Length - 1 ? args[index + 1] : null;
        }

        static string SendRequest(string serverIp, int serverPort, object payload)
        {
            string payloadJson = JsonConvert.SerializeObject(payload);

            try
            {
                using (TcpClient client = new TcpClient(serverIp, serverPort))
                {
                    NetworkStream stream = client.GetStream();

                    // Send payload
                    byte[] data = Encoding.UTF8.GetBytes(payloadJson);
                    stream.Write(data, 0, data.Length);

                    // Receive response
                    byte[] buffer = new byte[4096];
                    int bytesRead;
                    StringBuilder response = new StringBuilder();

                    do
                    {
                        bytesRead = stream.Read(buffer, 0, buffer.Length);
                        response.Append(Encoding.UTF8.GetString(buffer, 0, bytesRead));
                    } while (bytesRead == buffer.Length);

                    return response.ToString();
                }
            }
            catch (Exception e)
            {
                return $"Error: {e.Message}";
            }
        }
    }
}

```

--------------------------------------------------------------------------------
/clients/C# .Net/Code Archiv/mcp_delete_source.cs:
--------------------------------------------------------------------------------

```csharp
using System;
using System.Net.Sockets;
using System.Text;
using Newtonsoft.Json;

namespace MCPDeleteSourceClient
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 4)
            {
                Console.WriteLine("Usage: --server-ip <IP> --server-port <PORT> --token <TOKEN> --source-id <SOURCE_ID>");
                return;
            }

            string serverIp = GetArgument(args, "--server-ip");
            int serverPort = int.Parse(GetArgument(args, "--server-port"));
            string token = GetArgument(args, "--token");
            string sourceId = GetArgument(args, "--source-id");

            Console.WriteLine("📤 Sending request to delete source...");

            var payload = new
            {
                command = "delete_source",
                token = token,
                arguments = new
                {
                    sourceId = sourceId
                }
            };

            string response = SendRequest(serverIp, serverPort, payload);

            Console.WriteLine("✔️ Response from server:");
            Console.WriteLine(response);
        }

        static string GetArgument(string[] args, string key)
        {
            int index = Array.IndexOf(args, key);
            return index >= 0 && index < args.Length - 1 ? args[index + 1] : null;
        }

        static string SendRequest(string serverIp, int serverPort, object payload)
        {
            string payloadJson = JsonConvert.SerializeObject(payload);

            try
            {
                using (TcpClient client = new TcpClient(serverIp, serverPort))
                {
                    NetworkStream stream = client.GetStream();

                    // Send payload
                    byte[] data = Encoding.UTF8.GetBytes(payloadJson);
                    stream.Write(data, 0, data.Length);

                    // Receive response
                    byte[] buffer = new byte[4096];
                    int bytesRead;
                    StringBuilder response = new StringBuilder();

                    do
                    {
                        bytesRead = stream.Read(buffer, 0, buffer.Length);
                        response.Append(Encoding.UTF8.GetString(buffer, 0, bytesRead));
                    } while (bytesRead == buffer.Length);

                    return response.ToString();
                }
            }
            catch (Exception e)
            {
                return $"Error: {e.Message}";
            }
        }
    }
}

```

--------------------------------------------------------------------------------
/clients/C# .Net/3.1 mcp_get_source/Program.cs:
--------------------------------------------------------------------------------

```csharp
using System;
using System.Net.Sockets;
using System.Text;
using Newtonsoft.Json;

namespace MCPGetSourceClient
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 4)
            {
                Console.WriteLine("Usage: --server-ip <IP> --server-port <PORT> --token <TOKEN> --source-id <SOURCE_ID>");
                return;
            }

            string serverIp = GetArgument(args, "--server-ip");
            int serverPort = int.Parse(GetArgument(args, "--server-port"));
            string token = GetArgument(args, "--token");
            string sourceId = GetArgument(args, "--source-id");

            Console.WriteLine("📤 Sending request to get source information...");

            var payload = new
            {
                command = "get_source",
                token = token,
                arguments = new
                {
                    sourceId = sourceId
                }
            };

            string response = SendRequest(serverIp, serverPort, payload);

            Console.WriteLine("✔️ Response from server:");
            Console.WriteLine(response);
        }

        static string GetArgument(string[] args, string key)
        {
            int index = Array.IndexOf(args, key);
            return index >= 0 && index < args.Length - 1 ? args[index + 1] : null;
        }

        static string SendRequest(string serverIp, int serverPort, object payload)
        {
            string payloadJson = JsonConvert.SerializeObject(payload);

            try
            {
                using (TcpClient client = new TcpClient(serverIp, serverPort))
                {
                    NetworkStream stream = client.GetStream();

                    // Send payload
                    byte[] data = Encoding.UTF8.GetBytes(payloadJson);
                    stream.Write(data, 0, data.Length);

                    // Receive response
                    byte[] buffer = new byte[4096];
                    int bytesRead;
                    StringBuilder response = new StringBuilder();

                    do
                    {
                        bytesRead = stream.Read(buffer, 0, buffer.Length);
                        response.Append(Encoding.UTF8.GetString(buffer, 0, bytesRead));
                    } while (bytesRead == buffer.Length);

                    return response.ToString();
                }
            }
            catch (Exception e)
            {
                return $"Error: {e.Message}";
            }
        }
    }
}

```

--------------------------------------------------------------------------------
/clients/C# .Net/4.2 mcp_delete_group/Program.cs:
--------------------------------------------------------------------------------

```csharp
using System;
using System.Net.Sockets;
using System.Text;
using Newtonsoft.Json;

namespace MCPDeleteGroupClient
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 8)
            {
                Console.WriteLine("Usage: --server-ip <IP> --server-port <PORT> --token <TOKEN> --group-name <GROUP_NAME>");
                return;
            }

            string serverIp = GetArgument(args, "--server-ip");
            int serverPort = int.Parse(GetArgument(args, "--server-port"));
            string token = GetArgument(args, "--token");
            string groupName = GetArgument(args, "--group-name");

            Console.WriteLine("📤 Sending request to delete group...");

            var payload = new
            {
                command = "delete_group",
                token = token,
                arguments = new
                {
                    groupName = groupName
                }
            };

            string response = SendRequest(serverIp, serverPort, payload);

            Console.WriteLine("✔️ Response from server:");
            Console.WriteLine(response);
        }

        static string GetArgument(string[] args, string key)
        {
            int index = Array.IndexOf(args, key);
            return index >= 0 && index < args.Length - 1 ? args[index + 1] : null;
        }

        static string SendRequest(string serverIp, int serverPort, object payload)
        {
            string payloadJson = JsonConvert.SerializeObject(payload);

            try
            {
                using (TcpClient client = new TcpClient(serverIp, serverPort))
                {
                    NetworkStream stream = client.GetStream();

                    // Send payload
                    byte[] data = Encoding.UTF8.GetBytes(payloadJson);
                    stream.Write(data, 0, data.Length);

                    // Receive response
                    byte[] buffer = new byte[4096];
                    int bytesRead;
                    StringBuilder response = new StringBuilder();

                    do
                    {
                        bytesRead = stream.Read(buffer, 0, buffer.Length);
                        response.Append(Encoding.UTF8.GetString(buffer, 0, bytesRead));
                    } while (bytesRead == buffer.Length);

                    return response.ToString();
                }
            }
            catch (Exception e)
            {
                return $"Error: {e.Message}";
            }
        }
    }
}

```

--------------------------------------------------------------------------------
/clients/C# .Net/Code Archiv/mcp_delete_group.cs:
--------------------------------------------------------------------------------

```csharp
using System;
using System.Net.Sockets;
using System.Text;
using Newtonsoft.Json;

namespace MCPDeleteGroupClient
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 8)
            {
                Console.WriteLine("Usage: --server-ip <IP> --server-port <PORT> --token <TOKEN> --group-name <GROUP_NAME>");
                return;
            }

            string serverIp = GetArgument(args, "--server-ip");
            int serverPort = int.Parse(GetArgument(args, "--server-port"));
            string token = GetArgument(args, "--token");
            string groupName = GetArgument(args, "--group-name");

            Console.WriteLine("📤 Sending request to delete group...");

            var payload = new
            {
                command = "delete_group",
                token = token,
                arguments = new
                {
                    groupName = groupName
                }
            };

            string response = SendRequest(serverIp, serverPort, payload);

            Console.WriteLine("✔️ Response from server:");
            Console.WriteLine(response);
        }

        static string GetArgument(string[] args, string key)
        {
            int index = Array.IndexOf(args, key);
            return index >= 0 && index < args.Length - 1 ? args[index + 1] : null;
        }

        static string SendRequest(string serverIp, int serverPort, object payload)
        {
            string payloadJson = JsonConvert.SerializeObject(payload);

            try
            {
                using (TcpClient client = new TcpClient(serverIp, serverPort))
                {
                    NetworkStream stream = client.GetStream();

                    // Send payload
                    byte[] data = Encoding.UTF8.GetBytes(payloadJson);
                    stream.Write(data, 0, data.Length);

                    // Receive response
                    byte[] buffer = new byte[4096];
                    int bytesRead;
                    StringBuilder response = new StringBuilder();

                    do
                    {
                        bytesRead = stream.Read(buffer, 0, buffer.Length);
                        response.Append(Encoding.UTF8.GetString(buffer, 0, bytesRead));
                    } while (bytesRead == buffer.Length);

                    return response.ToString();
                }
            }
            catch (Exception e)
            {
                return $"Error: {e.Message}";
            }
        }
    }
}

```

--------------------------------------------------------------------------------
/clients/C# .Net/Code Archiv/mcp_get_source.cs:
--------------------------------------------------------------------------------

```csharp
using System;
using System.Net.Sockets;
using System.Text;
using Newtonsoft.Json;

namespace MCPGetSourceClient
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 4)
            {
                Console.WriteLine("Usage: --server-ip <IP> --server-port <PORT> --token <TOKEN> --source-id <SOURCE_ID>");
                return;
            }

            string serverIp = GetArgument(args, "--server-ip");
            int serverPort = int.Parse(GetArgument(args, "--server-port"));
            string token = GetArgument(args, "--token");
            string sourceId = GetArgument(args, "--source-id");

            Console.WriteLine("📤 Sending request to get source information...");

            var payload = new
            {
                command = "get_source",
                token = token,
                arguments = new
                {
                    sourceId = sourceId
                }
            };

            string response = SendRequest(serverIp, serverPort, payload);

            Console.WriteLine("✔️ Response from server:");
            Console.WriteLine(response);
        }

        static string GetArgument(string[] args, string key)
        {
            int index = Array.IndexOf(args, key);
            return index >= 0 && index < args.Length - 1 ? args[index + 1] : null;
        }

        static string SendRequest(string serverIp, int serverPort, object payload)
        {
            string payloadJson = JsonConvert.SerializeObject(payload);

            try
            {
                using (TcpClient client = new TcpClient(serverIp, serverPort))
                {
                    NetworkStream stream = client.GetStream();

                    // Send payload
                    byte[] data = Encoding.UTF8.GetBytes(payloadJson);
                    stream.Write(data, 0, data.Length);

                    // Receive response
                    byte[] buffer = new byte[4096];
                    int bytesRead;
                    StringBuilder response = new StringBuilder();

                    do
                    {
                        bytesRead = stream.Read(buffer, 0, buffer.Length);
                        response.Append(Encoding.UTF8.GetString(buffer, 0, bytesRead));
                    } while (bytesRead == buffer.Length);

                    return response.ToString();
                }
            }
            catch (Exception e)
            {
                return $"Error: {e.Message}";
            }
        }
    }
}

```

--------------------------------------------------------------------------------
/clients/C# .Net/2.2 mcp_get_chat_info/Program.cs:
--------------------------------------------------------------------------------

```csharp
using System;
using System.Net.Sockets;
using System.Text;
using Newtonsoft.Json;

namespace MCPChatInfoClient
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 4)
            {
                Console.WriteLine("Usage: --server-ip <IP> --server-port <PORT> --token <TOKEN> --chat-id <CHAT_ID>");
                return;
            }

            string serverIp = GetArgument(args, "--server-ip");
            int serverPort = int.Parse(GetArgument(args, "--server-port"));
            string token = GetArgument(args, "--token");
            string chatId = GetArgument(args, "--chat-id");

            var payload = new
            {
                command = "get_chat_info",
                token = token,
                arguments = new
                {
                    chatId = chatId
                }
            };

            Console.WriteLine("📤 Anfrage senden...");
            string response = SendRequest(serverIp, serverPort, payload);
            Console.WriteLine("✔️ Antwort:");
            Console.WriteLine(response);
        }

        static string GetArgument(string[] args, string key)
        {
            int index = Array.IndexOf(args, key);
            return index >= 0 && index < args.Length - 1 ? args[index + 1] : null;
        }

        static string SendRequest(string serverIp, int serverPort, object payload)
        {
            string payloadJson = JsonConvert.SerializeObject(payload);

            try
            {
                using (TcpClient client = new TcpClient(serverIp, serverPort))
                {
                    NetworkStream stream = client.GetStream();

                    // Send payload
                    byte[] data = Encoding.UTF8.GetBytes(payloadJson);
                    stream.Write(data, 0, data.Length);

                    // Receive response
                    byte[] buffer = new byte[4096];
                    int bytesRead;
                    StringBuilder response = new StringBuilder();

                    do
                    {
                        bytesRead = stream.Read(buffer, 0, buffer.Length);
                        response.Append(Encoding.UTF8.GetString(buffer, 0, bytesRead));
                    } while (bytesRead == buffer.Length);

                    return response.ToString();
                }
            }
            catch (Exception e)
            {
                return JsonConvert.SerializeObject(new { status = "error", message = e.Message });
            }
        }
    }
}

```

--------------------------------------------------------------------------------
/clients/C# .Net/3.2 mcp_list_sources/Program.cs:
--------------------------------------------------------------------------------

```csharp
using System;
using System.Net.Sockets;
using System.Text;
using Newtonsoft.Json;

namespace MCPListSourcesClient
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 8)
            {
                Console.WriteLine("Usage: --server-ip <IP> --server-port <PORT> --token <TOKEN> --group-name <GROUP_NAME>");
                return;
            }

            string serverIp = GetArgument(args, "--server-ip");
            int serverPort = int.Parse(GetArgument(args, "--server-port"));
            string token = GetArgument(args, "--token");
            string groupName = GetArgument(args, "--group-name");

            Console.WriteLine("📤 Sending request to list sources...");

            var payload = new
            {
                command = "list_sources",
                token = token,
                attributes = new
                {
                    groupName = groupName
                }
            };

            string response = SendRequest(serverIp, serverPort, payload);

            Console.WriteLine("✔️ Response from server:");
            Console.WriteLine(response);
        }

        static string GetArgument(string[] args, string key)
        {
            int index = Array.IndexOf(args, key);
            return index >= 0 && index < args.Length - 1 ? args[index + 1] : null;
        }

        static string SendRequest(string serverIp, int serverPort, object payload)
        {
            string payloadJson = JsonConvert.SerializeObject(payload);

            try
            {
                using (TcpClient client = new TcpClient(serverIp, serverPort))
                {
                    NetworkStream stream = client.GetStream();

                    // Send payload
                    byte[] data = Encoding.UTF8.GetBytes(payloadJson);
                    stream.Write(data, 0, data.Length);

                    // Receive response
                    byte[] buffer = new byte[4096];
                    int bytesRead;
                    StringBuilder response = new StringBuilder();

                    do
                    {
                        bytesRead = stream.Read(buffer, 0, buffer.Length);
                        response.Append(Encoding.UTF8.GetString(buffer, 0, bytesRead));
                    } while (bytesRead == buffer.Length);

                    return response.ToString();
                }
            }
            catch (Exception e)
            {
                return $"Error: {e.Message}";
            }
        }
    }
}

```

--------------------------------------------------------------------------------
/clients/C# .Net/Code Archiv/mcp_get_chat_info.cs:
--------------------------------------------------------------------------------

```csharp
using System;
using System.Net.Sockets;
using System.Text;
using Newtonsoft.Json;

namespace MCPChatInfoClient
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 4)
            {
                Console.WriteLine("Usage: --server-ip <IP> --server-port <PORT> --token <TOKEN> --chat-id <CHAT_ID>");
                return;
            }

            string serverIp = GetArgument(args, "--server-ip");
            int serverPort = int.Parse(GetArgument(args, "--server-port"));
            string token = GetArgument(args, "--token");
            string chatId = GetArgument(args, "--chat-id");

            var payload = new
            {
                command = "get_chat_info",
                token = token,
                arguments = new
                {
                    chatId = chatId
                }
            };

            Console.WriteLine("📤 Anfrage senden...");
            string response = SendRequest(serverIp, serverPort, payload);
            Console.WriteLine("✔️ Antwort:");
            Console.WriteLine(response);
        }

        static string GetArgument(string[] args, string key)
        {
            int index = Array.IndexOf(args, key);
            return index >= 0 && index < args.Length - 1 ? args[index + 1] : null;
        }

        static string SendRequest(string serverIp, int serverPort, object payload)
        {
            string payloadJson = JsonConvert.SerializeObject(payload);

            try
            {
                using (TcpClient client = new TcpClient(serverIp, serverPort))
                {
                    NetworkStream stream = client.GetStream();

                    // Send payload
                    byte[] data = Encoding.UTF8.GetBytes(payloadJson);
                    stream.Write(data, 0, data.Length);

                    // Receive response
                    byte[] buffer = new byte[4096];
                    int bytesRead;
                    StringBuilder response = new StringBuilder();

                    do
                    {
                        bytesRead = stream.Read(buffer, 0, buffer.Length);
                        response.Append(Encoding.UTF8.GetString(buffer, 0, bytesRead));
                    } while (bytesRead == buffer.Length);

                    return response.ToString();
                }
            }
            catch (Exception e)
            {
                return JsonConvert.SerializeObject(new { status = "error", message = e.Message });
            }
        }
    }
}

```

--------------------------------------------------------------------------------
/clients/C# .Net/Code Archiv/mcp_list_sources.cs:
--------------------------------------------------------------------------------

```csharp
using System;
using System.Net.Sockets;
using System.Text;
using Newtonsoft.Json;

namespace MCPListSourcesClient
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 8)
            {
                Console.WriteLine("Usage: --server-ip <IP> --server-port <PORT> --token <TOKEN> --group-name <GROUP_NAME>");
                return;
            }

            string serverIp = GetArgument(args, "--server-ip");
            int serverPort = int.Parse(GetArgument(args, "--server-port"));
            string token = GetArgument(args, "--token");
            string groupName = GetArgument(args, "--group-name");

            Console.WriteLine("📤 Sending request to list sources...");

            var payload = new
            {
                command = "list_sources",
                token = token,
                attributes = new
                {
                    groupName = groupName
                }
            };

            string response = SendRequest(serverIp, serverPort, payload);

            Console.WriteLine("✔️ Response from server:");
            Console.WriteLine(response);
        }

        static string GetArgument(string[] args, string key)
        {
            int index = Array.IndexOf(args, key);
            return index >= 0 && index < args.Length - 1 ? args[index + 1] : null;
        }

        static string SendRequest(string serverIp, int serverPort, object payload)
        {
            string payloadJson = JsonConvert.SerializeObject(payload);

            try
            {
                using (TcpClient client = new TcpClient(serverIp, serverPort))
                {
                    NetworkStream stream = client.GetStream();

                    // Send payload
                    byte[] data = Encoding.UTF8.GetBytes(payloadJson);
                    stream.Write(data, 0, data.Length);

                    // Receive response
                    byte[] buffer = new byte[4096];
                    int bytesRead;
                    StringBuilder response = new StringBuilder();

                    do
                    {
                        bytesRead = stream.Read(buffer, 0, buffer.Length);
                        response.Append(Encoding.UTF8.GetString(buffer, 0, bytesRead));
                    } while (bytesRead == buffer.Length);

                    return response.ToString();
                }
            }
            catch (Exception e)
            {
                return $"Error: {e.Message}";
            }
        }
    }
}

```

--------------------------------------------------------------------------------
/clients/Go/3.3 mcp_edit_source/MCPEditSourceClient.go:
--------------------------------------------------------------------------------

```go
package main

import (
	"bytes"
	"encoding/json"
	"errors"
	"flag"
	"fmt"
	"io"
	"net"
	"os"
)

type EditSourcePayload struct {
	Command   string                 `json:"command"`
	Token     string                 `json:"token"`
	Arguments map[string]interface{} `json:"arguments"`
}

func sendEditSourceRequest(serverIP string, serverPort int, token, sourceID, title, content string, groups []string) (string, error) {
	// Prepare the request payload
	arguments := map[string]interface{}{
		"sourceId": sourceID,
	}
	if title != "" {
		arguments["title"] = title
	}
	if content != "" {
		arguments["content"] = content
	}
	if len(groups) > 0 {
		arguments["groups"] = groups
	}

	payload := EditSourcePayload{
		Command:   "edit_source",
		Token:     token,
		Arguments: arguments,
	}

	// Convert the payload to JSON
	payloadJSON, err := json.Marshal(payload)
	if err != nil {
		return "", err
	}

	// Create a connection to the server
	conn, err := net.Dial("tcp", fmt.Sprintf("%s:%d", serverIP, serverPort))
	if err != nil {
		return "", err
	}
	defer conn.Close()

	// Send the request
	_, err = conn.Write(payloadJSON)
	if err != nil {
		return "", err
	}

	// Receive the response
	var responseBuffer bytes.Buffer
	buf := make([]byte, 4096)
	for {
		n, err := conn.Read(buf)
		if err != nil {
			if errors.Is(err, io.EOF) {
				break
			}
			return "", err
		}
		responseBuffer.Write(buf[:n])
		if n < 4096 {
			break
		}
	}

	return responseBuffer.String(), nil
}

func main() {
	serverIP := flag.String("server-ip", "", "IP address of the MCP server")
	serverPort := flag.Int("server-port", 0, "Port number of the MCP server")
	token := flag.String("token", "", "Authentication token")
	sourceID := flag.String("source-id", "", "ID of the source to edit")
	title := flag.String("title", "", "New title for the source (optional)")
	content := flag.String("content", "", "Updated content in markdown format (optional)")
	groups := flag.String("groups", "", "Comma-separated list of updated groups (optional)")

	flag.Parse()

	if *serverIP == "" || *serverPort == 0 || *token == "" || *sourceID == "" {
		fmt.Println("❌ ERROR: Required flags are missing.")
		flag.Usage()
		os.Exit(1)
	}

	// Convert groups to a slice
	groupList := []string{}
	if *groups != "" {
		groupList = append(groupList, *groups)
	}

	// Send the request to edit the source
	fmt.Println("📤 Sending request to edit source...")
	response, err := sendEditSourceRequest(*serverIP, *serverPort, *token, *sourceID, *title, *content, groupList)
	if err != nil {
		fmt.Printf("❌ ERROR: %v\n", err)
		os.Exit(1)
	}

	fmt.Println("✔️ Response from server:")
	fmt.Println(response)
}

```

--------------------------------------------------------------------------------
/clients/Gradio/mcp_servers/pgpt/config.py:
--------------------------------------------------------------------------------

```python
# Python/config.py

import json
import os
import logging
from language import languages


class ConfigError(Exception):
    pass


class Config:

    def __init__(self, config_file="config.json", required_fields=None):
        self.required_fields = required_fields if required_fields is not None else []
        self.config_file = config_file
        self.data = self.load_config()

        # 🔥 Sprache wird **vor** validate() gesetzt
        self.language = self.get("language", "en")
        if self.language not in languages:
            # Fallback zu Englisch, wenn die angegebene Sprache nicht unterstützt wird
            fallback_lang = "en"
            logging.warning(f"⚠️ Unsupported language '{self.language}', falling back to English.")
            self.language = fallback_lang
        self.lang = languages[self.language]  # ✅ Setzt self.lang vor validate()

        self.validate()


    def set_value(self, key, value):
        self.data[key] = value


    def set_value(self, key, value):
        self.data[key] = value

    def get_lang_message(self, key, **kwargs):
        """
        Sichere Methode zum Abrufen von Nachrichten aus dem Sprachwörterbuch.
        Wenn der Schlüssel nicht existiert, wird eine Standardnachricht zurückgegeben.
        """
        message = self.lang.get(key, "Message not defined.")
        try:
            return message.format(**kwargs)
        except KeyError as e:
            logging.error(f"Missing placeholder in language file for key '{key}': {e}")
            return message

    def load_config(self):
        if not os.path.exists(self.config_file):
            # Da die Sprache noch nicht geladen ist, verwenden wir Englisch für die Fehlermeldung
            fallback_lang = "en"
            message = languages[fallback_lang]['config_file_not_found'].format(config_file=self.config_file)
            logging.error(message)
            raise ConfigError(message)
        try:
            with open(self.config_file, "r", encoding="utf-8") as f:
                return json.load(f)
        except json.JSONDecodeError as e:
            fallback_lang = "en"
            message = languages[fallback_lang]['invalid_json_in_config'].format(error=str(e))
            logging.error(message)
            raise ConfigError(message)

    def validate(self):
        missing = [field for field in self.required_fields if field not in self.data]
        if missing:
            message = self.get_lang_message("missing_required_fields", fields=missing)
            logging.error(message)
            raise ConfigError(message)

    def get(self, key, default=None):
        return self.data.get(key, default)

```

--------------------------------------------------------------------------------
/examples/create_users_from_csv/config.py:
--------------------------------------------------------------------------------

```python
# Python/config.py

import json
import os
import logging
from language import languages


class ConfigError(Exception):
    pass


class Config:

    def __init__(self, config_file="config.json", required_fields=None):
        self.required_fields = required_fields if required_fields is not None else []
        self.config_file = config_file
        self.data = self.load_config()

        # 🔥 Sprache wird **vor** validate() gesetzt
        self.language = self.get("language", "en")
        if self.language not in languages:
            # Fallback zu Englisch, wenn die angegebene Sprache nicht unterstützt wird
            fallback_lang = "en"
            logging.warning(f"⚠️ Unsupported language '{self.language}', falling back to English.")
            self.language = fallback_lang
        self.lang = languages[self.language]  # ✅ Setzt self.lang vor validate()

        self.validate()


    def set_value(self, key, value):
        self.data[key] = value


    def set_value(self, key, value):
        self.data[key] = value

    def get_lang_message(self, key, **kwargs):
        """
        Sichere Methode zum Abrufen von Nachrichten aus dem Sprachwörterbuch.
        Wenn der Schlüssel nicht existiert, wird eine Standardnachricht zurückgegeben.
        """
        message = self.lang.get(key, "Message not defined.")
        try:
            return message.format(**kwargs)
        except KeyError as e:
            logging.error(f"Missing placeholder in language file for key '{key}': {e}")
            return message

    def load_config(self):
        if not os.path.exists(self.config_file):
            # Da die Sprache noch nicht geladen ist, verwenden wir Englisch für die Fehlermeldung
            fallback_lang = "en"
            message = languages[fallback_lang]['config_file_not_found'].format(config_file=self.config_file)
            logging.error(message)
            raise ConfigError(message)
        try:
            with open(self.config_file, "r", encoding="utf-8") as f:
                return json.load(f)
        except json.JSONDecodeError as e:
            fallback_lang = "en"
            message = languages[fallback_lang]['invalid_json_in_config'].format(error=str(e))
            logging.error(message)
            raise ConfigError(message)

    def validate(self):
        missing = [field for field in self.required_fields if field not in self.data]
        if missing:
            message = self.get_lang_message("missing_required_fields", fields=missing)
            logging.error(message)
            raise ConfigError(message)

    def get(self, key, default=None):
        return self.data.get(key, default)

```

--------------------------------------------------------------------------------
/agents/AgentInterface/Python/config.py:
--------------------------------------------------------------------------------

```python
# Python/config.py

import json
import os
import logging
from .language import languages


class ConfigError(Exception):
    pass


class Config:

    def __init__(self, config_file="config.json", required_fields=None):
        self.required_fields = required_fields if required_fields is not None else []
        self.config_file = config_file
        self.data = self.load_config()

        # 🔥 Sprache wird **vor** validate() gesetzt
        self.language = self.get("language", "en")
        if self.language not in languages:
            # Fallback zu Englisch, wenn die angegebene Sprache nicht unterstützt wird
            fallback_lang = "en"
            logging.warning(f"⚠️ Unsupported language '{self.language}', falling back to English.")
            self.language = fallback_lang
        self.lang = languages[self.language]  # ✅ Setzt self.lang vor validate()

        self.validate()


    def set_value(self, key, value):
        self.data[key] = value


    def set_value(self, key, value):
        self.data[key] = value

    def get_lang_message(self, key, **kwargs):
        """
        Sichere Methode zum Abrufen von Nachrichten aus dem Sprachwörterbuch.
        Wenn der Schlüssel nicht existiert, wird eine Standardnachricht zurückgegeben.
        """
        message = self.lang.get(key, "Message not defined.")
        try:
            return message.format(**kwargs)
        except KeyError as e:
            logging.error(f"Missing placeholder in language file for key '{key}': {e}")
            return message

    def load_config(self):
        if not os.path.exists(self.config_file):
            # Da die Sprache noch nicht geladen ist, verwenden wir Englisch für die Fehlermeldung
            fallback_lang = "en"
            message = languages[fallback_lang]['config_file_not_found'].format(config_file=self.config_file)
            logging.error(message)
            raise ConfigError(message)
        try:
            with open(self.config_file, "r", encoding="utf-8") as f:
                return json.load(f)
        except json.JSONDecodeError as e:
            fallback_lang = "en"
            message = languages[fallback_lang]['invalid_json_in_config'].format(error=str(e))
            logging.error(message)
            raise ConfigError(message)

    def validate(self):
        missing = [field for field in self.required_fields if field not in self.data]
        if missing:
            message = self.get_lang_message("missing_required_fields", fields=missing)
            logging.error(message)
            raise ConfigError(message)

    def get(self, key, default=None):
        return self.data.get(key, default)

```

--------------------------------------------------------------------------------
/examples/dynamic_sources/rss_reader/config.py:
--------------------------------------------------------------------------------

```python
# Python/config.py

import json
import os
import logging
from .language import languages


class ConfigError(Exception):
    pass


class Config:

    def __init__(self, config_file="config.json", required_fields=None):
        self.required_fields = required_fields if required_fields is not None else []
        self.config_file = config_file
        self.data = self.load_config()

        # 🔥 Sprache wird **vor** validate() gesetzt
        self.language = self.get("language", "en")
        if self.language not in languages:
            # Fallback zu Englisch, wenn die angegebene Sprache nicht unterstützt wird
            fallback_lang = "en"
            logging.warning(f"⚠️ Unsupported language '{self.language}', falling back to English.")
            self.language = fallback_lang
        self.lang = languages[self.language]  # ✅ Setzt self.lang vor validate()

        self.validate()


    def set_value(self, key, value):
        self.data[key] = value


    def set_value(self, key, value):
        self.data[key] = value

    def get_lang_message(self, key, **kwargs):
        """
        Sichere Methode zum Abrufen von Nachrichten aus dem Sprachwörterbuch.
        Wenn der Schlüssel nicht existiert, wird eine Standardnachricht zurückgegeben.
        """
        message = self.lang.get(key, "Message not defined.")
        try:
            return message.format(**kwargs)
        except KeyError as e:
            logging.error(f"Missing placeholder in language file for key '{key}': {e}")
            return message

    def load_config(self):
        if not os.path.exists(self.config_file):
            # Da die Sprache noch nicht geladen ist, verwenden wir Englisch für die Fehlermeldung
            fallback_lang = "en"
            message = languages[fallback_lang]['config_file_not_found'].format(config_file=self.config_file)
            logging.error(message)
            raise ConfigError(message)
        try:
            with open(self.config_file, "r", encoding="utf-8") as f:
                return json.load(f)
        except json.JSONDecodeError as e:
            fallback_lang = "en"
            message = languages[fallback_lang]['invalid_json_in_config'].format(error=str(e))
            logging.error(message)
            raise ConfigError(message)

    def validate(self):
        missing = [field for field in self.required_fields if field not in self.data]
        if missing:
            message = self.get_lang_message("missing_required_fields", fields=missing)
            logging.error(message)
            raise ConfigError(message)

    def get(self, key, default=None):
        return self.data.get(key, default)

```

--------------------------------------------------------------------------------
/examples/sftp_upload_with_id/config.py:
--------------------------------------------------------------------------------

```python
# Python/config.py

import json
import os
import logging
from .language import languages


class ConfigError(Exception):
    pass


class Config:

    def __init__(self, config_file="config.json", required_fields=None):
        self.required_fields = required_fields if required_fields is not None else []
        self.config_file = config_file
        self.data = self.load_config()

        # 🔥 Sprache wird **vor** validate() gesetzt
        self.language = self.get("language", "en")
        if self.language not in languages:
            # Fallback zu Englisch, wenn die angegebene Sprache nicht unterstützt wird
            fallback_lang = "en"
            logging.warning(f"⚠️ Unsupported language '{self.language}', falling back to English.")
            self.language = fallback_lang
        self.lang = languages[self.language]  # ✅ Setzt self.lang vor validate()

        self.validate()


    def set_value(self, key, value):
        self.data[key] = value


    def set_value(self, key, value):
        self.data[key] = value

    def get_lang_message(self, key, **kwargs):
        """
        Sichere Methode zum Abrufen von Nachrichten aus dem Sprachwörterbuch.
        Wenn der Schlüssel nicht existiert, wird eine Standardnachricht zurückgegeben.
        """
        message = self.lang.get(key, "Message not defined.")
        try:
            return message.format(**kwargs)
        except KeyError as e:
            logging.error(f"Missing placeholder in language file for key '{key}': {e}")
            return message

    def load_config(self):
        if not os.path.exists(self.config_file):
            # Da die Sprache noch nicht geladen ist, verwenden wir Englisch für die Fehlermeldung
            fallback_lang = "en"
            message = languages[fallback_lang]['config_file_not_found'].format(config_file=self.config_file)
            logging.error(message)
            raise ConfigError(message)
        try:
            with open(self.config_file, "r", encoding="utf-8") as f:
                return json.load(f)
        except json.JSONDecodeError as e:
            fallback_lang = "en"
            message = languages[fallback_lang]['invalid_json_in_config'].format(error=str(e))
            logging.error(message)
            raise ConfigError(message)

    def validate(self):
        missing = [field for field in self.required_fields if field not in self.data]
        if missing:
            message = self.get_lang_message("missing_required_fields", fields=missing)
            logging.error(message)
            raise ConfigError(message)

    def get(self, key, default=None):
        return self.data.get(key, default)

```

--------------------------------------------------------------------------------
/clients/Python/9.0 mcp_keygen/MCPKeygenClient.py:
--------------------------------------------------------------------------------

```python
import argparse
import socket
import ssl
import json

def send_keygen_request(server_ip, server_port, token, password, use_ssl=True, accept_self_signed=False):
    """
    Sends a keygen request to the MCP server.
    """
    payload = {
        "command": "keygen",
        "token": token,
        "arguments": {
            "password": password
        }
    }

    payload_json = json.dumps(payload)
    
    raw_socket = None
    client_socket = None

    try:
        raw_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        raw_socket.settimeout(10)

        if use_ssl:
            context = ssl.create_default_context()
            if accept_self_signed:
                context.check_hostname = False
                context.verify_mode = ssl.CERT_NONE
            client_socket = context.wrap_socket(raw_socket, server_hostname=server_ip)
        else:
            client_socket = raw_socket
        
        client_socket.connect((server_ip, server_port))
        client_socket.sendall(payload_json.encode("utf-8"))

        response = b""
        while True:
            part = client_socket.recv(4096)
            if not part:
                break
            response += part

        return response.decode("utf-8")
    except ssl.SSLError:
        return "Error: Server and/or client may require TLS encryption. Please enable SSL/TLS."
    except Exception as e:
        return f"Error: {e}"
    
    finally:
        if client_socket is not None:
            try:
                client_socket.shutdown(socket.SHUT_RDWR)
            except:
                pass
            client_socket.close()

if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Send a keygen request to the MCP server.")
    parser.add_argument("--server-ip", required=True, help="IP address of the MCP server")
    parser.add_argument("--server-port", type=int, required=True, help="Port number of the MCP server")
    parser.add_argument("--token", required=True, help="Authentication token")
    parser.add_argument("--password", required=True, help="Password to send for key generation")
    parser.add_argument("--use-ssl", action="store_true", help="Connect using SSL/TLS")
    parser.add_argument("--accept-self-signed", action="store_true", help="Accept self-signed certificates (disable certificate verification)")

    args = parser.parse_args()

    # Send the keygen request
    response = send_keygen_request(
        args.server_ip,
        args.server_port,
        args.token,
        args.password,
        use_ssl=args.use_ssl,
        accept_self_signed=args.accept_self_signed
    )
    print("Response from server:", response)

```

--------------------------------------------------------------------------------
/clients/Gradio/config.py:
--------------------------------------------------------------------------------

```python
# Python/config.py

import json
import os
import logging
from clients.Gradio.language import languages


class ConfigError(Exception):
    pass


class Config:

    def __init__(self, config_file="config.json", required_fields=None):
        self.required_fields = required_fields if required_fields is not None else []
        self.config_file = config_file
        self.data = self.load_config()

        # 🔥 Sprache wird **vor** validate() gesetzt
        self.language = self.get("language", "en")
        if self.language not in languages:
            # Fallback zu Englisch, wenn die angegebene Sprache nicht unterstützt wird
            fallback_lang = "en"
            logging.warning(f"⚠️ Unsupported language '{self.language}', falling back to English.")
            self.language = fallback_lang
        self.lang = languages[self.language]  # ✅ Setzt self.lang vor validate()

        self.validate()


    def set_value(self, key, value):
        self.data[key] = value


    def set_value(self, key, value):
        self.data[key] = value

    def get_lang_message(self, key, **kwargs):
        """
        Sichere Methode zum Abrufen von Nachrichten aus dem Sprachwörterbuch.
        Wenn der Schlüssel nicht existiert, wird eine Standardnachricht zurückgegeben.
        """
        message = self.lang.get(key, "Message not defined.")
        try:
            return message.format(**kwargs)
        except KeyError as e:
            logging.error(f"Missing placeholder in language file for key '{key}': {e}")
            return message

    def load_config(self):
        if not os.path.exists(self.config_file):
            # Da die Sprache noch nicht geladen ist, verwenden wir Englisch für die Fehlermeldung
            fallback_lang = "en"
            message = languages[fallback_lang]['config_file_not_found'].format(config_file=self.config_file)
            logging.error(message)
            raise ConfigError(message)
        try:
            with open(self.config_file, "r", encoding="utf-8") as f:
                return json.load(f)
        except json.JSONDecodeError as e:
            fallback_lang = "en"
            message = languages[fallback_lang]['invalid_json_in_config'].format(error=str(e))
            logging.error(message)
            raise ConfigError(message)

    def validate(self):
        missing = [field for field in self.required_fields if field not in self.data]
        if missing:
            message = self.get_lang_message("missing_required_fields", fields=missing)
            logging.error(message)
            raise ConfigError(message)

    def get(self, key, default=None):
        return self.data.get(key, default)

```

--------------------------------------------------------------------------------
/clients/Python/2.2 mcp_get_chat_info/MCPGetChatInfoClient.py:
--------------------------------------------------------------------------------

```python
import socket
import ssl
import json
import argparse

def send_request(server_ip, server_port, payload, use_ssl=True, accept_self_signed=False):
    """
    Sends a generic request to the server.
    """
    payload_json = json.dumps(payload)
    
    raw_socket = None
    client_socket = None
    
    try:
        raw_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        raw_socket.settimeout(10)

        if use_ssl:
            context = ssl.create_default_context()
            if accept_self_signed:
                context.check_hostname = False
                context.verify_mode = ssl.CERT_NONE
            client_socket = context.wrap_socket(raw_socket, server_hostname=server_ip)
        else:
            client_socket = raw_socket
        
        client_socket.connect((server_ip, server_port))
        client_socket.sendall(payload_json.encode('utf-8'))

        response = b""
        while True:
            part = client_socket.recv(4096)
            if not part:
                break
            response += part

        return json.loads(response.decode('utf-8'))
    except ssl.SSLError:
        return {"status": "error", "message": "Connection failed: Server and/or client may require TLS encryption. Please enable SSL/TLS."}
    except Exception as e:
        return {"status": "error", "message": str(e)}
    
    finally:
        if client_socket is not None:
            try:
                client_socket.shutdown(socket.SHUT_RDWR)
            except:
                pass
            client_socket.close()

if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Retrieve information about an existing conversation.")
    parser.add_argument("--server-ip", required=True, help="IP address of the MCP server")
    parser.add_argument("--server-port", required=True, type=int, help="Port number of the MCP server")
    parser.add_argument("--token", required=True, help="Authentication token")
    parser.add_argument("--chat-id", required=True, help="ID of the conversation")
    parser.add_argument("--use-ssl", action="store_true", help="Connect using SSL/TLS")
    parser.add_argument("--accept-self-signed", action="store_true", help="Accept self-signed certificates (disable certificate verification)")

    args = parser.parse_args()

    payload = {
        "command": "get_chat_info",
        "token": args.token,
        "arguments": {
            "chatId": args.chat_id
        }
    }

    print("📤 Sending request...")
    response = send_request(args.server_ip, args.server_port, payload, use_ssl=args.use_ssl, accept_self_signed=args.accept_self_signed)
    print("✔️ Response:", json.dumps(response, indent=2))
```

--------------------------------------------------------------------------------
/clients/C# .Net/4.1 mcp_store_group/Program.cs:
--------------------------------------------------------------------------------

```csharp
using System;
using System.Net.Sockets;
using System.Text;
using Newtonsoft.Json;

namespace MCPStoreGroupClient
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 4)
            {
                Console.WriteLine("Usage: --server-ip <IP> --server-port <PORT> --group-name <GROUP_NAME> --token <TOKEN> [--description <DESCRIPTION>]");
                return;
            }

            string serverIp = GetArgument(args, "--server-ip");
            int serverPort = int.Parse(GetArgument(args, "--server-port"));
            string groupName = GetArgument(args, "--group-name");
            string token = GetArgument(args, "--token");
            string description = GetArgument(args, "--description") ?? "";

            Console.WriteLine("📤 Sende Anfrage zur Erstellung einer Gruppe...");

            var payload = new
            {
                command = "store_group",
                token = token,
                arguments = new
                {
                    groupName = groupName,
                    description = description
                }
            };

            string response = SendRequest(serverIp, serverPort, payload);

            Console.WriteLine("✔️ Antwort vom Server:");
            Console.WriteLine(response);
        }

        static string GetArgument(string[] args, string key)
        {
            int index = Array.IndexOf(args, key);
            return index >= 0 && index < args.Length - 1 ? args[index + 1] : null;
        }

        static string SendRequest(string serverIp, int serverPort, object payload)
        {
            string payloadJson = JsonConvert.SerializeObject(payload);

            try
            {
                using (TcpClient client = new TcpClient(serverIp, serverPort))
                {
                    NetworkStream stream = client.GetStream();

                    // Senden der Nutzdaten
                    byte[] data = Encoding.UTF8.GetBytes(payloadJson);
                    stream.Write(data, 0, data.Length);

                    // Empfang der Antwort
                    byte[] buffer = new byte[4096];
                    int bytesRead;
                    StringBuilder response = new StringBuilder();

                    do
                    {
                        bytesRead = stream.Read(buffer, 0, buffer.Length);
                        response.Append(Encoding.UTF8.GetString(buffer, 0, bytesRead));
                    } while (bytesRead == buffer.Length);

                    return response.ToString();
                }
            }
            catch (Exception e)
            {
                return $"Error: {e.Message}";
            }
        }
    }
}

```

--------------------------------------------------------------------------------
/clients/C# .Net/Code Archiv/mcp_store_group.cs:
--------------------------------------------------------------------------------

```csharp
using System;
using System.Net.Sockets;
using System.Text;
using Newtonsoft.Json;

namespace MCPStoreGroupClient
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 4)
            {
                Console.WriteLine("Usage: --server-ip <IP> --server-port <PORT> --group-name <GROUP_NAME> --token <TOKEN> [--description <DESCRIPTION>]");
                return;
            }

            string serverIp = GetArgument(args, "--server-ip");
            int serverPort = int.Parse(GetArgument(args, "--server-port"));
            string groupName = GetArgument(args, "--group-name");
            string token = GetArgument(args, "--token");
            string description = GetArgument(args, "--description") ?? "";

            Console.WriteLine("📤 Sende Anfrage zur Erstellung einer Gruppe...");

            var payload = new
            {
                command = "store_group",
                token = token,
                arguments = new
                {
                    groupName = groupName,
                    description = description
                }
            };

            string response = SendRequest(serverIp, serverPort, payload);

            Console.WriteLine("✔️ Antwort vom Server:");
            Console.WriteLine(response);
        }

        static string GetArgument(string[] args, string key)
        {
            int index = Array.IndexOf(args, key);
            return index >= 0 && index < args.Length - 1 ? args[index + 1] : null;
        }

        static string SendRequest(string serverIp, int serverPort, object payload)
        {
            string payloadJson = JsonConvert.SerializeObject(payload);

            try
            {
                using (TcpClient client = new TcpClient(serverIp, serverPort))
                {
                    NetworkStream stream = client.GetStream();

                    // Senden der Nutzdaten
                    byte[] data = Encoding.UTF8.GetBytes(payloadJson);
                    stream.Write(data, 0, data.Length);

                    // Empfang der Antwort
                    byte[] buffer = new byte[4096];
                    int bytesRead;
                    StringBuilder response = new StringBuilder();

                    do
                    {
                        bytesRead = stream.Read(buffer, 0, buffer.Length);
                        response.Append(Encoding.UTF8.GetString(buffer, 0, bytesRead));
                    } while (bytesRead == buffer.Length);

                    return response.ToString();
                }
            }
            catch (Exception e)
            {
                return $"Error: {e.Message}";
            }
        }
    }
}

```

--------------------------------------------------------------------------------
/agents/MCP-Client/Python/messages/send_initialize_message.py:
--------------------------------------------------------------------------------

```python
# messages/send_initialize_message.py
import logging
import anyio
from typing import Optional
from anyio.streams.memory import MemoryObjectReceiveStream, MemoryObjectSendStream

from ..messages.message_types.initialize_message import (
    InitializeMessage,
    InitializedNotificationMessage,
    InitializeParams,
    MCPClientCapabilities,
    MCPClientInfo,
    InitializeResult,
)


async def send_initialize(
    read_stream: MemoryObjectReceiveStream,
    write_stream: MemoryObjectSendStream,
) -> Optional[InitializeResult]:
    """Send an initialization request to the server and process its response."""

    # Set initialize params
    init_params = InitializeParams(
        protocolVersion="2024-11-05",
        capabilities=MCPClientCapabilities(),
        clientInfo=MCPClientInfo(),
    )

    # Create the initialize message
    init_message = InitializeMessage(init_params)

    # Sending
    logging.debug("Sending initialize request")
    await write_stream.send(init_message)

    try:
        # 5-second timeout for response
        with anyio.fail_after(20):
            # Get the response from the server
            async for response in read_stream:
                # If the response is an exception, log it and continue
                if isinstance(response, Exception):
                    logging.error(f"Error from server: {response}")
                    continue

                # Debug log the received message
                logging.debug(f"Received: {response.model_dump()}")

                # Check for error
                if response.error:
                    logging.error(f"Server initialization error: {response.error}")
                    return None

                # Check for result
                if response.result:
                    try:
                        # Validate the result
                        init_result = InitializeResult.model_validate(response.result)
                        logging.debug("Server initialized successfully")

                        # Notify the server of successful initialization
                        initialized_notify = InitializedNotificationMessage()
                        await write_stream.send(initialized_notify)

                        return init_result
                    except Exception as e:
                        logging.error(f"Error processing init result: {e}")
                        return None

    except TimeoutError:
        logging.error("Timeout waiting for server initialization response")
        return None
    except Exception as e:
        logging.error(f"Unexpected error during server initialization: {e}")
        raise

    # Timeout
    logging.error("Initialization response timeout")
    return None

```

--------------------------------------------------------------------------------
/clients/Gradio/messages/send_initialize_message.py:
--------------------------------------------------------------------------------

```python
# messages/send_initialize_message.py
import logging
import anyio
from typing import Optional
from anyio.streams.memory import MemoryObjectReceiveStream, MemoryObjectSendStream

from ..messages.message_types.initialize_message import (
    InitializeMessage,
    InitializedNotificationMessage,
    InitializeParams,
    MCPClientCapabilities,
    MCPClientInfo,
    InitializeResult,
)


async def send_initialize(
    read_stream: MemoryObjectReceiveStream,
    write_stream: MemoryObjectSendStream,
) -> Optional[InitializeResult]:
    """Send an initialization request to the server and process its response."""

    # Set initialize params
    init_params = InitializeParams(
        protocolVersion="2024-11-05",
        capabilities=MCPClientCapabilities(),
        clientInfo=MCPClientInfo(),
    )

    # Create the initialize message
    init_message = InitializeMessage(init_params)

    # Sending
    logging.debug("Sending initialize request")
    await write_stream.send(init_message)

    try:
        # 5-second timeout for response
        with anyio.fail_after(20):
            # Get the response from the server
            async for response in read_stream:
                # If the response is an exception, log it and continue
                if isinstance(response, Exception):
                    logging.error(f"Error from server: {response}")
                    continue

                # Debug log the received message
                logging.debug(f"Received: {response.model_dump()}")

                # Check for error
                if response.error:
                    logging.error(f"Server initialization error: {response.error}")
                    return None

                # Check for result
                if response.result:
                    try:
                        # Validate the result
                        init_result = InitializeResult.model_validate(response.result)
                        logging.debug("Server initialized successfully")

                        # Notify the server of successful initialization
                        initialized_notify = InitializedNotificationMessage()
                        await write_stream.send(initialized_notify)

                        return init_result
                    except Exception as e:
                        logging.error(f"Error processing init result: {e}")
                        return None

    except TimeoutError:
        logging.error("Timeout waiting for server initialization response")
        return None
    except Exception as e:
        logging.error(f"Unexpected error during server initialization: {e}")
        raise

    # Timeout
    logging.error("Initialization response timeout")
    return None

```

--------------------------------------------------------------------------------
/clients/Python/4.0 mcp_list_groups/MCPListGroupsClient.py:
--------------------------------------------------------------------------------

```python
import socket
import ssl
import json
import argparse

def send_request(server_ip, server_port, payload, use_ssl=True, accept_self_signed=False):
    """
    Sends a generic request to the server.
    """
    payload_json = json.dumps(payload)
    
    raw_socket = None
    client_socket = None
    
    try:
        raw_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        raw_socket.settimeout(10)

        if use_ssl:
            context = ssl.create_default_context()
            if accept_self_signed:
                context.check_hostname = False
                context.verify_mode = ssl.CERT_NONE
            client_socket = context.wrap_socket(raw_socket, server_hostname=server_ip)
        else:
            client_socket = raw_socket
        
        client_socket.connect((server_ip, server_port))
        client_socket.sendall(payload_json.encode('utf-8'))

        response = b""
        while True:
            part = client_socket.recv(4096)
            if not part:
                break
            response += part

        return json.loads(response.decode('utf-8'))
    except ssl.SSLError:
        return {"status": "error", "message": "Connection failed: Server and/or client may require TLS encryption. Please enable SSL/TLS."}
    except Exception as e:
        return {"status": "error", "message": str(e)}
    
    finally:
        if client_socket is not None:
            try:
                client_socket.shutdown(socket.SHUT_RDWR)
            except:
                pass
            client_socket.close()

def list_groups(server_ip, server_port, token, use_ssl=True, accept_self_signed=False):
    """
    Sends a request to the server to list groups.
    """
    payload = {
        "command": "list_groups",
        "token": token
    }
    return send_request(server_ip, server_port, payload, use_ssl, accept_self_signed)

if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="List groups using MCP server.")
    parser.add_argument("--server-ip", required=True, help="IP address of the MCP server")
    parser.add_argument("--server-port", required=True, type=int, help="Port number of the MCP server")
    parser.add_argument("--token", required=True, help="Authentication token for the MCP server")
    parser.add_argument("--use-ssl", action="store_true", help="Connect using SSL/TLS")
    parser.add_argument("--accept-self-signed", action="store_true", help="Accept self-signed certificates (disable certificate verification)")

    args = parser.parse_args()

    print("📄 Retrieving groups...")
    response = list_groups(args.server_ip, args.server_port, args.token, use_ssl=args.use_ssl, accept_self_signed=args.accept_self_signed)
    print("✔️ Response:", response)

```

--------------------------------------------------------------------------------
/clients/C# .Net/2.1 mcp_continue_chat/Program.cs:
--------------------------------------------------------------------------------

```csharp
using System;
using System.Net.Sockets;
using System.Text;
using Newtonsoft.Json;

namespace MCPChatContinuationClient
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 6)
            {
                Console.WriteLine("Usage: --server-ip <IP> --server-port <PORT> --token <TOKEN> --conversation-id <ID> --message <MESSAGE>");
                return;
            }

            string serverIp = GetArgument(args, "--server-ip");
            int serverPort = int.Parse(GetArgument(args, "--server-port"));
            string token = GetArgument(args, "--token");
            string conversationId = GetArgument(args, "--conversation-id");
            string message = GetArgument(args, "--message");

            var payload = new
            {
                command = "continue_chat",
                token = token,
                arguments = new
                {
                    chatId = conversationId,
                    question = message
                }
            };

            Console.WriteLine("📤 Sending request to continue chat...");
            string response = SendRequest(serverIp, serverPort, payload);
            Console.WriteLine("✔️ Response from server:");
            Console.WriteLine(response);
        }

        static string GetArgument(string[] args, string key)
        {
            int index = Array.IndexOf(args, key);
            return index >= 0 && index < args.Length - 1 ? args[index + 1] : null;
        }

        static string SendRequest(string serverIp, int serverPort, object payload)
        {
            string payloadJson = JsonConvert.SerializeObject(payload);

            try
            {
                using (TcpClient client = new TcpClient(serverIp, serverPort))
                {
                    NetworkStream stream = client.GetStream();

                    // Send payload
                    byte[] data = Encoding.UTF8.GetBytes(payloadJson);
                    stream.Write(data, 0, data.Length);

                    // Receive response
                    byte[] buffer = new byte[4096];
                    int bytesRead;
                    StringBuilder response = new StringBuilder();

                    do
                    {
                        bytesRead = stream.Read(buffer, 0, buffer.Length);
                        response.Append(Encoding.UTF8.GetString(buffer, 0, bytesRead));
                    } while (bytesRead == buffer.Length);

                    return response.ToString();
                }
            }
            catch (Exception e)
            {
                return JsonConvert.SerializeObject(new { status = "error", message = e.Message });
            }
        }
    }
}

```

--------------------------------------------------------------------------------
/clients/C# .Net/Code Archiv/mcp_continue_chat.cs:
--------------------------------------------------------------------------------

```csharp
using System;
using System.Net.Sockets;
using System.Text;
using Newtonsoft.Json;

namespace MCPChatContinuationClient
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 6)
            {
                Console.WriteLine("Usage: --server-ip <IP> --server-port <PORT> --token <TOKEN> --conversation-id <ID> --message <MESSAGE>");
                return;
            }

            string serverIp = GetArgument(args, "--server-ip");
            int serverPort = int.Parse(GetArgument(args, "--server-port"));
            string token = GetArgument(args, "--token");
            string conversationId = GetArgument(args, "--conversation-id");
            string message = GetArgument(args, "--message");

            var payload = new
            {
                command = "continue_chat",
                token = token,
                arguments = new
                {
                    chatId = conversationId,
                    question = message
                }
            };

            Console.WriteLine("📤 Sending request to continue chat...");
            string response = SendRequest(serverIp, serverPort, payload);
            Console.WriteLine("✔️ Response from server:");
            Console.WriteLine(response);
        }

        static string GetArgument(string[] args, string key)
        {
            int index = Array.IndexOf(args, key);
            return index >= 0 && index < args.Length - 1 ? args[index + 1] : null;
        }

        static string SendRequest(string serverIp, int serverPort, object payload)
        {
            string payloadJson = JsonConvert.SerializeObject(payload);

            try
            {
                using (TcpClient client = new TcpClient(serverIp, serverPort))
                {
                    NetworkStream stream = client.GetStream();

                    // Send payload
                    byte[] data = Encoding.UTF8.GetBytes(payloadJson);
                    stream.Write(data, 0, data.Length);

                    // Receive response
                    byte[] buffer = new byte[4096];
                    int bytesRead;
                    StringBuilder response = new StringBuilder();

                    do
                    {
                        bytesRead = stream.Read(buffer, 0, buffer.Length);
                        response.Append(Encoding.UTF8.GetString(buffer, 0, bytesRead));
                    } while (bytesRead == buffer.Length);

                    return response.ToString();
                }
            }
            catch (Exception e)
            {
                return JsonConvert.SerializeObject(new { status = "error", message = e.Message });
            }
        }
    }
}

```

--------------------------------------------------------------------------------
/clients/Java/1.0 mcp_login/MCPLoginClient.java:
--------------------------------------------------------------------------------

```java
import org.json.JSONObject;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.nio.charset.StandardCharsets;

public class MCPLoginClient {

    public static void main(String[] args) {
        String serverIp = null;
        int serverPort = 0;
        String email = null;
        String password = null;

        // Argumente parsen
        for (int i = 0; i < args.length; i++) {
            switch (args[i]) {
                case "--server-ip":
                    serverIp = args[++i];
                    break;
                case "--server-port":
                    serverPort = Integer.parseInt(args[++i]);
                    break;
                case "--email":
                    email = args[++i];
                    break;
                case "--password":
                    password = args[++i];
                    break;
            }
        }

        // Validierung
        if (serverIp == null || serverPort == 0 || email == null || password == null) {
            System.out.println("❌ ERROR: Missing required parameters.");
            return;
        }

        System.out.println("🔐 Logging in...");

        // JSON-Objekt erstellen
        JSONObject payload = new JSONObject();
        payload.put("command", "login");

        JSONObject arguments = new JSONObject();
        arguments.put("email", email);
        arguments.put("password", password);
        payload.put("arguments", arguments);

        // Request senden und Antwort empfangen
        String response = sendRequest(serverIp, serverPort, payload);
        System.out.println("✅ Server Response:");
        System.out.println(response);
    }

    /**
     * Stellt eine TCP-Verbindung her, sendet das JSON und empfängt die Antwort.
     */
    public static String sendRequest(String serverIp, int serverPort, JSONObject payload) {
        try (Socket socket = new Socket(serverIp, serverPort)) {
            // JSON in Byte-Array umwandeln
            String payloadString = payload.toString();
            byte[] data = payloadString.getBytes(StandardCharsets.UTF_8);

            // Daten senden
            OutputStream out = socket.getOutputStream();
            out.write(data);
            out.flush();

            // Antwort empfangen
            InputStream in = socket.getInputStream();
            byte[] buffer = new byte[4096];
            int bytesRead = in.read(buffer);

            if (bytesRead == -1) {
                // Falls keine Daten empfangen wurden
                return "❌ ERROR: No response from server.";
            }

            return new String(buffer, 0, bytesRead, StandardCharsets.UTF_8);

        } catch (IOException e) {
            e.printStackTrace();
            return "❌ ERROR: " + e.getMessage();
        }
    }
}

```

--------------------------------------------------------------------------------
/clients/Go/2.0 mcp_chat/MCPChatClient.go:
--------------------------------------------------------------------------------

```go
package main

import (
	"bytes"
	"encoding/json"
	"errors"
	"flag"
	"fmt"
	"io"
	"net"
	"os"
)

type MCPRequest struct {
	Command   string                 `json:"command"`
	Token     string                 `json:"token"`
	Arguments map[string]interface{} `json:"arguments"`
}

func sendMCPRequest(serverIP string, serverPort int, token, question string, usePublic bool, groups []string, language string) (map[string]interface{}, error) {
	// Prepare the request payload
	payload := MCPRequest{
		Command: "chat",
		Token:   token,
		Arguments: map[string]interface{}{
			"question":  question,
			"usePublic": usePublic,
			"groups":    groups,
			"language":  language,
		},
	}

	// Convert the payload to JSON
	payloadJSON, err := json.Marshal(payload)
	if err != nil {
		return nil, err
	}

	// Create a connection to the server
	conn, err := net.Dial("tcp", fmt.Sprintf("%s:%d", serverIP, serverPort))
	if err != nil {
		return nil, err
	}
	defer conn.Close()

	// Send the request
	_, err = conn.Write(payloadJSON)
	if err != nil {
		return nil, err
	}

	// Receive the response
	var responseBuffer bytes.Buffer
	buf := make([]byte, 4096)
	for {
		n, err := conn.Read(buf)
		if err != nil {
			if errors.Is(err, io.EOF) {
				break
			}
			return nil, err
		}
		responseBuffer.Write(buf[:n])
		if n < 4096 {
			break
		}
	}

	// Decode the response
	var response map[string]interface{}
	err = json.Unmarshal(responseBuffer.Bytes(), &response)
	if err != nil {
		return nil, err
	}

	return response, nil
}

func main() {
	serverIP := flag.String("server-ip", "", "IP address of the MCP server")
	serverPort := flag.Int("server-port", 0, "Port number of the MCP server")
	token := flag.String("token", "", "Authentication token")
	question := flag.String("question", "", "The question to ask the MCP server")
	usePublic := flag.Bool("use-public", false, "Use the public knowledge base")
	groups := flag.String("groups", "", "Comma-separated list of groups for retrieval-augmented generation")
	language := flag.String("language", "de", "Language code for the request (default: 'de')")

	flag.Parse()

	if *serverIP == "" || *serverPort == 0 || *token == "" || *question == "" {
		fmt.Println("❌ ERROR: Required flags are missing.")
		flag.Usage()
		os.Exit(1)
	}

	// Convert groups to a slice
	groupList := []string{}
	if *groups != "" {
		groupList = append(groupList, *groups)
	}

	// Send the question to the MCP server
	fmt.Println("💬 Sending request to the MCP server...")
	response, err := sendMCPRequest(*serverIP, *serverPort, *token, *question, *usePublic, groupList, *language)
	if err != nil {
		fmt.Printf("❌ ERROR: %v\n", err)
		os.Exit(1)
	}

	responseJSON, err := json.MarshalIndent(response, "", "  ")
	if err != nil {
		fmt.Printf("❌ ERROR: %v\n", err)
		os.Exit(1)
	}

	fmt.Println("✅ Response from server:")
	fmt.Println(string(responseJSON))
}

```

--------------------------------------------------------------------------------
/clients/Python/5.2 mcp_delete_user/MCPDeleteUserClient.py:
--------------------------------------------------------------------------------

```python
import socket
import ssl
import json
import argparse
import sys

def send_delete_user_request(server_ip, server_port, email, token, use_ssl=True, accept_self_signed=False):
    """
    Sends a request to delete a user from the MCP server.
    """
    payload = {
        "command": "delete_user",
        "token": token,
        "arguments": {
            "email": email
        }
    }

    payload_json = json.dumps(payload)
    
    raw_socket = None
    client_socket = None

    try:
        raw_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        raw_socket.settimeout(10)

        if use_ssl:
            context = ssl.create_default_context()
            if accept_self_signed:
                context.check_hostname = False
                context.verify_mode = ssl.CERT_NONE
            client_socket = context.wrap_socket(raw_socket, server_hostname=server_ip)
        else:
            client_socket = raw_socket
        
        client_socket.connect((server_ip, server_port))
        client_socket.sendall(payload_json.encode('utf-8'))

        response = b""
        while True:
            part = client_socket.recv(4096)
            if not part:
                break
            response += part

        return response.decode('utf-8')
    except ssl.SSLError:
        return "Error: Server and/or client may require TLS encryption. Please enable SSL/TLS."
    except Exception as e:
        return f"Error: {e}"
    
    finally:
        if client_socket is not None:
            try:
                client_socket.shutdown(socket.SHUT_RDWR)
            except:
                pass
            client_socket.close()

if __name__ == "__main__":
    parser = argparse.ArgumentParser(
        description="Send a request to delete a user from the MCP server.",
        formatter_class=argparse.RawTextHelpFormatter
    )
    parser.add_argument("--server-ip", required=True, help="IP address of the MCP server")
    parser.add_argument("--server-port", required=True, type=int, help="Port number of the MCP server")
    parser.add_argument("--email", required=True, help="Email of the user to delete")
    parser.add_argument("--token", required=True, help="Authentication token")
    parser.add_argument("--use-ssl", action="store_true", help="Connect using SSL/TLS")
    parser.add_argument("--accept-self-signed", action="store_true", help="Accept self-signed certificates (disable certificate verification)")

    # If no arguments are provided, print help and exit
    if len(sys.argv) == 1:
        parser.print_help(sys.stderr)
        sys.exit(1)

    args = parser.parse_args()

    response = send_delete_user_request(
        args.server_ip,
        args.server_port,
        args.email,
        args.token,
        use_ssl=args.use_ssl,
        accept_self_signed=args.accept_self_signed
    )
    print("Response from server:", response)

```

--------------------------------------------------------------------------------
/clients/Python/3.4 mcp_delete_source/MCPDeleteSourceClient.py:
--------------------------------------------------------------------------------

```python
import socket
import ssl
import json
import argparse

def delete_source(server_ip, server_port, token, source_id, use_ssl=True, accept_self_signed=False):
    """
    Sends a request to the MCP server to delete an existing source.

    :param server_ip: IP address of the MCP server
    :param server_port: Port number of the MCP server
    :param token: Authorization token
    :param source_id: ID of the source to delete
    :param use_ssl: Whether to use SSL/TLS for the connection
    :param accept_self_signed: Whether to accept self-signed certificates
    :return: Response from the server
    """
    payload = {
        "command": "delete_source",
        "token": token,
        "arguments": {
            "sourceId": source_id
        }
    }

    payload_json = json.dumps(payload)
    
    raw_socket = None
    client_socket = None

    try:
        raw_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        raw_socket.settimeout(10)

        if use_ssl:
            context = ssl.create_default_context()
            if accept_self_signed:
                context.check_hostname = False
                context.verify_mode = ssl.CERT_NONE
            client_socket = context.wrap_socket(raw_socket, server_hostname=server_ip)
        else:
            client_socket = raw_socket
        
        client_socket.connect((server_ip, server_port))
        client_socket.sendall(payload_json.encode('utf-8'))

        response = b""
        while True:
            part = client_socket.recv(4096)
            if not part:
                break
            response += part

        return response.decode('utf-8')
    except ssl.SSLError:
        return "Error: Server and/or client may require TLS encryption. Please enable SSL/TLS."
    except Exception as e:
        return f"Error: {e}"
    
    finally:
        if client_socket is not None:
            try:
                client_socket.shutdown(socket.SHUT_RDWR)
            except:
                pass
            client_socket.close()

if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Delete a source from the MCP server.")
    parser.add_argument("--server-ip", required=True, help="IP address of the MCP server")
    parser.add_argument("--server-port", type=int, required=True, help="Port number of the MCP server")
    parser.add_argument("--token", required=True, help="Authorization token")
    parser.add_argument("--source-id", required=True, help="ID of the source to delete")
    parser.add_argument("--use-ssl", action="store_true", help="Connect using SSL/TLS")
    parser.add_argument("--accept-self-signed", action="store_true", help="Accept self-signed certificates (disable certificate verification)")

    args = parser.parse_args()

    response = delete_source(
        args.server_ip,
        args.server_port,
        args.token,
        args.source_id,
        use_ssl=args.use_ssl,
        accept_self_signed=args.accept_self_signed
    )
    print("Response from server:", response)

```

--------------------------------------------------------------------------------
/agents/MCP-Client/Python/transport/stdio/stdio_server_shutdown.py:
--------------------------------------------------------------------------------

```python
# transport/stdio/stdio_server_shutdown.py
import logging
from typing import Optional

import anyio
from anyio.streams.memory import MemoryObjectReceiveStream, MemoryObjectSendStream


async def shutdown_stdio_server(
    read_stream: Optional[MemoryObjectReceiveStream],
    write_stream: Optional[MemoryObjectSendStream],
    process: anyio.abc.Process,
    timeout: float = 5.0,
) -> None:
    """
    Gracefully shutdown a stdio-based server.

    This function performs the following steps:
    1. Closes the stdin stream of the process.
    2. Waits for the process to terminate gracefully.
    3. Sends SIGTERM if the process does not terminate within the timeout.
    4. Sends SIGKILL if the process does not terminate after SIGTERM.
    5. Logs each step and ensures cleanup in case of errors.

    Args:
        read_stream (Optional[MemoryObjectReceiveStream]): Stream to receive responses.
        write_stream (Optional[MemoryObjectSendStream]): Stream to send requests.
        process (anyio.abc.Process): The server process.
        timeout (float): Time to wait for graceful shutdown and SIGTERM before escalation.
    """
    logging.info("Initiating stdio server shutdown")

    try:
        # ensure we have a process
        if process:
            # Step 1: Close the write stream (stdin for the server)
            if process.stdin:
                # close
                await process.stdin.aclose()
                logging.info("Closed stdin stream")

            # Step 2: Wait for the process to terminate gracefully
            with anyio.fail_after(timeout):
                await process.wait()
                logging.info("Process exited normally")
                return

    except TimeoutError:
        logging.warning(
            f"Server did not exit within {timeout} seconds, sending SIGTERM"
        )

        # ensure we have a process
        if process:
            # terminate
            process.terminate()

        try:
            # Step 3: Wait for the process to terminate after SIGTERM
            with anyio.fail_after(timeout):
                await process.wait()
                logging.info("Process exited after SIGTERM")
                return
        except TimeoutError:
            logging.warning("Server did not respond to SIGTERM, sending SIGKILL")

            # ensure we have a process
            if process:
                # kill
                process.kill()

                # Step 4: Wait for the process to terminate after SIGKILL
                await process.wait()
                logging.info("Process exited after SIGKILL")

    except Exception as e:
        # Catch unexpected errors during shutdown
        logging.error(f"Unexpected error during stdio server shutdown: {e}")

        if process:
            # kill
            process.kill()

            # wait
            await process.wait()
            logging.info("Process forcibly terminated")
    finally:
        # complete
        logging.info("Stdio server shutdown complete")

```

--------------------------------------------------------------------------------
/clients/Gradio/transport/stdio/stdio_server_shutdown.py:
--------------------------------------------------------------------------------

```python
# transport/stdio/stdio_server_shutdown.py
import logging
from typing import Optional

import anyio
from anyio.streams.memory import MemoryObjectReceiveStream, MemoryObjectSendStream


async def shutdown_stdio_server(
    read_stream: Optional[MemoryObjectReceiveStream],
    write_stream: Optional[MemoryObjectSendStream],
    process: anyio.abc.Process,
    timeout: float = 5.0,
) -> None:
    """
    Gracefully shutdown a stdio-based server.

    This function performs the following steps:
    1. Closes the stdin stream of the process.
    2. Waits for the process to terminate gracefully.
    3. Sends SIGTERM if the process does not terminate within the timeout.
    4. Sends SIGKILL if the process does not terminate after SIGTERM.
    5. Logs each step and ensures cleanup in case of errors.

    Args:
        read_stream (Optional[MemoryObjectReceiveStream]): Stream to receive responses.
        write_stream (Optional[MemoryObjectSendStream]): Stream to send requests.
        process (anyio.abc.Process): The server process.
        timeout (float): Time to wait for graceful shutdown and SIGTERM before escalation.
    """
    logging.info("Initiating stdio server shutdown")

    try:
        # ensure we have a process
        if process:
            # Step 1: Close the write stream (stdin for the server)
            if process.stdin:
                # close
                await process.stdin.aclose()
                logging.info("Closed stdin stream")

            # Step 2: Wait for the process to terminate gracefully
            with anyio.fail_after(timeout):
                await process.wait()
                logging.info("Process exited normally")
                return

    except TimeoutError:
        logging.warning(
            f"Server did not exit within {timeout} seconds, sending SIGTERM"
        )

        # ensure we have a process
        if process:
            # terminate
            process.terminate()

        try:
            # Step 3: Wait for the process to terminate after SIGTERM
            with anyio.fail_after(timeout):
                await process.wait()
                logging.info("Process exited after SIGTERM")
                return
        except TimeoutError:
            logging.warning("Server did not respond to SIGTERM, sending SIGKILL")

            # ensure we have a process
            if process:
                # kill
                process.kill()

                # Step 4: Wait for the process to terminate after SIGKILL
                await process.wait()
                logging.info("Process exited after SIGKILL")

    except Exception as e:
        # Catch unexpected errors during shutdown
        logging.error(f"Unexpected error during stdio server shutdown: {e}")

        if process:
            # kill
            process.kill()

            # wait
            await process.wait()
            logging.info("Process forcibly terminated")
    finally:
        # complete
        logging.info("Stdio server shutdown complete")

```

--------------------------------------------------------------------------------
/clients/Python/2.4 mcp_delete_chat/MCPDeleteChatClient.py:
--------------------------------------------------------------------------------

```python
import socket
import ssl
import json
import argparse

def send_delete_chat_request(server_ip, server_port, token, chat_id, use_ssl=True, accept_self_signed=False):
    """
    Sends a request to delete a specific chat from the MCP server.

    :param server_ip: IP address of the MCP server
    :param server_port: Port number of the MCP server
    :param token: Authentication token
    :param chat_id: ID of the chat to be deleted
    :param use_ssl: Whether to use SSL/TLS for the connection
    :param accept_self_signed: Whether to accept self-signed certificates
    :return: Response from the server
    """
    payload = {
        "command": "delete_chat",
        "token": token,
        "arguments": {
            "chatId": chat_id
        }
    }

    payload_json = json.dumps(payload)
    
    raw_socket = None
    client_socket = None
    
    try:
        raw_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        raw_socket.settimeout(10)

        if use_ssl:
            context = ssl.create_default_context()
            if accept_self_signed:
                context.check_hostname = False
                context.verify_mode = ssl.CERT_NONE
            client_socket = context.wrap_socket(raw_socket, server_hostname=server_ip)
        else:
            client_socket = raw_socket
        
        client_socket.connect((server_ip, server_port))
        client_socket.sendall(payload_json.encode('utf-8'))

        response = b""
        while True:
            part = client_socket.recv(4096)
            if not part:
                break
            response += part

        return response.decode('utf-8')
    except ssl.SSLError:
        return "Error: The server requires TLS encryption. Please enable SSL/TLS."
    except Exception as e:
        return f"Error: {e}"
    
    finally:
        if client_socket is not None:
            try:
                client_socket.shutdown(socket.SHUT_RDWR)
            except:
                pass
            client_socket.close()

if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Delete a specific chat on the MCP server.")
    parser.add_argument("--server-ip", required=True, help="IP address of the MCP server")
    parser.add_argument("--server-port", required=True, type=int, help="Port number of the MCP server")
    parser.add_argument("--token", required=True, help="Authentication token")
    parser.add_argument("--chat-id", required=True, help="ID of the chat to be deleted")
    parser.add_argument("--use-ssl", action="store_true", help="Connect using SSL/TLS")
    parser.add_argument("--accept-self-signed", action="store_true", help="Accept self-signed certificates (disable certificate verification)")

    args = parser.parse_args()

    response = send_delete_chat_request(
        args.server_ip,
        args.server_port,
        args.token,
        args.chat_id,
        use_ssl=args.use_ssl,
        accept_self_signed=args.accept_self_signed
    )
    print("Response from server:", response)

```

--------------------------------------------------------------------------------
/clients/Python/3.1 mcp_get_source/MCPGetSourceClient.py:
--------------------------------------------------------------------------------

```python
import socket
import ssl
import json
import argparse

def get_source_information(server_ip, server_port, token, source_id, use_ssl=True, accept_self_signed=False):
    """
    Sends a request to the MCP server to get information about an existing source.

    :param server_ip: IP address of the MCP server
    :param server_port: Port number of the MCP server
    :param token: Authentication token
    :param source_id: ID of the source to retrieve
    :param use_ssl: Whether to use SSL/TLS for the connection
    :param accept_self_signed: Whether to accept self-signed certificates
    :return: Response from the server
    """
    payload = {
        "command": "get_source",
        "token": token,
        "arguments": {
            "sourceId": source_id
        }
    }

    payload_json = json.dumps(payload)
    
    raw_socket = None
    client_socket = None

    try:
        raw_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        raw_socket.settimeout(10)

        if use_ssl:
            context = ssl.create_default_context()
            if accept_self_signed:
                context.check_hostname = False
                context.verify_mode = ssl.CERT_NONE
            client_socket = context.wrap_socket(raw_socket, server_hostname=server_ip)
        else:
            client_socket = raw_socket
        
        client_socket.connect((server_ip, server_port))
        client_socket.sendall(payload_json.encode('utf-8'))

        response = b""
        while True:
            part = client_socket.recv(4096)
            if not part:
                break
            response += part

        return response.decode('utf-8')
    except ssl.SSLError:
        return "Error: Server and/or client may require TLS encryption. Please enable SSL/TLS."
    except Exception as e:
        return f"Error: {e}"
    
    finally:
        if client_socket is not None:
            try:
                client_socket.shutdown(socket.SHUT_RDWR)
            except:
                pass
            client_socket.close()

if __name__ == "__main__":
    # Argument parser for command-line arguments
    parser = argparse.ArgumentParser(description="Retrieve information about an existing source from the MCP server.")
    parser.add_argument("--server-ip", required=True, help="IP address of the MCP server")
    parser.add_argument("--server-port", required=True, type=int, help="Port number of the MCP server")
    parser.add_argument("--token", required=True, help="Authentication token")
    parser.add_argument("--source-id", required=True, help="ID of the source to retrieve")
    parser.add_argument("--use-ssl", action="store_true", help="Connect using SSL/TLS")
    parser.add_argument("--accept-self-signed", action="store_true", help="Accept self-signed certificates (disable certificate verification)")

    args = parser.parse_args()

    # Retrieve the source information and print the response
    response = get_source_information(
        args.server_ip,
        args.server_port,
        args.token,
        args.source_id,
        use_ssl=args.use_ssl,
        accept_self_signed=args.accept_self_signed
    )
    print("Response from server:", response)

```

--------------------------------------------------------------------------------
/clients/Python/3.2 mcp_list_sources/MCPListSourcesClient.py:
--------------------------------------------------------------------------------

```python
import socket
import ssl
import json
import argparse

def send_list_sources_request(server_ip, server_port, token, group_name, use_ssl=True, accept_self_signed=False):
    """
    Sends a request to list sources in a specific group to the MCP server.

    :param server_ip: IP address of the MCP server
    :param server_port: Port number of the MCP server
    :param token: Authentication token
    :param group_name: Name of the group to list sources from
    :param use_ssl: Whether to use SSL/TLS for the connection
    :param accept_self_signed: Whether to accept self-signed certificates
    :return: Response from the server
    """
    payload = {
        "command": "list_sources",
        "token": token,
        "attributes": {
            "groupName": group_name
        }
    }

    payload_json = json.dumps(payload)
    
    raw_socket = None
    client_socket = None

    try:
        raw_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        raw_socket.settimeout(10)

        if use_ssl:
            context = ssl.create_default_context()
            if accept_self_signed:
                context.check_hostname = False
                context.verify_mode = ssl.CERT_NONE
            client_socket = context.wrap_socket(raw_socket, server_hostname=server_ip)
        else:
            client_socket = raw_socket
        
        client_socket.connect((server_ip, server_port))
        client_socket.sendall(payload_json.encode('utf-8'))

        response = b""
        while True:
            part = client_socket.recv(4096)
            if not part:
                break
            response += part

        return response.decode('utf-8')
    except ssl.SSLError:
        return "Error: Server and/or client may require TLS encryption. Please enable SSL/TLS."
    except Exception as e:
        return f"Error: {e}"
    
    finally:
        if client_socket is not None:
            try:
                client_socket.shutdown(socket.SHUT_RDWR)
            except:
                pass
            client_socket.close()

if __name__ == "__main__":
    # Argument parser for command-line arguments
    parser = argparse.ArgumentParser(description="List sources in a specific group from the MCP server.")
    parser.add_argument("--server-ip", required=True, help="IP address of the MCP server")
    parser.add_argument("--server-port", required=True, type=int, help="Port number of the MCP server")
    parser.add_argument("--token", required=True, help="Authentication token")
    parser.add_argument("--group-name", required=True, help="Name of the group to list sources from")
    parser.add_argument("--use-ssl", action="store_true", help="Connect using SSL/TLS")
    parser.add_argument("--accept-self-signed", action="store_true", help="Accept self-signed certificates (disable certificate verification)")

    args = parser.parse_args()

    # Send the request to list sources and print the response
    response = send_list_sources_request(
        args.server_ip,
        args.server_port,
        args.token,
        args.group_name,
        use_ssl=args.use_ssl,
        accept_self_signed=args.accept_self_signed
    )
    print("Response from server:", response)

```

--------------------------------------------------------------------------------
/clients/JavaScript/1.1 mcp_logout/MCPLogoutClient.js:
--------------------------------------------------------------------------------

```javascript
const net = require('net');
const readline = require('readline');
const { argv, exit } = require('process');

// Funktion zum Parsen der Kommandozeilenargumente
function parseArguments(args) {
    const parsedArgs = {};
    for (let i = 2; i < args.length; i++) {
        switch (args[i]) {
            case '--server-ip':
                parsedArgs.serverIp = args[++i];
                break;
            case '--server-port':
                parsedArgs.serverPort = parseInt(args[++i], 10);
                break;
            case '--token':
                parsedArgs.token = args[++i];
                break;
            default:
                console.warn(`Unbekanntes Argument: ${args[i]}`);
        }
    }
    return parsedArgs;
}

// Funktion zum interaktiven Abfragen des Tokens (optional)
function askToken(query) {
    const rl = readline.createInterface({
        input: process.stdin,
        output: process.stdout,
        terminal: true
    });

    return new Promise((resolve) => {
        rl.question(query, (token) => {
            rl.close();
            resolve(token);
        });
    });
}

// Funktion zum Senden einer Logout-Anfrage über eine TCP-Verbindung
function sendLogoutRequest(serverIp, serverPort, payload) {
    return new Promise((resolve, reject) => {
        const client = new net.Socket();
        let responseData = '';

        client.connect(serverPort, serverIp, () => {
            console.log('🔗 Verbindung zum Server hergestellt.');
            client.write(JSON.stringify(payload));
        });

        client.on('data', (data) => {
            responseData += data.toString();
            try {
                const parsedData = JSON.parse(responseData);
                resolve(parsedData);
                client.destroy(); // Verbindung schließen
            } catch (err) {
                // Antwort noch nicht vollständig, weiter empfangen
            }
        });

        client.on('close', () => {
            console.log('🔒 Verbindung zum Server geschlossen.');
        });

        client.on('error', (err) => {
            reject(err);
        });
    });
}

// Hauptfunktion
async function main() {
    const args = argv;
    const parsedArgs = parseArguments(args);
    const { serverIp, serverPort, token } = parsedArgs;

    // Überprüfen, ob alle erforderlichen Parameter außer Token vorhanden sind
    if (!serverIp || !serverPort) {
        console.error('❌ ERROR: Fehlende erforderliche Parameter.');
        console.log('Verwendung: node MCPLogoutClient.js --server-ip <IP> --server-port <Port> --token <Token>');
        exit(1);
    }

    // Token interaktiv abfragen, falls nicht in den Argumenten vorhanden
    let authToken = token;
    if (!authToken) {
        authToken = await askToken('🔒 Bitte gib dein Authentifizierungstoken ein: ');
    }

    const payload = {
        command: "logout",
        token: authToken
    };

    try {
        console.log('🚪 Logging out...');
        const response = await sendLogoutRequest(serverIp, serverPort, payload);
        console.log('✅ Server Response:');
        console.log(JSON.stringify(response, null, 4));
    } catch (err) {
        console.error('❌ ERROR:', err.message);
    }
}

main();

```

--------------------------------------------------------------------------------
/clients/C# .Net/2.0 mcp_chat/Program.cs:
--------------------------------------------------------------------------------

```csharp
using System;
using System.Net.Sockets;
using System.Text;
using Newtonsoft.Json;
using System.Collections.Generic;

namespace MCPClient
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 5)
            {
                Console.WriteLine("Usage: --server-ip <IP> --server-port <PORT> --token <TOKEN> --question <QUESTION> [--use-public] [--groups <GROUPS>] [--language <LANGUAGE>]");
                return;
            }

            string serverIp = GetArgument(args, "--server-ip");
            int serverPort = int.Parse(GetArgument(args, "--server-port"));
            string token = GetArgument(args, "--token");
            string question = GetArgument(args, "--question");
            bool usePublic = Array.Exists(args, arg => arg == "--use-public");
            string language = GetArgument(args, "--language") ?? "de";

            List<string> groups = new List<string>();
            string groupsArgument = GetArgument(args, "--groups");
            if (groupsArgument != null)
            {
                groups.AddRange(groupsArgument.Split(","));
            }

            var response = SendMCPRequest(serverIp, serverPort, token, question, usePublic, groups, language);
            Console.WriteLine("Response from server:");
            Console.WriteLine(response);
        }

        static string GetArgument(string[] args, string key)
        {
            int index = Array.IndexOf(args, key);
            return index >= 0 && index < args.Length - 1 ? args[index + 1] : null;
        }

        static string SendMCPRequest(string serverIp, int serverPort, string token, string question, bool usePublic, List<string> groups, string language)
        {
            var payload = new
            {
                command = "chat",
                token = token,
                arguments = new
                {
                    question = question,
                    usePublic = usePublic,
                    groups = groups,
                    language = language
                }
            };

            string payloadJson = JsonConvert.SerializeObject(payload);
            try
            {
                using (TcpClient client = new TcpClient(serverIp, serverPort))
                {
                    NetworkStream stream = client.GetStream();

                    // Send payload
                    byte[] data = Encoding.UTF8.GetBytes(payloadJson);
                    stream.Write(data, 0, data.Length);

                    // Receive response
                    byte[] buffer = new byte[4096];
                    int bytesRead;
                    StringBuilder response = new StringBuilder();

                    do
                    {
                        bytesRead = stream.Read(buffer, 0, buffer.Length);
                        response.Append(Encoding.UTF8.GetString(buffer, 0, bytesRead));
                    } while (bytesRead == buffer.Length);

                    return response.ToString();
                }
            }
            catch (Exception e)
            {
                return JsonConvert.SerializeObject(new { status = "error", message = e.Message });
            }
        }
    }
}

```

--------------------------------------------------------------------------------
/clients/C# .Net/Code Archiv/mcp_chat.cs:
--------------------------------------------------------------------------------

```csharp
using System;
using System.Net.Sockets;
using System.Text;
using Newtonsoft.Json;
using System.Collections.Generic;

namespace MCPClient
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 5)
            {
                Console.WriteLine("Usage: --server-ip <IP> --server-port <PORT> --token <TOKEN> --question <QUESTION> [--use-public] [--groups <GROUPS>] [--language <LANGUAGE>]");
                return;
            }

            string serverIp = GetArgument(args, "--server-ip");
            int serverPort = int.Parse(GetArgument(args, "--server-port"));
            string token = GetArgument(args, "--token");
            string question = GetArgument(args, "--question");
            bool usePublic = Array.Exists(args, arg => arg == "--use-public");
            string language = GetArgument(args, "--language") ?? "de";

            List<string> groups = new List<string>();
            string groupsArgument = GetArgument(args, "--groups");
            if (groupsArgument != null)
            {
                groups.AddRange(groupsArgument.Split(","));
            }

            var response = SendMCPRequest(serverIp, serverPort, token, question, usePublic, groups, language);
            Console.WriteLine("Response from server:");
            Console.WriteLine(response);
        }

        static string GetArgument(string[] args, string key)
        {
            int index = Array.IndexOf(args, key);
            return index >= 0 && index < args.Length - 1 ? args[index + 1] : null;
        }

        static string SendMCPRequest(string serverIp, int serverPort, string token, string question, bool usePublic, List<string> groups, string language)
        {
            var payload = new
            {
                command = "chat",
                token = token,
                arguments = new
                {
                    question = question,
                    usePublic = usePublic,
                    groups = groups,
                    language = language
                }
            };

            string payloadJson = JsonConvert.SerializeObject(payload);
            try
            {
                using (TcpClient client = new TcpClient(serverIp, serverPort))
                {
                    NetworkStream stream = client.GetStream();

                    // Send payload
                    byte[] data = Encoding.UTF8.GetBytes(payloadJson);
                    stream.Write(data, 0, data.Length);

                    // Receive response
                    byte[] buffer = new byte[4096];
                    int bytesRead;
                    StringBuilder response = new StringBuilder();

                    do
                    {
                        bytesRead = stream.Read(buffer, 0, buffer.Length);
                        response.Append(Encoding.UTF8.GetString(buffer, 0, bytesRead));
                    } while (bytesRead == buffer.Length);

                    return response.ToString();
                }
            }
            catch (Exception e)
            {
                return JsonConvert.SerializeObject(new { status = "error", message = e.Message });
            }
        }
    }
}

```

--------------------------------------------------------------------------------
/clients/JavaScript/1.0 mcp_login/MCPLoginClient.js:
--------------------------------------------------------------------------------

```javascript
const net = require('net');
const readline = require('readline');
const { argv, exit } = require('process');

// Funktion zum Parsen der Kommandozeilenargumente
function parseArguments(args) {
    const parsedArgs = {};
    for (let i = 2; i < args.length; i++) {
        switch (args[i]) {
            case '--server-ip':
                parsedArgs.serverIp = args[++i];
                break;
            case '--server-port':
                parsedArgs.serverPort = parseInt(args[++i], 10);
                break;
            case '--email':
                parsedArgs.email = args[++i];
                break;
            case '--password':
                parsedArgs.password = args[++i];
                break;
            default:
                console.warn(`Unbekanntes Argument: ${args[i]}`);
        }
    }
    return parsedArgs;
}

// Funktion zum Senden einer Anfrage über eine TCP-Verbindung
function sendRequest(serverIp, serverPort, payload) {
    return new Promise((resolve, reject) => {
        const client = new net.Socket();
        let responseData = '';

        client.connect(serverPort, serverIp, () => {
            console.log('🔗 Verbindung zum Server hergestellt.');
            client.write(JSON.stringify(payload));
        });

        client.on('data', (data) => {
            responseData += data.toString();
            // Versuche, die empfangenen Daten als JSON zu parsen
            try {
                const parsedData = JSON.parse(responseData);
                resolve(parsedData);
                client.destroy(); // Verbindung schließen
            } catch (err) {
                // Antwort noch nicht vollständig, weiter empfangen
            }
        });

        client.on('close', () => {
            console.log('🔒 Verbindung zum Server geschlossen.');
        });

        client.on('error', (err) => {
            reject(err);
        });
    });
}

// Funktion zum interaktiven Abfragen des Passworts (optional)
function askPassword(query) {
    const rl = readline.createInterface({
        input: process.stdin,
        output: process.stdout,
        terminal: true
    });

    return new Promise((resolve) => {
        rl.question(query, (password) => {
            rl.close();
            resolve(password);
        });
    });
}

// Hauptfunktion
async function main() {
    const args = argv;
    const { serverIp, serverPort, email, password } = parseArguments(args);

    // Überprüfen, ob alle erforderlichen Parameter vorhanden sind
    if (!serverIp || !serverPort || !email || !password) {
        console.error('❌ ERROR: Fehlende erforderliche Parameter.');
        console.log('Verwendung: node MCPLoginClient.js --server-ip <IP> --server-port <Port> --email <Email> --password <Passwort>');
        exit(1);
    }

    const payload = {
        command: "login",
        arguments: {
            email: email,
            password: password
        }
    };

    try {
        console.log('🔐 Logging in...');
        const response = await sendRequest(serverIp, serverPort, payload);
        console.log('✅ Server Response:');
        console.log(JSON.stringify(response, null, 4));
    } catch (err) {
        console.error('❌ ERROR:', err.message);
    }
}

main();

```

--------------------------------------------------------------------------------
/clients/Go/5.1 mcp_edit_user/MCPEditUserClient.go:
--------------------------------------------------------------------------------

```go
package main

import (
	"bytes"
	"encoding/json"
	"errors"
	"flag"
	"fmt"
	"io"
	"net"
	"os"
)

type EditUserPayload struct {
	Command   string                 `json:"command"`
	Token     string                 `json:"token"`
	Arguments map[string]interface{} `json:"arguments"`
}

func sendEditUserRequest(serverIP string, serverPort int, token string, arguments map[string]interface{}) (string, error) {
	// Prepare the request payload
	payload := EditUserPayload{
		Command:   "edit_user",
		Token:     token,
		Arguments: arguments,
	}

	// Convert the payload to JSON
	payloadJSON, err := json.Marshal(payload)
	if err != nil {
		return "", err
	}

	// Create a connection to the server
	conn, err := net.Dial("tcp", fmt.Sprintf("%s:%d", serverIP, serverPort))
	if err != nil {
		return "", err
	}
	defer conn.Close()

	// Send the request
	_, err = conn.Write(payloadJSON)
	if err != nil {
		return "", err
	}

	// Receive the response
	var responseBuffer bytes.Buffer
	buf := make([]byte, 4096)
	for {
		n, err := conn.Read(buf)
		if err != nil {
			if errors.Is(err, io.EOF) {
				break
			}
			return "", err
		}
		responseBuffer.Write(buf[:n])
		if n < 4096 {
			break
		}
	}

	return responseBuffer.String(), nil
}

func main() {
	serverIP := flag.String("server-ip", "", "IP address of the MCP server")
	serverPort := flag.Int("server-port", 0, "Port number of the MCP server")
	token := flag.String("token", "", "Authentication token")
	name := flag.String("name", "", "New name of the user")
	email := flag.String("email", "", "New email of the user")
	password := flag.String("password", "", "New password of the user")
	language := flag.String("language", "", "Preferred language of the user")
	timezone := flag.String("timezone", "", "Timezone of the user")
	roles := flag.String("roles", "", "Comma-separated list of roles to assign to the user")
	groups := flag.String("groups", "", "Comma-separated list of groups to assign to the user")
	usePublic := flag.Bool("usePublic", false, "Enable public knowledge base access")
	activateFtp := flag.Bool("activateFtp", false, "Activate FTP access")
	ftpPassword := flag.String("ftpPassword", "", "Password for FTP access")

	flag.Parse()

	if *serverIP == "" || *serverPort == 0 || *token == "" {
		fmt.Println("❌ ERROR: Required flags are missing.")
		flag.Usage()
		os.Exit(1)
	}

	// Prepare arguments map
	arguments := map[string]interface{}{}
	if *name != "" {
		arguments["name"] = *name
	}
	if *email != "" {
		arguments["email"] = *email
	}
	if *password != "" {
		arguments["password"] = *password
	}
	if *language != "" {
		arguments["language"] = *language
	}
	if *timezone != "" {
		arguments["timezone"] = *timezone
	}
	if *roles != "" {
		arguments["roles"] = *roles
	}
	if *groups != "" {
		arguments["groups"] = *groups
	}
	arguments["usePublic"] = *usePublic
	arguments["activateFtp"] = *activateFtp
	if *ftpPassword != "" {
		arguments["ftpPassword"] = *ftpPassword
	}

	// Send the request to edit the user
	fmt.Println("📤 Sending request to edit user...")
	response, err := sendEditUserRequest(*serverIP, *serverPort, *token, arguments)
	if err != nil {
		fmt.Printf("❌ ERROR: %v\n", err)
		os.Exit(1)
	}

	fmt.Println("✔️ Response from server:")
	fmt.Println(response)
}
```

--------------------------------------------------------------------------------
/clients/Python/2.1 mcp_continue_chat/MCPContinueChatClient.py:
--------------------------------------------------------------------------------

```python
import socket
import ssl
import json
import argparse

def send_continue_chat_request(server_ip, server_port, token, conversation_id, message, use_ssl=True, accept_self_signed=False):
    """
    Sends a request to continue an existing chat to the MCP server.

    :param server_ip: IP address of the MCP server
    :param server_port: Port number of the MCP server
    :param token: Authentication token
    :param conversation_id: ID of the chat to continue
    :param message: Message to send in the chat
    :param use_ssl: Whether to use SSL/TLS for the connection
    :param accept_self_signed: Whether to accept self-signed certificates
    :return: Response from the server
    """
    payload = {
        "command": "continue_chat",
        "token": token,
        "arguments": {
            "chatId": conversation_id,
            "question": message
        }
    }

    payload_json = json.dumps(payload)
    
    raw_socket = None
    client_socket = None

    try:
        raw_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        raw_socket.settimeout(10)

        if use_ssl:
            context = ssl.create_default_context()
            if accept_self_signed:
                context.check_hostname = False
                context.verify_mode = ssl.CERT_NONE
            client_socket = context.wrap_socket(raw_socket, server_hostname=server_ip)
        else:
            client_socket = raw_socket
        
        client_socket.connect((server_ip, server_port))
        client_socket.sendall(payload_json.encode('utf-8'))

        response = b""
        while True:
            part = client_socket.recv(4096)
            if not part:
                break
            response += part

        return response.decode('utf-8')

    except ssl.SSLError:
        return "Error: Server and/or client may require TLS encryption. Please enable SSL/TLS."
    except Exception as e:
        return f"Error: {e}"
    
    finally:
        if client_socket is not None:
            try:
                client_socket.shutdown(socket.SHUT_RDWR)
            except:
                pass
            client_socket.close()

if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Continue an existing chat with the MCP server.")
    parser.add_argument("--server-ip", required=True, help="IP address of the MCP server")
    parser.add_argument("--server-port", required=True, type=int, help="Port number of the MCP server")
    parser.add_argument("--token", required=True, help="Authentication token")
    parser.add_argument("--conversation-id", required=True, help="ID of the chat to continue")
    parser.add_argument("--message", required=True, help="Message to send in the chat")
    parser.add_argument("--use-ssl", action="store_true", help="Connect using SSL/TLS")
    parser.add_argument("--accept-self-signed", action="store_true", help="Accept self-signed certificates (disable certificate verification)")

    args = parser.parse_args()

    response = send_continue_chat_request(
        args.server_ip,
        args.server_port,
        args.token,
        args.conversation_id,
        args.message,
        use_ssl=args.use_ssl,
        accept_self_signed=args.accept_self_signed
    )
    print("Response from server:", response)

```

--------------------------------------------------------------------------------
/clients/C++/1.1 mcp_logout/MCPLogoutClient.cpp:
--------------------------------------------------------------------------------

```cpp
#include <iostream>
#include <string>
#include <map>
#include <stdexcept>
#include <json/json.h> // Für JSON-Bibliothek
#include <winsock2.h>
#include <ws2tcpip.h>

#pragma comment(lib, "ws2_32.lib") // Winsock-Bibliothek verlinken

// Argumente parsen
std::map<std::string, std::string> parseArguments(int argc, char* argv[]) {
    std::map<std::string, std::string> args;
    for (int i = 1; i < argc; i++) {
        std::string key = argv[i];
        if (i + 1 < argc) {
            args[key] = argv[++i];
        }
    }
    return args;
}

// Funktion zum Senden der Logout-Anfrage
std::string sendLogoutRequest(const std::string& serverIp, int serverPort, const std::string& token) {
    // JSON-Payload erstellen
    Json::Value payload;
    payload["command"] = "logout";
    payload["token"] = token;

    Json::StreamWriterBuilder writer;
    std::string payloadJson = Json::writeString(writer, payload);

    // Winsock initialisieren
    WSADATA wsaData;
    if (WSAStartup(MAKEWORD(2, 2), &wsaData) != 0) {
        throw std::runtime_error("Failed to initialize Winsock.");
    }

    // Socket erstellen
    SOCKET sock = socket(AF_INET, SOCK_STREAM, 0);
    if (sock == INVALID_SOCKET) {
        WSACleanup();
        throw std::runtime_error("Failed to create socket.");
    }

    // Server-Adresse konfigurieren
    sockaddr_in serverAddr;
    serverAddr.sin_family = AF_INET;
    serverAddr.sin_port = htons(serverPort);
    if (inet_pton(AF_INET, serverIp.c_str(), &serverAddr.sin_addr) <= 0) {
        closesocket(sock);
        WSACleanup();
        throw std::runtime_error("Invalid server IP address.");
    }

    // Verbindung herstellen
    if (connect(sock, (sockaddr*)&serverAddr, sizeof(serverAddr)) < 0) {
        closesocket(sock);
        WSACleanup();
        throw std::runtime_error("Connection failed.");
    }

    // Daten senden
    if (send(sock, payloadJson.c_str(), payloadJson.size(), 0) < 0) {
        closesocket(sock);
        WSACleanup();
        throw std::runtime_error("Failed to send data.");
    }

    // Antwort empfangen
    char buffer[4096];
    int bytesRead = recv(sock, buffer, sizeof(buffer) - 1, 0);
    if (bytesRead < 0) {
        closesocket(sock);
        WSACleanup();
        throw std::runtime_error("Failed to receive data.");
    }

    buffer[bytesRead] = '\0'; // Antwort null-terminieren

    // Socket schließen
    closesocket(sock);
    WSACleanup();

    return std::string(buffer);
}

int main(int argc, char* argv[]) {
    try {
        auto args = parseArguments(argc, argv);

        // Erforderliche Parameter extrahieren
        std::string serverIp = args["--server-ip"];
        int serverPort = std::stoi(args["--server-port"]);
        std::string token = args["--token"];

        if (serverIp.empty() || serverPort == 0 || token.empty()) {
            std::cerr << "❌ ERROR: Missing required parameters.\n";
            return 1;
        }

        std::cout << "🔒 Sending logout request...\n";

        // Logout-Anfrage senden und Antwort erhalten
        std::string response = sendLogoutRequest(serverIp, serverPort, token);

        std::cout << "Response from server:\n" << response << "\n";
    } catch (const std::exception& e) {
        std::cerr << "❌ ERROR: " << e.what() << "\n";
        return 1;
    }

    return 0;
}

```

--------------------------------------------------------------------------------
/agents/ChatBotAgent/html/Logo_light.svg:
--------------------------------------------------------------------------------

```
<svg width="3254" height="1025" viewBox="0 0 3254 1025" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2839.93 778.987V152.894H2594.38V13.3905H3254V152.894H3007.34V778.987H2839.93Z" fill="#110930"/>
<path d="M1898.85 778.987V13.3905H2297.3C2352.36 13.3905 2398.12 23.8068 2434.58 44.6394C2471.79 64.7279 2499.69 93.3727 2518.29 130.574C2537.64 167.031 2547.31 210.556 2547.31 261.149C2547.31 311.742 2537.26 356.012 2517.17 393.957C2497.83 431.158 2469.18 460.174 2431.23 481.007C2393.29 501.84 2346.78 512.256 2291.72 512.256H2065.15V778.987H1898.85ZM2065.15 376.1H2269.4C2304.37 376.1 2331.16 366.056 2349.76 345.967C2369.11 325.879 2378.78 297.978 2378.78 262.265C2378.78 237.713 2374.69 217.252 2366.5 200.884C2358.32 184.515 2346.04 171.867 2329.67 162.939C2314.04 154.01 2293.95 149.546 2269.4 149.546H2065.15V376.1Z" fill="#110930"/>
<path d="M1364.62 792.381C1244.08 792.381 1151.07 760.388 1085.59 696.402C1020.86 631.673 988.492 531.602 988.492 396.19C988.492 306.164 1004.12 232.134 1035.37 174.101C1066.62 115.323 1112.01 71.7979 1171.53 43.5251C1231.06 14.5084 1302.49 0 1385.82 0C1435.68 0 1482.55 5.58013 1526.45 16.7404C1570.35 27.9007 1609.04 45.0131 1642.53 68.0778C1676.75 91.1424 1703.17 120.159 1721.77 155.128C1741.12 189.353 1750.79 230.274 1750.79 277.891H1582.26C1582.26 254.827 1577.05 234.366 1566.63 216.51C1556.96 198.653 1543.19 183.773 1525.34 171.869C1507.48 159.964 1487.02 151.036 1463.95 145.084C1440.88 139.132 1416.7 136.156 1391.4 136.156C1352.71 136.156 1318.86 141.364 1289.84 151.78C1260.82 161.452 1236.64 176.705 1217.29 197.537C1198.69 217.626 1184.55 242.922 1174.88 273.427C1165.21 303.932 1160.37 339.273 1160.37 379.45V412.931C1160.37 468.732 1168.56 514.49 1184.93 550.203C1201.3 585.916 1225.85 612.7 1258.59 630.557C1291.33 647.669 1331.88 656.225 1380.24 656.225C1420.42 656.225 1455.77 650.273 1486.27 638.369C1517.52 625.721 1541.71 607.864 1558.82 584.799C1576.68 561.735 1585.61 533.462 1585.61 499.981V492.169H1356.81V364.942H1750.79V778.989H1641.41L1626.9 696.402C1604.58 717.979 1580.4 735.836 1554.36 749.972C1529.06 764.108 1500.78 774.525 1469.53 781.221C1438.28 788.661 1403.31 792.381 1364.62 792.381Z" fill="#110930"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M1 84.6547C1 44.6338 33.2944 12.1904 73.1316 12.1904H481.877C694.342 12.1904 866.579 185.222 866.579 398.667C866.579 612.112 694.342 785.143 481.877 785.143H248.9L42.9462 1015.92C28.2213 1032.42 1 1021.96 1 999.797V84.6547ZM215.784 244.691C215.784 235.18 223.477 227.469 232.967 227.469H481.34C575.48 227.469 651.795 303.96 651.795 398.317C651.795 492.673 575.48 569.164 481.34 569.164H354.546L244.825 688.762C226.538 700.952 215.784 687.755 215.784 676.576V244.691Z" fill="url(#paint0_linear_3311_10242)" stroke="url(#paint1_linear_3311_10242)" stroke-opacity="0.6"/>
<defs>
<linearGradient id="paint0_linear_3311_10242" x1="0.999982" y1="1024" x2="891.762" y2="34.8689" gradientUnits="userSpaceOnUse">
<stop stop-color="#0000F6"/>
<stop offset="0.5" stop-color="#7F017B"/>
<stop offset="1" stop-color="#FE0100"/>
</linearGradient>
<linearGradient id="paint1_linear_3311_10242" x1="-35.5737" y1="963.048" x2="159.462" y2="-195.052" gradientUnits="userSpaceOnUse">
<stop stop-color="white"/>
<stop offset="0.884335" stop-color="white" stop-opacity="0"/>
<stop offset="1" stop-color="white"/>
</linearGradient>
</defs>
</svg>

```

--------------------------------------------------------------------------------
/clients/C# .Net/3.0 mcp_create_source/Program.cs:
--------------------------------------------------------------------------------

```csharp
using System;
using System.Net.Sockets;
using System.Text;
using Newtonsoft.Json;
using System.Collections.Generic;

namespace MCPCreateSourceClient
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 8)
            {
                Console.WriteLine("Usage: --server-ip <IP> --server-port <PORT> --token <TOKEN> --name <NAME> --content <CONTENT> [--groups <GROUP1 GROUP2 ...>]");
                return;
            }

            string serverIp = GetArgument(args, "--server-ip");
            int serverPort = int.Parse(GetArgument(args, "--server-port"));
            string token = GetArgument(args, "--token");
            string name = GetArgument(args, "--name");
            string content = GetArgument(args, "--content");
            List<string> groups = GetArgumentList(args, "--groups");

            Console.WriteLine("📤 Sending request to create a new source...");

            var payload = new
            {
                command = "create_source",
                token = token,
                arguments = new
                {
                    name = name,
                    content = content,
                    groups = groups
                }
            };

            string response = SendRequest(serverIp, serverPort, payload);

            Console.WriteLine("✔️ Response from server:");
            Console.WriteLine(response);
        }

        static string GetArgument(string[] args, string key)
        {
            int index = Array.IndexOf(args, key);
            return index >= 0 && index < args.Length - 1 ? args[index + 1] : null;
        }

        static List<string> GetArgumentList(string[] args, string key)
        {
            int index = Array.IndexOf(args, key);
            if (index >= 0 && index < args.Length - 1)
            {
                var groups = new List<string>();
                for (int i = index + 1; i < args.Length; i++)
                {
                    if (args[i].StartsWith("--")) break;
                    groups.Add(args[i]);
                }
                return groups;
            }
            return new List<string>();
        }

        static string SendRequest(string serverIp, int serverPort, object payload)
        {
            string payloadJson = JsonConvert.SerializeObject(payload);

            try
            {
                using (TcpClient client = new TcpClient(serverIp, serverPort))
                {
                    NetworkStream stream = client.GetStream();

                    // Send payload
                    byte[] data = Encoding.UTF8.GetBytes(payloadJson);
                    stream.Write(data, 0, data.Length);

                    // Receive response
                    byte[] buffer = new byte[4096];
                    int bytesRead;
                    StringBuilder response = new StringBuilder();

                    do
                    {
                        bytesRead = stream.Read(buffer, 0, buffer.Length);
                        response.Append(Encoding.UTF8.GetString(buffer, 0, bytesRead));
                    } while (bytesRead == buffer.Length);

                    return response.ToString();
                }
            }
            catch (Exception e)
            {
                return $"Error: {e.Message}";
            }
        }
    }
}

```

--------------------------------------------------------------------------------
/clients/C# .Net/Code Archiv/mcp_create_source.cs:
--------------------------------------------------------------------------------

```csharp
using System;
using System.Net.Sockets;
using System.Text;
using Newtonsoft.Json;
using System.Collections.Generic;

namespace MCPCreateSourceClient
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length < 8)
            {
                Console.WriteLine("Usage: --server-ip <IP> --server-port <PORT> --token <TOKEN> --name <NAME> --content <CONTENT> [--groups <GROUP1 GROUP2 ...>]");
                return;
            }

            string serverIp = GetArgument(args, "--server-ip");
            int serverPort = int.Parse(GetArgument(args, "--server-port"));
            string token = GetArgument(args, "--token");
            string name = GetArgument(args, "--name");
            string content = GetArgument(args, "--content");
            List<string> groups = GetArgumentList(args, "--groups");

            Console.WriteLine("📤 Sending request to create a new source...");

            var payload = new
            {
                command = "create_source",
                token = token,
                arguments = new
                {
                    name = name,
                    content = content,
                    groups = groups
                }
            };

            string response = SendRequest(serverIp, serverPort, payload);

            Console.WriteLine("✔️ Response from server:");
            Console.WriteLine(response);
        }

        static string GetArgument(string[] args, string key)
        {
            int index = Array.IndexOf(args, key);
            return index >= 0 && index < args.Length - 1 ? args[index + 1] : null;
        }

        static List<string> GetArgumentList(string[] args, string key)
        {
            int index = Array.IndexOf(args, key);
            if (index >= 0 && index < args.Length - 1)
            {
                var groups = new List<string>();
                for (int i = index + 1; i < args.Length; i++)
                {
                    if (args[i].StartsWith("--")) break;
                    groups.Add(args[i]);
                }
                return groups;
            }
            return new List<string>();
        }

        static string SendRequest(string serverIp, int serverPort, object payload)
        {
            string payloadJson = JsonConvert.SerializeObject(payload);

            try
            {
                using (TcpClient client = new TcpClient(serverIp, serverPort))
                {
                    NetworkStream stream = client.GetStream();

                    // Send payload
                    byte[] data = Encoding.UTF8.GetBytes(payloadJson);
                    stream.Write(data, 0, data.Length);

                    // Receive response
                    byte[] buffer = new byte[4096];
                    int bytesRead;
                    StringBuilder response = new StringBuilder();

                    do
                    {
                        bytesRead = stream.Read(buffer, 0, buffer.Length);
                        response.Append(Encoding.UTF8.GetString(buffer, 0, bytesRead));
                    } while (bytesRead == buffer.Length);

                    return response.ToString();
                }
            }
            catch (Exception e)
            {
                return $"Error: {e.Message}";
            }
        }
    }
}

```

--------------------------------------------------------------------------------
/clients/Java/4.0 mcp_list_groups/MCPListGroupsClient.java:
--------------------------------------------------------------------------------

```java
import org.json.JSONObject;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.nio.charset.StandardCharsets;

public class MCPListGroupsClient {

    public static void main(String[] args) {
        // Minimaler Check: Wir erwarten mindestens 3 "richtige" Parameter
        // (d.h. --server-ip <IP>, --server-port <PORT>, --token <TOKEN>)
        if (args.length < 3 * 2) { // 3 Schlüssel + 3 Werte = 6 Strings
            printUsage();
            return;
        }

        // Argumente auslesen
        String serverIp  = getArgument(args, "--server-ip");
        String portStr   = getArgument(args, "--server-port");
        String token     = getArgument(args, "--token");

        if (serverIp == null || portStr == null || token == null) {
            printUsage();
            return;
        }

        int serverPort = Integer.parseInt(portStr);

        System.out.println("📄 Abrufen der Gruppen...");

        // JSON-Payload erzeugen
        JSONObject payload = new JSONObject();
        payload.put("command", "list_groups");
        payload.put("token", token);

        // Request an den Server senden
        String response = sendRequest(serverIp, serverPort, payload);
        System.out.println("✔️ Antwort:");
        System.out.println(response);
    }

    /**
     * Extrahiert den Wert für ein bestimmtes Argument (z.B. --server-ip 127.0.0.1).
     * Gibt null zurück, wenn der Schlüssel nicht gefunden wird oder kein Wert dahinter steht.
     */
    private static String getArgument(String[] args, String key) {
        for (int i = 0; i < args.length - 1; i++) {
            if (args[i].equals(key)) {
                return args[i + 1];
            }
        }
        return null;
    }

    /**
     * Stellt eine Socket-Verbindung her, sendet das JSON und empfängt die Antwort.
     */
    private static String sendRequest(String serverIp, int serverPort, JSONObject payload) {
        String payloadJson = payload.toString();

        try (Socket client = new Socket(serverIp, serverPort)) {
            // Daten senden
            OutputStream out = client.getOutputStream();
            byte[] data = payloadJson.getBytes(StandardCharsets.UTF_8);
            out.write(data);
            out.flush();

            // Antwort empfangen
            InputStream in = client.getInputStream();
            byte[] buffer = new byte[4096];
            StringBuilder responseBuilder = new StringBuilder();

            int bytesRead;
            do {
                bytesRead = in.read(buffer);
                if (bytesRead > 0) {
                    responseBuilder.append(new String(buffer, 0, bytesRead, StandardCharsets.UTF_8));
                }
            } while (bytesRead == buffer.length);

            return responseBuilder.toString();

        } catch (IOException e) {
            return "Error: " + e.getMessage();
        }
    }

    /**
     * Gibt die erwartete Aufrufstruktur aus.
     */
    private static void printUsage() {
        System.out.println("Usage: --server-ip <IP> --server-port <PORT> --token <TOKEN>");
        System.out.println();
        System.out.println("Beispiel:");
        System.out.println("  java -cp .;json-20241224.jar MCPListGroupsClient \\");
        System.out.println("       --server-ip 127.0.0.1 --server-port 1234 --token MyToken");
    }
}

```

--------------------------------------------------------------------------------
/clients/Go/5.0 mcp_store_user/MCPStoreUserClient.go:
--------------------------------------------------------------------------------

```go
package main

import (
	"bytes"
	"encoding/json"
	"errors"
	"flag"
	"fmt"
	"io"
	"net"
	"os"
)

type StoreUserPayload struct {
	Command   string                 `json:"command"`
	Token     string                 `json:"token"`
	Arguments map[string]interface{} `json:"arguments"`
}

func sendStoreUserRequest(serverIP string, serverPort int, token, name, email, password, language, timezone string, roles, groups []string, usePublic, activateFtp bool, ftpPassword string) (string, error) {
	// Prepare the request payload
	payload := StoreUserPayload{
		Command: "store_user",
		Token:   token,
		Arguments: map[string]interface{}{
			"name":        name,
			"email":       email,
			"password":    password,
			"language":    language,
			"timezone":    timezone,
			"roles":       roles,
			"groups":      groups,
			"usePublic":   usePublic,
			"activateFtp": activateFtp,
			"ftpPassword": ftpPassword,
		},
	}

	// Convert the payload to JSON
	payloadJSON, err := json.Marshal(payload)
	if err != nil {
		return "", err
	}

	// Create a connection to the server
	conn, err := net.Dial("tcp", fmt.Sprintf("%s:%d", serverIP, serverPort))
	if err != nil {
		return "", err
	}
	defer conn.Close()

	// Send the request
	_, err = conn.Write(payloadJSON)
	if err != nil {
		return "", err
	}

	// Receive the response
	var responseBuffer bytes.Buffer
	buf := make([]byte, 4096)
	for {
		n, err := conn.Read(buf)
		if err != nil {
			if errors.Is(err, io.EOF) {
				break
			}
			return "", err
		}
		responseBuffer.Write(buf[:n])
		if n < 4096 {
			break
		}
	}

	return responseBuffer.String(), nil
}

func main() {
	serverIP := flag.String("server-ip", "", "IP address of the MCP server")
	serverPort := flag.Int("server-port", 0, "Port number of the MCP server")
	token := flag.String("token", "", "Authentication token")
	name := flag.String("name", "", "Name of the user")
	email := flag.String("email", "", "Email of the user")
	password := flag.String("password", "", "Password for the user")
	language := flag.String("language", "en", "Language code (optional)")
	timezone := flag.String("timezone", "Europe/Berlin", "Timezone (optional)")
	roles := flag.String("roles", "", "Comma-separated list of roles for the user (optional)")
	groups := flag.String("groups", "", "Comma-separated list of groups for the user (optional)")
	usePublic := flag.Bool("usePublic", false, "Use the public knowledge base")
	activateFtp := flag.Bool("activateFtp", false, "Activate FTP for the user")
	ftpPassword := flag.String("ftpPassword", "", "FTP password for the user (optional)")

	flag.Parse()

	if *serverIP == "" || *serverPort == 0 || *token == "" || *name == "" || *email == "" || *password == "" {
		fmt.Println("❌ ERROR: Required flags are missing.")
		flag.Usage()
		os.Exit(1)
	}

	// Convert roles and groups to slices
	roleList := []string{}
	if *roles != "" {
		roleList = append(roleList, *roles)
	}

groupList := []string{}
	if *groups != "" {
		groupList = append(groupList, *groups)
	}

	// Send the request to store the user
	fmt.Println("📤 Sending request to create a new user...")
	response, err := sendStoreUserRequest(*serverIP, *serverPort, *token, *name, *email, *password, *language, *timezone, roleList, groupList, *usePublic, *activateFtp, *ftpPassword)
	if err != nil {
		fmt.Printf("❌ ERROR: %v\n", err)
		os.Exit(1)
	}

	fmt.Println("✔️ Response from server:")
	fmt.Println(response)
}
```

--------------------------------------------------------------------------------
/clients/Python/4.2 mcp_delete_group/MCPDeleteGroupClient.py:
--------------------------------------------------------------------------------

```python
import socket
import ssl
import json
import argparse

def send_delete_group_request(server_ip, server_port, token, group_name, use_ssl=True, accept_self_signed=False):
    """
    Sends a request to delete an existing group to the MCP server.

    :param server_ip: IP address of the MCP server
    :param server_port: Port number of the MCP server
    :param token: Authentication token
    :param group_name: Name of the group to delete
    :param use_ssl: Whether to use SSL/TLS for the connection
    :param accept_self_signed: Whether to accept self-signed certificates
    :return: Response from the server
    """
    # Prepare the request payload
    payload = {
        "command": "delete_group",
        "token": token,
        "arguments": {
            "groupName": group_name
        }
    }

    # Convert the payload to a JSON string
    payload_json = json.dumps(payload)
    
    raw_socket = None
    client_socket = None

    try:
        # Create a socket object
        raw_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        raw_socket.settimeout(10)

        # Establish SSL/TLS connection if required
        if use_ssl:
            context = ssl.create_default_context()
            if accept_self_signed:
                context.check_hostname = False
                context.verify_mode = ssl.CERT_NONE
            client_socket = context.wrap_socket(raw_socket, server_hostname=server_ip)
        else:
            client_socket = raw_socket
        
        # Connect to the server
        client_socket.connect((server_ip, server_port))

        # Send the request
        client_socket.sendall(payload_json.encode('utf-8'))

        # Receive the response
        response = b""
        while True:
            part = client_socket.recv(4096)
            if not part:
                break
            response += part

        # Decode the response
        return response.decode('utf-8')

    except ssl.SSLError:
        return "Error: Server and/or client may require TLS encryption. Please enable SSL/TLS."
    except Exception as e:
        return f"Error: {e}"
    
    finally:
        if client_socket is not None:
            try:
                client_socket.shutdown(socket.SHUT_RDWR)
            except:
                pass
            client_socket.close()

if __name__ == "__main__":
    # Argument parser for command-line arguments
    parser = argparse.ArgumentParser(description="Send a request to delete an existing group to the MCP server.")
    parser.add_argument("--server-ip", required=True, help="IP address of the MCP server")
    parser.add_argument("--server-port", required=True, type=int, help="Port number of the MCP server")
    parser.add_argument("--token", required=True, help="Authentication token")
    parser.add_argument("--group-name", required=True, help="Name of the group to delete")
    parser.add_argument("--use-ssl", action="store_true", help="Connect using SSL/TLS")
    parser.add_argument("--accept-self-signed", action="store_true", help="Accept self-signed certificates (disable certificate verification)")

    args = parser.parse_args()

    # Send the delete group request and print the response
    response = send_delete_group_request(
        args.server_ip,
        args.server_port,
        args.token,
        args.group_name,
        use_ssl=args.use_ssl,
        accept_self_signed=args.accept_self_signed
    )
    print("Response from server:", response)

```

