This is page 1 of 16. Use http://codebase.md/fujitsu-ai/mcp-server-for-mas-developments?lines=false&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/Gradio/mcp_servers/sqlite/.python-version: -------------------------------------------------------------------------------- ``` 3.12 ``` -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- ``` # Auto detect text files and perform LF normalization * text=auto ``` -------------------------------------------------------------------------------- /agents/MCP-Client/.env.example: -------------------------------------------------------------------------------- ``` PGPT_API_KEY = 'mykey' PGPT_OAI_BASE_URL = 'http://127.0.0.1:8001' PGPT_API_KEY_VLLM = 'vllmapikey' PGPT_OAI_BASE_URL_VLLM = 'https://vllmapi' USE_VLLM = "False" ``` -------------------------------------------------------------------------------- /clients/C# .Net/1.0 mcp_login/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- ```csharp // <autogenerated /> using System; using System.Reflection; [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] ``` -------------------------------------------------------------------------------- /clients/C# .Net/1.1 mcp_logout/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- ```csharp // <autogenerated /> using System; using System.Reflection; [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] ``` -------------------------------------------------------------------------------- /clients/C# .Net/2.0 mcp_chat/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- ```csharp // <autogenerated /> using System; using System.Reflection; [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] ``` -------------------------------------------------------------------------------- /clients/C# .Net/2.1 mcp_continue_chat/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- ```csharp // <autogenerated /> using System; using System.Reflection; [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] ``` -------------------------------------------------------------------------------- /clients/C# .Net/2.2 mcp_get_chat_info/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- ```csharp // <autogenerated /> using System; using System.Reflection; [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] ``` -------------------------------------------------------------------------------- /clients/C# .Net/3.0 mcp_create_source/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- ```csharp // <autogenerated /> using System; using System.Reflection; [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] ``` -------------------------------------------------------------------------------- /clients/C# .Net/3.1 mcp_get_source/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- ```csharp // <autogenerated /> using System; using System.Reflection; [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] ``` -------------------------------------------------------------------------------- /clients/C# .Net/3.2 mcp_list_sources/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- ```csharp // <autogenerated /> using System; using System.Reflection; [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] ``` -------------------------------------------------------------------------------- /clients/C# .Net/3.3 mcp_edit_source/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- ```csharp // <autogenerated /> using System; using System.Reflection; [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] ``` -------------------------------------------------------------------------------- /clients/C# .Net/3.4 mcp_delete_source/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- ```csharp // <autogenerated /> using System; using System.Reflection; [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] ``` -------------------------------------------------------------------------------- /clients/C# .Net/4.0 mcp_list_groups/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- ```csharp // <autogenerated /> using System; using System.Reflection; [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] ``` -------------------------------------------------------------------------------- /clients/C# .Net/4.1 mcp_store_group/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- ```csharp // <autogenerated /> using System; using System.Reflection; [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] ``` -------------------------------------------------------------------------------- /clients/C# .Net/4.2 mcp_delete_group/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- ```csharp // <autogenerated /> using System; using System.Reflection; [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] ``` -------------------------------------------------------------------------------- /clients/C# .Net/5.0 mcp_store_user/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- ```csharp // <autogenerated /> using System; using System.Reflection; [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] ``` -------------------------------------------------------------------------------- /clients/C# .Net/5.1 mcp_edit_user/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- ```csharp // <autogenerated /> using System; using System.Reflection; [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] ``` -------------------------------------------------------------------------------- /clients/C# .Net/5.2 mcp_delete_user/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- ```csharp // <autogenerated /> using System; using System.Reflection; [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] ``` -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- ``` node_modules dist tests .idea logs package-lock.json pgpt.env.json agents/ChatBotAgent/pgpt_botagent.json agents/ChatBotAgent/Python/__pycache__/ agents/ChatBotAgent/__pycache__ open-ai-compatible-api/__pycache__/ /agents/ChatBotAgent/config.json agents/__pycache__/__init__.cpython-312.pyc *.pyc /.vscode agents/ChatBotAgent/flask.log agents/OpenAI_Compatible_API_Agent/pgpt_openai_api_mcp.json agents/OpenAI_Compatible_API_Agent/pgpt_openai_api_proxy.json agents/OpenAI_Compatible_API_Agent/pgpt_openai_api_proxy_sam.json agents/ChatBotAgent/agent.log agents/OpenAI_Compatible_API_Agent/venv agent.log *.log agents/SourceManagerAgent/config.json agents/SourceManagerAgent/database/documents.sql /tests/mcp-cli/undefined/ /agents/MCP-Client/undefined/ agents/MCP-Client/.env agents/MCP-Client/test_prompts.txt /agents/MCP-Client/server_config2.json clients/Python/Gradio/.gradio/cached_examples/16/log.csv agents/OpenAI_Compatible_API_Agent/.gradio/cached_examples/16/log.csv clients/Python/Gradio/config.json clients/Gradio/config.json clients/Gradio/mcp_servers/sqlite/uv.lock clients/Gradio/mcp_servers/sqlite/test.db clients/Gradio/models/moondream-2b-int8.mf clients/Gradio/models/moondream-0_5b-int8.mf examples/dynamic_sources/rss_reader/config.json /clients/Gradio/mcp_servers/pgpt/config.json examples/sftp_upload_with_id/config_ftp.json ``` -------------------------------------------------------------------------------- /clients/Gradio/mcp_servers/pgpt/README.md: -------------------------------------------------------------------------------- ```markdown # mcp-server-pgpt Model Context Protocol server to access PrivateGPT functionalities [](https://www.python.org/downloads/release/python-3120/) [](https://opensource.org/licenses/MIT) ## Demos https://github.com/user-attachments/assets/dc4e377b-4efb-43e6-85fa-93ed852fe21f uv sync ## Quickstart To try this in Claude Desktop app, add this to your claude config files: ```json { "mcpServers": { "mcp-server-oracle": { "command": "uvx", "args": [ "mcp-server-oracle" ], "env": { "ORACLE_CONNECTION_STRING": "username/password@hostname:password/service_name" } } } } ``` ### Prerequisites - UV (pacakge manager) - Python 3.12+ - Claude Desktop ### Installation #### Claude Desktop Configuration Add the server configuration to your Claude Desktop config file: **MacOS**: `~/Library/Application\ Support/Claude/claude_desktop_config.json` **Windows**: `%APPDATA%/Claude/claude_desktop_config.json` ## Contributing 1. Fork the repository from [mcp-server-oracle](https://github.com/hdcola/mcp-server-oracle) 2. Create your feature branch 3. Commit your changes 4. Push to the branch 5. Open a Pull Request ## License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. ``` -------------------------------------------------------------------------------- /agents/MCP-Client/README.md: -------------------------------------------------------------------------------- ```markdown # MCP-Client ## Overview The **MCP Client** is an example Client that uses the PGPT OpenAI-Compatible API (or other providers) and MCP Servers to make use of MCP tools. --- ## Features - **Load Multiple MCP servers** - **Communicate via Stdio** - **List tools, and use tools** ## Prerequisites - **Python:** 3.8 or higher - **Dependencies:** - **Have the OpenAI Compatible API agent running** --- ## Setup 1. **Clone the Repository:** ```bash git clone https://github.com/pgpt-dev/MCP-Server-for-MAS-Developments.git cd MCP-Server-for-MAS-Developments ``` 2. **(Optional) Create and Activate a Virtual Environment:** - **Windows:** ```bash python -m venv venv .\venv\Scripts\activate ``` - **Unix/MacOS:** ```bash python -m venv venv source venv/bin/activate ``` 3. **Install Dependencies:** ```bash pip install -r agents/MCP-Client/requirements.txt ``` 4. **Configure the Agent:** Copy the example configuration file and adjust it to your environment: ```bash cp agents/MCP-Client/.env.example agents/MCP-Client/.env ``` **Example `config.json`:** ```env PGPT_API_KEY = '<your api key>' PGPT_OAI_BASE_URL = '<PGPT OpenAiCompatible API URL>' ``` ## Running the Agent To start the MCP-Client, ensure you're in the repository's root directory and the OAI Agent is running and run: ```bash python -m agents.MCP-Client.Python.mcp_client ``` --- ## License This project is licensed under the MIT License - see the LICENSE file for details. ``` -------------------------------------------------------------------------------- /clients/Gradio/mcp_servers/arxiv/README.md: -------------------------------------------------------------------------------- ```markdown # arXiv MCP Server Integration This integration allows you to use the arXiv MCP Server with the Gradio client. The arXiv MCP Server provides tools for searching, downloading, and reading arXiv papers. ## Prerequisites - Python 3.10 or higher - Node.js 16 or higher ## Installation 1. Install the arxiv-mcp-server package: ```bash pip install arxiv-mcp-server ``` 2. Make sure the arxiv-stdio.js script is executable: ```bash chmod +x arxiv-stdio.js ``` ## Configuration Add the arxiv server to your server_config.json file: ```json { "mcpServers": { "arxiv": { "command": "node", "args": [ "clients/Gradio/mcp_servers/arxiv/arxiv-stdio.js" ] } } } ``` ## Available Tools The arXiv MCP Server provides the following tools: 1. **search_papers**: Search for papers on arXiv - Parameters: - query: The search query - max_results: Maximum number of results to return (default: 10) 2. **download_paper**: Download a paper from arXiv - Parameters: - paper_id: The arXiv ID of the paper 3. **list_papers**: List downloaded papers - Parameters: None 4. **read_paper**: Read a downloaded paper - Parameters: - paper_id: The arXiv ID of the paper ## Example Usage Here are some example prompts to use with the arXiv MCP Server: - "Search for papers about large language models" - "Download the paper with ID 2303.08774" - "List all downloaded papers" - "Read the paper with ID 2303.08774" ## Troubleshooting If you encounter any issues, make sure: 1. The arxiv-mcp-server package is installed 2. The arxiv-stdio.js script is executable 3. The server_config.json file is correctly configured 4. You have an active internet connection to access arXiv ``` -------------------------------------------------------------------------------- /clients/Gradio/README.md: -------------------------------------------------------------------------------- ```markdown # PrivateGPT Multi-Backend Demo Chat App ## Description This is a small demo demonstrating the usage of both, the VLLM API and the PrivateGPT API via RAG. Note: This is still under development and might change in the future --- ## Prerequisites - Python 3.8 or higher - Access to the PrivateGPT server - Access to the VLLM API on PrivateGPT --- ## Setup 1. **Clone the repository:** ```bash git clone [https://github.com/Fujitsu-AI/MCP-Server-for-MAS-Developments.git](https://github.com/Fujitsu-AI/MCP-Server-for-MAS-Developments.git) cd MCP-Server-for-MAS-Developments/ ``` 2. **Optional: Create and activate a virtual environment:** ```bash python -m venv venv ``` - **Windows:** ```bash .\venv\Scripts\activate ``` - **Unix/MacOS:** ```bash source venv/bin/activate ``` 3. **Install dependencies:** ```bash pip install -r .\clients\Gradio\requirements.txt ``` 4. **Customise configuration file:** - 4.1 **Configuration for Gradio Client:** Copy the `config.json.example` file to `config.json` e.g. with `cp .\clients\Gradio\config.json.example .\clients\Gradio\config.json` Make sure that the `config.json` is configured correctly and contains all necessary fields. The file should look like this: ```json { "base_url": "https://.../api/v1", "proxy_user": "", "proxy_password": "", "access_header": "", "vllm_url": "https://.../api/v1", "vllm_api_key": "", "language": "en", "use_public": true } ``` 5. **Start the UI:** - 5.1 **Start the multi-backend Gradio Client Demo:** ```bash python -m clients.Gradio.main ``` ## License This project is licensed under the MIT License - see the LICENSE file for details. ``` -------------------------------------------------------------------------------- /clients/Gradio/mcp_servers/sqlite/README.md: -------------------------------------------------------------------------------- ```markdown # SQLite MCP Server ## Overview A Model Context Protocol (MCP) server implementation that provides database interaction and business intelligence capabilities through SQLite. This server enables running SQL queries, analyzing business data, and automatically generating business insight memos. ## Components ### Resources The server exposes a single dynamic resource: - `memo://insights`: A continuously updated business insights memo that aggregates discovered insights during analysis - Auto-updates as new insights are discovered via the append-insight tool ### Prompts The server provides a demonstration prompt: - `mcp-demo`: Interactive prompt that guides users through database operations - Required argument: `topic` - The business domain to analyze - Generates appropriate database schemas and sample data - Guides users through analysis and insight generation - Integrates with the business insights memo ### Tools The server offers six core tools: #### Query Tools - `read_query` - Execute SELECT queries to read data from the database - Input: - `query` (string): The SELECT SQL query to execute - Returns: Query results as array of objects - `write_query` - Execute INSERT, UPDATE, or DELETE queries - Input: - `query` (string): The SQL modification query - Returns: `{ affected_rows: number }` - `create_table` - Create new tables in the database - Input: - `query` (string): CREATE TABLE SQL statement - Returns: Confirmation of table creation #### Schema Tools - `list_tables` - Get a list of all tables in the database - No input required - Returns: Array of table names - `describe-table` - View schema information for a specific table - Input: - `table_name` (string): Name of table to describe - Returns: Array of column definitions with names and types #### Analysis Tools - `append_insight` - Add new business insights to the memo resource - Input: - `insight` (string): Business insight discovered from data analysis - Returns: Confirmation of insight addition - Triggers update of memo://insights resource ## Usage with Claude Desktop ### uv ```bash # Add the server to your claude_desktop_config.json "mcpServers": { "sqlite": { "command": "uv", "args": [ "--directory", "parent_of_servers_repo/servers/src/sqlite", "run", "mcp-server-sqlite", "--db-path", "~/test.db" ] } } ``` ### Docker ```json # Add the server to your claude_desktop_config.json "mcpServers": { "sqlite": { "command": "docker", "args": [ "run", "--rm", "-i", "-v", "mcp-test:/mcp", "mcp/sqlite", "--db-path", "/mcp/test.db" ] } } ``` ## Building Docker: ```bash docker build -t mcp/sqlite . ``` ## License This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. ``` -------------------------------------------------------------------------------- /agents/IoTAgent/README.md: -------------------------------------------------------------------------------- ```markdown # Fujitsu PrivateGPT MQTT IoT Agent The **IoT MQTT Agent** is a Python application that connects to an MQTT broker, processes vehicle data, and logs messages as JSON records. In addition, it communicates with a Chatbot Agent to generate human-readable, logical sentences from raw data. This communication is performed using the standardized FIPA ACL (Agent Communication Language) protocol, ensuring interoperability in multi-agent environments. --- ## Features - **MQTT Communication:** Connects to an MQTT broker to subscribe to topics and receive vehicle data. - **Data Logging:** Records incoming messages as JSON records with timestamps, vehicle details, and parameter values. Data is saved locally and rotated based on file size limits. - **Multi-Language Support:** Processes messages in multiple languages (e.g., German and English) and stores generated sentences accordingly. - **Chatbot Agent Integration:** Utilizes a Chatbot Agent to generate logical sentences from incoming MQTT data. The request to the Chatbot Agent is structured as a FIPA ACL message. - **FIPA ACL Standard:** The agent leverages FIPA ACL for structured multi-agent communication. Each message includes standardized fields such as: - **Performative:** (`request` or `failure`) - **Sender:** (`IoT_MQTT_Agent`) - **Receiver:** (`Chatbot_Agent`) - **Language:** (`fipa-sl`) - **Ontology:** (`fujitsu-iot-ontology`) - **Content:** (The JSON parameters used to generate a logical sentence) - **SFTP File Transfer:** When log files exceed a size threshold, they are automatically uploaded to a remote SFTP server, connected to Private GPT bulk upload services, and archived locally. --- ## How It Works 1. **Configuration Loading:** The agent loads its settings from a JSON configuration file (default: `pgpt_iot_agent.json`), which includes details for MQTT, SFTP, file handling, and the Chatbot Agent. 2. **MQTT Subscription:** Once connected to the MQTT broker, the agent subscribes to a pre-defined topic to receive data from vehicles. 3. **Message Processing & Logging:** Incoming MQTT messages are parsed, timestamped, and saved locally as JSON records. Additionally, the agent displays and logs these records. 4. **Interpreting Data via the Chatbot Agent:** - The agent prepares a prompt based on the received data. - It then sends a **FIPA ACL** request to the Chatbot Agent with the necessary details. - If the Chatbot Agent returns a failure (e.g., due to a connectivity issue), the IoT Agent waits and retries the request until a successful response is received. - Upon receiving an OK response, the agent logs the generated sentence and saves it to a language-specific text file. 5. **File Management:** Files are automatically rotated when they reach a configured size limit, ensuring continuous logging without manual intervention. --- ## Requirements - **Python 3.x** - **Python Libraries:** The required libraries are listed in `requirements.txt` and include: - `paho-mqtt` - `paramiko` - `requests` - Plus standard libraries such as `json`, `logging`, `datetime`, etc. --- ## License This project is licensed under the MIT License - see the LICENSE file for details. ``` -------------------------------------------------------------------------------- /clients/Gradio/mcp_servers/filesystem/README.md: -------------------------------------------------------------------------------- ```markdown # Filesystem MCP Server Node.js server implementing Model Context Protocol (MCP) for filesystem operations. ## Features - Read/write files - Create/list/delete directories - Move files/directories - Search files - Get file metadata **Note**: The server will only allow operations within directories specified via `args`. ## API ### Resources - `file://system`: File system operations interface ### Tools - **read_file** - Read complete contents of a file - Input: `path` (string) - Reads complete file contents with UTF-8 encoding - **read_multiple_files** - Read multiple files simultaneously - Input: `paths` (string[]) - Failed reads won't stop the entire operation - **write_file** - Create new file or overwrite existing (exercise caution with this) - Inputs: - `path` (string): File location - `content` (string): File content - **edit_file** - Make selective edits using advanced pattern matching and formatting - Features: - Line-based and multi-line content matching - Whitespace normalization with indentation preservation - Fuzzy matching with confidence scoring - Multiple simultaneous edits with correct positioning - Indentation style detection and preservation - Git-style diff output with context - Preview changes with dry run mode - Failed match debugging with confidence scores - Inputs: - `path` (string): File to edit - `edits` (array): List of edit operations - `oldText` (string): Text to search for (can be substring) - `newText` (string): Text to replace with - `dryRun` (boolean): Preview changes without applying (default: false) - `options` (object): Optional formatting settings - `preserveIndentation` (boolean): Keep existing indentation (default: true) - `normalizeWhitespace` (boolean): Normalize spaces while preserving structure (default: true) - `partialMatch` (boolean): Enable fuzzy matching (default: true) - Returns detailed diff and match information for dry runs, otherwise applies changes - Best Practice: Always use dryRun first to preview changes before applying them - **create_directory** - Create new directory or ensure it exists - Input: `path` (string) - Creates parent directories if needed - Succeeds silently if directory exists - **list_directory** - List directory contents with [FILE] or [DIR] prefixes - Input: `path` (string) - **move_file** - Move or rename files and directories - Inputs: - `source` (string) - `destination` (string) - Fails if destination exists - **search_files** - Recursively search for files/directories - Inputs: - `path` (string): Starting directory - `pattern` (string): Search pattern - `excludePatterns` (string[]): Exclude any patterns. Glob formats are supported. - Case-insensitive matching - Returns full paths to matches - **get_file_info** - Get detailed file/directory metadata - Input: `path` (string) - Returns: - Size - Creation time - Modified time - Access time - Type (file/directory) - Permissions - **list_allowed_directories** - List all directories the server is allowed to access - No input required - Returns: - Directories that this server can read/write from ## Usage with Claude Desktop Add this to your `claude_desktop_config.json`: Note: you can provide sandboxed directories to the server by mounting them to `/projects`. Adding the `ro` flag will make the directory readonly by the server. ### Docker Note: all directories must be mounted to `/projects` by default. ```json { "mcpServers": { "filesystem": { "command": "docker", "args": [ "run", "-i", "--rm", "--mount", "type=bind,src=/Users/username/Desktop,dst=/projects/Desktop", "--mount", "type=bind,src=/path/to/other/allowed/dir,dst=/projects/other/allowed/dir,ro", "--mount", "type=bind,src=/path/to/file.txt,dst=/projects/path/to/file.txt", "mcp/filesystem", "/projects" ] } } } ``` ### NPX ```json { "mcpServers": { "filesystem": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "/Users/username/Desktop", "/path/to/other/allowed/dir" ] } } } ``` ## Build Docker build: ```bash docker build -t mcp/filesystem -f src/filesystem/Dockerfile . ``` ## License This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. ``` -------------------------------------------------------------------------------- /agents/OpenAI_Compatible_API_Agent/README.md: -------------------------------------------------------------------------------- ```markdown # PrivateGPT OpenAI-Compatible API Agent ## Description The PrivateGPT OpenAI-Compatible API Agent is a client that communicates with a private GPT server and provides an interface to openai-compatible libraries and tools. It comes in two variations. Variation 1 (*openai_compatible_api.py*) uses the PrivateGPT API directly, Variation 2 (*openai_mcp_api.py*) uses communicates through the PrivateGPT MCP Server. --- ## Prerequisites - Python 3.8 or higher - Access to the PrivateGPT server - For Variation 2, access to MCP server --- ## Setup 1. **Clone the repository:** ```bash git clone [https://github.com/Fujitsu-AI/MCP-Server-for-MAS-Developments.git](https://github.com/Fujitsu-AI/MCP-Server-for-MAS-Developments.git) cd MCP-Server-for-MAS-Developments ``` 2. **Optional: Create and activate a virtual environment:** ```bash python -m venv venv ``` - **Windows:** ```bash .\venv\Scripts\activate ``` - **Unix/MacOS:** ```bash source venv/bin/activate ``` 3. **Install dependencies:** ```bash pip install -r .\agents\OpenAI_Compatible_API_Agent\requirements.txt ``` 4. **Customise configuration file:** - 4.1 **OpenAI-Compatible API via PrivateGPT API:** Copy the `pgpt_api_proxy.json.example` file to `pgpt_api_proxy.json` e.g. with `cp .\agents\OpenAI_Compatible_API_Agent\pgpt_api_proxy.json.example .\agents\OpenAI_Compatible_API_Agent\pgpt_api_proxy.json` Make sure that the `pgpt_api_proxy.json` is configured correctly and contains all necessary fields. The file should look like this: ```json { "base_url": "<Url to your private GPT instance>", "proxy_user": "<Proxy User>", "proxy_password": "<Proxy Password>", "access_header": "<Access Header>", "groups": ["<Groups to access>"], "language": "en", "use_public": true, "api_ip": "0.0.0.0", "api_port": 8001, "whitelist_keys": [] } ``` - 4.2 **OpenAI-Compatible API via MCP Server:** Copy the `pgpt_openai_api_mcp.json.example` file to `pgpt_openai_api_mcp.json` e.g. with `cp .\pgpt_openai_api_mcp.json.example .\pgpt_openai_api_mcp.json` Make sure that the `pgpt_openai_api_mcp.json` is configured correctly and contains all necessary fields. The file should look like this: ```json { "email": "<Your PrivateGPT account>", "password": "<Your PrivateGPT password>", "groups": ["<Groups to access>"], "language": "en", "api_ip": "0.0.0.0", "api_port": 8002, "whitelist_keys": [], "mcp_server": { "host": "127.0.0.1", "port": 5000 } } ``` 5. **Start the AI agents:** - 5.1 **Start the OpenAI-compatible API agent that uses the PrivateGPT API directly:** ```bash python -m agents.OpenAI_Compatible_API_Agent.Python.openai_compatible_api ``` - 5.2 **Start the OpenAI-compatible API agent that uses the MCP server to communicate:** ```bash python -m agents.OpenAI_Compatible_API_Agent.Python.openai_mcp_api ``` - 5.3 **In order to run the OpenAI Compatible Agent with Docker:** Make sure Docker is installed on your System. ```bash cd agents\OpenAI_Compatible_API_Agent ``` To build and run Docker in Foreground: ```bash docker compose up --build ``` To build and run Docker in Background: ```bash docker compose up --build -d ``` 6. **Generate API key** Generate a key with the following command: ```bash python -m agents.OpenAI_Compatible_API_Agent.Python.generate_api_key --email "<PrivateGPT account>" --password "<PrivateGPT Password>" ``` This API key can be used for OpenAI compatible Clients. Make sure you either enter it to the config under whitelist_keys (see 4.1 and 4.2) or whitelist_keys is empty (no check, but prone to errors) --- ## Utilisation - **Use libraries (like litellm, ollama, smolagents) or tools (like Msty) to use PrivateGPT with the OpenAI API interface:** Some example usages for external tools: - Usage in Msty: - To use the API in MSTY, add a remote server and add "<http://ip:port>" and your API key - Usage in Continue: - To use the API in Continue (Visual Studio/Pycharm Plugin) add this to your config: ```json { "model": "privategpt", "title": "PrivateGPT", "systemMessage": "You are an expert software developer. You give helpful and concise responses.", "apiKey": "<your-api-key>", "apiBase": "http://<ip:port>", "provider": "openai" } ``` - Usage with OpenAI Library: - See openai_test_client.py for an example. --- ## License This project is licensed under the MIT License - see the LICENSE file for details. ``` -------------------------------------------------------------------------------- /agents/ChatBotAgent/README.md: -------------------------------------------------------------------------------- ```markdown # PrivateGPT ChatBot Agent ## Overview The **PrivateGPT ChatBot Agent** is a crucial component of the Fujitsu PrivateGPT multi-agent system. It acts as a client that communicates with a private GPT server to respond to queries and provide information. This agent leverages both local knowledge databases and server-based responses, employing **FIPA ACL (Agent Communication Language)** to standardize communications within the system. --- ## Features - **Multi-Agent Communication via FIPA ACL:** - Handles structured messages with standardized fields such as `performative`, `sender`, `receiver`, `ontology`, and `content`. - Sends FIPA ACL failure messages if a connection to the MCP server cannot be established. - **Production WSGI Servers: Waitress & Gunicorn:** - Manages RESTful endpoints (e.g., `/ask`, `/logs`, `/status`) using Flask. - Uses Waitress for serving requests in Windows environments and Gunicorn for Unix-based systems, ensuring readiness for production environments. - Implements Cross-Origin Resource Sharing (CORS) to allow requests from any domain (`origins: "*"`) for broad compatibility. - **Authentication:** - All endpoints, except for `OPTIONS` and `/status`, require an API key sent via the `X-API-KEY` header. - **MCP Server Connectivity:** - Ensures connectivity to the MCP server (as defined in `config.json`) is validated before processing requests. - **Logging:** - Maintains detailed logs for both the agent operations (`agent.log`) and the Flask server (`flask.log`). ## Prerequisites - **Python:** Version 3.8 or higher - **Dependencies:** Install the required packages listed in the corresponding `requirements.txt` which includes Flask, waitress (for Windows), gunicorn (for Unix-based systems), flask-cors, paho-mqtt, paramiko, etc. --- ## Setup 1. **Clone the Repository:** ```bash git clone https://github.com/pgpt-dev/MCP-Server-for-MAS-Developments.git cd MCP-Server-for-MAS-Developments ``` 2. **(Optional) Create and Activate a Virtual Environment:** - **Windows:** ```bash python -m venv venv .\venv\Scripts\activate ``` - **Unix/MacOS:** ```bash python -m venv venv source venv/bin/activate ``` 3. **Install Dependencies:** ```bash pip install -r agents/ChatBotAgent/requirements.txt ``` 4. **Configure the Agent:** Copy the example configuration file and adjust it according to your environment: ```bash cp agents/ChatBotAgent/config.json.example agents/ChatBotAgent/config.json ``` **Example `config.json`:** ```json { "email": "<YOUR EMAIL>", "password": "<YOUR PASSWORD>", "api_ip": "0.0.0.0", "api_port": 5001, "api_key": "<YOUR_API_KEY>", "mcp_server": { "host": "172.24.123.123", "port": 5000 }, "language": "en", "groups": ["<Your Group>"] } ``` **Note:** All sensitive parameters, such as `email` and `password`, should be securely stored and managed. ## Running the Agent - **Using Waitress (Windows):** To start the ChatBot Agent, ensure you are in the repository's root directory and execute: ```bash python -m agents.ChatBotAgent.Python.chatbot_agent ``` - **Using Gunicorn (Unix-based systems):** To start the application using Gunicorn, run the following command: ```bash gunicorn -w 4 -b 0.0.0.0:5001 agents.ChatBotAgent.Python.chatbot_agent:app ``` This command launches the Flask API server using Gunicorn on the configured `api_ip` and `api_port` and uses multiple workers to handle requests efficiently. The `fcntl` package is needed to run this under Linux, use `pip` to install it. --- ## API Endpoints ### `/ask` (POST) - **Purpose:** Accepts questions for the ChatBot Agent. This endpoint supports both a **FIPA ACL** structured message and a legacy JSON format. - **Authentication:** Requires the `X-API-KEY` header with the correct API key. - **FIPA ACL Request Example:** ```json { "performative": "request", "sender": "IoT_MQTT_Agent", "receiver": "Chatbot_Agent", "ontology": "fujitsu-iot-ontology", "content": { "question": "What is the system status?", "usePublic": false, "groups": ["group1"], "language": "en" } } ``` - **Legacy JSON Request Example:** ```json { "question": "What is the system status?", "usePublic": false, "groups": ["group1"], "language": "en" } ``` - **Response:** Returns a JSON object containing the answer generated by the PrivateGPT server. If the MCP server connection fails, a FIPA ACL failure message is returned. ### `/logs` (GET) - **Purpose:** Provides access to the Flask server's log file (`flask.log`) for debugging and monitoring purposes. ### `/status` (GET) - **Purpose:** Outputs a simple JSON message confirming that the agent is operational. This endpoint does **not** require authentication. --- ## Multi-Agent Communication & FIPA ACL The ChatBot Agent utilizes **FIPA ACL** to structure its communications with other agents, ensuring reliable interactions within a multi-agent system. It provides standardized message fields for consistency and effective communication. --- ## Logging & Debugging - **Agent Logs:** Key events, errors, and status updates are logged in `agent.log`. - **Flask Logs:** Logs specific to the Flask server are stored in `flask.log`. These logs are critical for troubleshooting and provide insights into the agent's operation. --- ## Example Conversation ```plaintext 🎉 Welcome to the PrivateGPT ChatBot Agent. You: What is your name? Agent: I am the PrivateGPT ChatBot Agent. You: Provide system status. Agent: The system is running normally. ``` --- ``` -------------------------------------------------------------------------------- /agents/AgentMonitoring/README.md: -------------------------------------------------------------------------------- ```markdown # README ## Overview To monitor the three different **agents**, each providing Prometheus metrics so they can be monitored in **Prometheus** and visualized in **Grafana**: 1. **OpenAI-Compatible API Agent** - By default runs on **port 7777** and serves `/metrics`. 2. **Chatbot Agent** - Runs on **port 5001** (by default), and also exposes `/metrics` (or configurable via JSON). 3. **IoT MQTT Agent** - Runs on a **Prometheus port** specified in its JSON config (e.g., `9101`), providing `/metrics` via a custom WSGI server. ### Requirements - Install each agent’s dependencies (e.g., via `pip install -r requirements.txt`), including the **`prometheus_client`** library.hon 3.8+** is - You need **Prometheus** and **Grafana** set up to ingest and display these metrics. --- ## 1. OpenAI-Compatible API Agent - By default, runs on **port 7777**. - `/metrics` will be served at **`http://<host>:7777/metrics`**. ### How to Start Switch to the agent’s directory and start the agent as desribed in the agent's `README.md` You should see in the logs something like: ``` Starting API on http://0.0.0.0:7777 Starting Prometheus metrics server on port 7777... ``` ### Metrics - Typical metrics might include: - `request_count{method,endpoint}` - `request_latency_seconds{method,endpoint}` - `chat_completion_count` - `completion_count` - etc. **Note:** Search and select the metrics that suit you in the Grafana dashboard. --- ## 2. Chatbot Agent - Runs on **port 5001** by default. - Also serves Prometheus metrics under **`http://<host>:5001/metrics`** (or whichever port is in use). ### How to Start Switch to the agent’s directory and start the agent as desribed in the agent's `README.md` You’ll see logs like: ``` Starting API server on 0.0.0.0:5001 Starting Prometheus WSGI server on port 5001... ``` Then `/metrics` is accessible. ### Metrics - Common metrics: - `request_count` / `request_latency_seconds` - `agent_ask_count` - etc. **Note:** Search and select the metrics that suit you in the Grafana dashboard. --- ## 3. IoT MQTT Agent - Reads a **port** from its JSON config (`pgpt_iot_agent.json`), e.g.: ```json { "metrics": { "port": 9101 } ... } ``` - The agent starts a small WSGI server on `metrics.port` and exposes `/metrics`. ### How to Start Switch to the agent’s directory and start the agent as desribed in the agent's `README.md` Logs should show: ``` Starting Prometheus WSGI server on port 9101... ``` Hence `http://<host>:9101/metrics` gives the metrics. ### Metrics - For example: - `mqtt_message_count` (number of MQTT messages received) - `mqtt_message_latency_seconds` (histogram measuring processing latency) **Note:** Search and select the metrics that suit you in the Grafana dashboard. --- ## 4. Prometheus Configuration To let Prometheus scrape these metrics, add **targets** for all three agents in your `prometheus.yml`. For example: ```yaml global: scrape_interval: 15s evaluation_interval: 15s scrape_configs: # 1) OpenAI-Compatible API Agent - job_name: "openai_compatible_agent" scrape_interval: 5s static_configs: - targets: - "192.168.123.123:7777" # your openai compatible API agent ip and port # 2) Chatbot Agent - job_name: "chatbot_agent" scrape_interval: 5s static_configs: - targets: - "192.168.123.123:5001" # your chatbot ip and port # 3) IoT MQTT Agent - job_name: "iot_mqtt_agent" scrape_interval: 5s static_configs: - targets: - "192.168.123.123:9101" # your IoT agent ip and port ``` > Change **`192.168.123.123`** to your actual IP or hostname; use `localhost` (`127.0.0.1`) if everything is local. > And verify the ports: > - **`7777`** (OpenAI-Compatible) > - **`5001`** (Chatbot) > - **`9101`** (IoT) Once Prometheus is running (e.g., via Docker or binary), navigate to `http://<prometheus-host>:9090/targets` and confirm all three jobs appear and show **UP**:  --- ## 5. Grafana Dashboards This repo provides **Grafana Dashboard JSON** files for each agent. You can import them to visualize the metrics. ### A) OpenAI-Compatible API Agent Dashboard - File: `OpenAI compatible API - Agent Dashboard Example - Grafana.json` (example) - Contains panels such as: - *Request Count (rate)* - *Request Latency (p95)* - *Chat Completion Count* - and more. #### Import Procedure 1. In Grafana: **Dashboards** → **Import**. 2. Paste the JSON from `OpenAI compatible API - Agent Dashboard Example - Grafana.json`. 3. Select your **Prometheus** data source. 4. Click **Import**. ### B) Chatbot Agent Dashboard - File: `ChatBot-Agent Dashboard Example - Grafana.json`. - Shows metrics such as `agent_ask_count`, `request_latency_seconds`, etc. #### Import Steps 1. Go to Grafana → **Import**. 2. Paste the JSON content. 3. Select your Prometheus data source. 4. Save the dashboard. Example below:  ### C) IoT MQTT Agent Dashboard - File: `IoT-Agent Dashboard Example - Grafana.json`. - Example panels: - Rate of MQTT messages (`rate(mqtt_message_count[1m])`) - Total MQTT messages - Latencies (e.g., 95th percentile for `mqtt_message_latency_seconds_bucket`) #### Import Steps Identical approach: 1. **Dashboards** → **Import**. 2. Paste JSON from `IoT-Agent Dashboard Example - Grafana.json`. 3. Pick **Prometheus** as the data source. --- ## 6. Parameters to Adjust 1. **Agent Ports** - Update ports in the respective JSON configs or Python code to avoid port collisions. - Defaults: - **OpenAI-Compatible**: `7777` - **Chatbot**: `5001` - **IoT**: `9101` (via `metrics.port` in JSON) 2. **Prometheus `prometheus.yml`** - Change the **targets** to match your IP addresses/ports. - Adjust `scrape_interval` if needed (default is 15s). 3. **Grafana** - When importing each JSON, make sure to choose **the correct Prometheus data source** if you have multiple. - If panels show “No data,” double-check that Prometheus is indeed scraping the relevant metrics. --- ## 7. Troubleshooting - **“No data”** in Grafana: - Check Prometheus at `/targets` to see if the jobs are **UP**. - Check Prometheus’s expression browser for the metrics (e.g., `mqtt_message_count`). - **Port collisions**: - If `7777`, `5001`, `9101` are already in use, adjust them in code/JSON. - **Authentication errors**: - If the agent has an API key for `/metrics`, you may need to disable that or specifically allow `/metrics` to be unauthenticated. - **Docker environment**: - Ensure you map the correct ports (e.g., `-p 5001:5001`) and use the correct IP addresses. --- ## Conclusion With these three agents, you can gather both **LLM-related** (OpenAI-Compatible & Chatbot) and **IoT-related** (MQTT agent) metrics in **Prometheus**, then visualize everything in **Grafana** using the provided dashboards. Enjoy your fully monitored environment! ``` -------------------------------------------------------------------------------- /clients/Go/README.md: -------------------------------------------------------------------------------- ```markdown # MCP Client Examples (Go) This repository contains examples for interacting with the MCP server using **Go**. Each console application demonstrates a specific operation and its corresponding server interaction. ## Main Menu Choose an operation from the list below. Each example demonstrates a specific server interaction. ### 1. Authentication [1.1 Login User](#10-mcploginclient) [1.2 Logout User](#12-mcplogoutclient) ### 2. Chat Operations [2.1 Start a New Chat](#20-mcpchatclient) [2.2 Continue a Chat Session](#21-mcpcontinuechatclient) [2.3 Retrieve Chat Info](#22-mcpgetchatinfoClient) ### 3. Source Management [3.1 Create a New Source](#30-mcpcreatesourceclient) [3.2 Retrieve Source Details](#31-mcpgetsourceclient) [3.3 List All Sources in a Group](#32-mcplistsourcesclient) [3.4 Edit an Existing Source](#33-mcpeditsourceclient) [3.5 Delete a Source](#34-mcpdeletesourceclient) ### 4. Group Management [4.1 List All Groups](#40-mcplistgroupsclient) [4.2 Create/Update a Group](#41-mcpstoregroupclient) [4.3 Delete a Group](#42-mcpdeletegroupclient) ### 5. User Management [5.1 Create/Update a User](#50-mcpstoreuserclient) [5.2 Edit User Details](#51-mcpedituserclient) [5.3 Delete a User](#52-mcpdeleteuserclient) --- ### 1.0 MCPLoginClient - **Purpose**: Handles user authentication by sending login requests to the MCP server. - **Main Features**: - Sends a `login` command to the server with user credentials. - Handles JSON-based requests and parses the server's response. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--email`: User email for authentication. - `--password`: User password for authentication. - **Usage Example**: ```bash MCPLoginClient.exe --server-ip 127.0.0.1 --server-port 1234 --email [email protected] --password secret ``` ### 1.2 MCPLogoutClient - **Purpose**: Logs out an authenticated user by invalidating their session token. - **Main Features**: - Sends a `logout` command to the server. - Invalidates the token provided in the request. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token to be invalidated. - **Usage Example**: ```bash MCPLogoutClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken ``` --- ### 2.0 MCPChatClient - **Purpose**: Initiates a new chat session with the MCP server. - **Main Features**: - Sends a `chat` command to the server with a question. - Supports optional parameters for public chats, groups, and language. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--question`: Initial question for the chat session. - `--use-public`: Optional flag for public chat. - `--groups`: Optional group list. - `--language`: Optional language parameter. - **Usage Example**: ```bash MCPChatClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --question "Hello World" --use-public --groups "devops,hr" --language en ``` ### 2.1 MCPContinueChatClient - **Purpose**: Continues an existing chat session by sending follow-up messages. - **Main Features**: - Sends a `continue_chat` command to the server. - Provides the conversation ID and follow-up message. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--conversation-id`: ID of the conversation to continue. - `--message`: Follow-up message. - **Usage Example**: ```bash MCPContinueChatClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --conversation-id 12345 --message "Can you provide an update?" ``` ### 2.2 MCPGetChatInfoClient - **Purpose**: Retrieves metadata and status information about an existing chat session. - **Main Features**: - Sends a `get_chat_info` command to the server. - Extracts and displays information about the chat session. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--chat-id`: ID of the chat session to retrieve information for. - **Usage Example**: ```bash MCPGetChatInfoClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --chat-id 6789 ``` --- ### 3.0 MCPCreateSourceClient - **Purpose**: Creates a new source on the MCP server and associates it with specified groups. - **Main Features**: - Sends a `create_source` command with details such as name, content, and associated groups. - Provides robust error handling for missing arguments and server communication issues. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the session. - `--name`: Name of the source to create. - `--content`: Content of the source in plain text or markdown. - `--groups`: (Optional) List of groups to associate with the source. - **Usage Example**: ```bash MCPCreateSourceClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --name "Sample Source" --content "This is a test content" --groups devops hr ``` --- ### 3.1 MCPGetSourceClient - **Purpose**: Fetches detailed information about a specific source from the MCP server. - **Main Features**: - Sends a `get_source` command to the server with the source ID as a parameter. - Retrieves and displays the source's metadata and contents. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the server. - `--source-id`: Unique ID of the source to retrieve. - **Usage Example**: ```bash MCPGetSourceClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --source-id 12345 ``` ### 3.2 MCPListSourcesClient - **Purpose**: Lists all sources belonging to a specified group on the MCP server. - **Main Features**: - Sends a `list_sources` command with the group name as a parameter. - Displays a list of sources available in the specified group. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the server. - `--group-name`: Name of the group for which to list sources. - **Usage Example**: ```bash MCPListSourcesClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --group-name devops ``` ### 3.3 MCPEditSourceClient - **Purpose**: Edits the details of an existing source on the MCP server. - **Main Features**: - Sends an `edit_source` command with optional updates for the source title, content, and group associations. - Supports adding or updating multiple groups for the source. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the server. - `--source-id`: ID of the source to edit. - `--title`: (Optional) New title for the source. - `--content`: (Optional) New content for the source. - `--groups`: (Optional) List of groups to associate with the source. - **Usage Example**: ```bash MCPEditSourceClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --source-id 12345 --title "Updated Title" --content "Updated content for the source." --groups devops finance ``` ### 3.4 MCPDeleteSourceClient - **Purpose**: Deletes a specific source from the MCP server. - **Main Features**: - Sends a `delete_source` command to remove the source identified by its ID. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the server. - `--source-id`: ID of the source to delete. - **Usage Example**: ```bash MCPDeleteSourceClient.exe --server-ip 127.0.0.1 --server-port 1234 -token MyToken --source-id 12345 ``` --- ### 4.0 MCPListGroupsClient - **Purpose**: Lists all the groups available on the MCP server. - **Main Features**: - Sends a `list_groups` command to retrieve the available groups. - Outputs the groups in JSON format. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the session. - **Usage Example**: ```bash MCPListGroupsClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken ``` ### 4.1 MCPStoreGroupClient - **Purpose**: - Creates or updates a group on the MCP server. - **Main Features**: - Sends a `store_group` command with the group's name and description. - Allows creation of new groups or modification of existing ones. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the session. - `--group-name`: Name of the group to create or update. - `--description`: (Optional) Description of the group. - **Usage Example**: ```bash MCPStoreGroupClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --group-name "Team DevOps" --description "Group for development and operations" ``` ### 4.2 MCPDeleteGroupClient - **Purpose**: - Deletes a specified group from the MCP server. - **Main Features**: - Sends a `delete_group` command with the group name. - Ensures the group is removed from the server. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the session. - `--group-name`: Name of the group to delete. - **Usage Example**: ```bash MCPDeleteGroupClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --group-name "Team DevOps" ``` --- ### 5.0 MCPStoreUserClient - **Purpose:** Creates or updates user details on the MCP server. - **Main Features:** - Sends a `store_user` command with comprehensive user details. - Allows specification of default values for language and timezone if not provided. - **Key Arguments:** - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--name`: Name of the user. - `--email`: Email address of the user. - `--password`: Password for the user account. - `--language` (Optional): User's preferred language (default: "en"). - `--timezone` (Optional): User's timezone (default: "Europe/Berlin"). - `--roles` (Optional): Roles assigned to the user. - `--groups` (Optional): Groups the user belongs to. - `--usePublic` (Optional): Flag to set the user as public. - `--activateFtp` (Optional): Flag to activate FTP access. - `--ftpPassword` (Optional): Password for FTP access. **Usage Example:** ```bash MCPStoreUserClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --name John --email [email protected] --password secret --language en --roles admin manager --groups devops finance --usePublic --activateFtp --ftpPassword ftpPass123 ``` ### 5.1 MCPEditUserClient - **Purpose:** Modifies the details of an existing user on the MCP server. - **Main Features:** - Sends an `edit_user` command with the specified user details. - Supports conditional sending of fields to avoid unnecessary data transmission. - **Key Arguments:** - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--user-id`: ID of the user to modify. - `--name` (Optional): New name of the user. - `--email` (Optional): New email for the user. - `--password` (Optional): New password for the user. - `--language` (Optional): New language for the user. - `--timezone` (Optional): New timezone for the user. - `--roles` (Optional): New roles for the user. - `--groups` (Optional): New groups for the user. - `--usePublic` (Optional): Flag to set the user as public. - `--activateFtp` (Optional): Flag to activate FTP for the user. - `--ftpPassword` (Optional): New password for FTP access. - **Usage Example:** ```bash MCPEditUserClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --user-id 12345 --name Jane --roles manager devops --groups hr devops ``` ### 5.2 MCPDeleteUserClient - **Purpose:** Deletes a user from the MCP server. - **Main Features:** - Sends a `delete_user` command using the user's email as an identifier. - **Key Arguments:** - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--email`: Email address of the user to delete. - `--token`: Authentication token. - **Usage Example:** ```bash MCPDeleteUserClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --email [email protected] ``` --- ## General Notes **JSON Communication:** - Each file constructs and sends JSON payloads specific to its functionality. - Responses from the server are parsed and displayed in JSON format. **Socket Communication:** - The files use Go's Socket class for establishing TCP connections with the MCP server. **Error Handling:** - The scripts handle missing or invalid arguments gracefully, printing clear usage instructions where necessary. **Examples:** - Replace placeholders (e.g., `<SERVER_IP>`, `<TOKEN>`) with actual values relevant to your environment. ## Prerequisites and Dependencies: 1. **Go Compiler**: Those agents have been build using Go. ## Build Each Go console application is designed to perform a specific operation. Below are the details for compiling an example application, in this case MCPKeygenClient: ```bash go build .\MCPKeygenClient.go ``` ## Error Handling Both clients include error handling for: - Missing or invalid parameters. - Server connection issues. - Unexpected server responses. ## Future Enhancements - Add support for SSL/TLS encryption for secure communication. - Implement a configuration file to simplify the command-line parameters. - Enhance error reporting with detailed server-side error codes. ## License This project is licensed under the MIT License - see the LICENSE file for details. This repository and/or code is provided "as is" without warranty of any kind, and use is at your own risk. ``` -------------------------------------------------------------------------------- /clients/C# .Net/README.md: -------------------------------------------------------------------------------- ```markdown # MCP Client Examples (C# .Net) This repository contains examples for interacting with the MCP server using **C# .Net**. Each console application demonstrates a specific operation and its corresponding server interaction. ### 1. Authentication [1.1 Login User](#10-mcploginclient) [1.2 Logout User](#12-mcplogoutclient) ### 2. Chat Operations [2.1 Start a New Chat](#20-mcpchatclient) [2.2 Continue a Chat Session](#21-mcpcontinuechatclient) [2.3 Retrieve Chat Info](#22-mcpgetchatinfoClient) ### 3. Source Management [3.1 Create a New Source](#30-mcpcreatesourceclient) [3.2 Retrieve Source Details](#31-mcpgetsourceclient) [3.3 List All Sources in a Group](#32-mcplistsourcesclient) [3.4 Edit an Existing Source](#33-mcpeditsourceclient) [3.5 Delete a Source](#34-mcpdeletesourceclient) ### 4. Group Management [4.1 List All Groups](#40-mcplistgroupsclient) [4.2 Create/Update a Group](#41-mcpstoregroupclient) [4.3 Delete a Group](#42-mcpdeletegroupclient) ### 5. User Management [5.1 Create/Update a User](#50-mcpstoreuserclient) [5.2 Edit User Details](#51-mcpedituserclient) [5.3 Delete a User](#52-mcpdeleteuserclient) --- ### 1.0 MCPLoginClient - **Purpose**: Handles user authentication by sending login requests to the MCP server. - **Main Features**: - Sends a `login` command to the server with user credentials. - Handles JSON-based requests and parses the server's response. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--email`: User email for authentication. - `--password`: User password for authentication. - **Usage Example**: ```bash dotnet run -- --server-ip 127.0.0.1 --server-port 1234 --email [email protected] --password secret ``` ### 1.2 MCPLogoutClient - **Purpose**: Logs out an authenticated user by invalidating their session token. - **Main Features**: - Sends a `logout` command to the server. - Invalidates the token provided in the request. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token to be invalidated. - **Usage Example**: ```bash dotnet run -- --server-ip 127.0.0.1 --server-port 1234 --token MyToken ``` --- ### 2.0 MCPChatClient - **Purpose**: Initiates a new chat session with the MCP server. - **Main Features**: - Sends a `chat` command to the server with a question. - Supports optional parameters for public chats, groups, and language. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--question`: Initial question for the chat session. - `--use-public`: Optional flag for public chat. - `--groups`: Optional group list. - `--language`: Optional language parameter. - **Usage Example**: ```bash dotnet run -- --server-ip 127.0.0.1 --server-port 1234 --token MyToken --question "Hello World" --use-public --groups "devops,hr" --language en ``` ### 2.1 MCPContinueChatClient - **Purpose**: Continues an existing chat session by sending follow-up messages. - **Main Features**: - Sends a `continue_chat` command to the server. - Provides the conversation ID and follow-up message. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--conversation-id`: ID of the conversation to continue. - `--message`: Follow-up message. - **Usage Example**: ```bash dotnet run -- --server-ip 127.0.0.1 --server-port 1234 --token MyToken --conversation-id 12345 --message "Can you provide an update?" ``` ### 2.2 MCPGetChatInfo - **Purpose**: Retrieves metadata and status information about an existing chat session. - **Main Features**: - Sends a `get_chat_info` command to the server. - Extracts and displays information about the chat session. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--chat-id`: ID of the chat session to retrieve information for. - **Usage Example**: ```bash dotnet run -- --server-ip 127.0.0.1 --server-port 1234 --token MyToken --chat-id 6789 ``` --- ### 3.0 MCPCreateSourceClient - **Purpose**: Creates a new source on the MCP server and associates it with specified groups. - **Main Features**: - Sends a `create_source` command with details such as name, content, and associated groups. - Provides robust error handling for missing arguments and server communication issues. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the session. - `--name`: Name of the source to create. - `--content`: Content of the source in plain text or markdown. - `--groups`: (Optional) List of groups to associate with the source. - **Usage Example**: ```bash dotnet run -- --server-ip 127.0.0.1 --server-port 1234 --token MyToken --name "Sample Source" --content "This is a test content" --groups devops hr ``` --- ### 3.1 MCPGetSourceClient - **Purpose**: Fetches detailed information about a specific source from the MCP server. - **Main Features**: - Sends a `get_source` command to the server with the source ID as a parameter. - Retrieves and displays the source's metadata and contents. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the server. - `--source-id`: Unique ID of the source to retrieve. - **Usage Example**: ```bash dotnet run -- --server-ip 127.0.0.1 --server-port 1234 --token MyToken --source-id 12345 ``` ### 3.2 MCPListSourcesClient - **Purpose**: Lists all sources belonging to a specified group on the MCP server. - **Main Features**: - Sends a `list_sources` command with the group name as a parameter. - Displays a list of sources available in the specified group. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the server. - `--group-name`: Name of the group for which to list sources. - **Usage Example**: ```bash dotnet run -- --server-ip 127.0.0.1 --server-port 1234 --token MyToken --group-name devops ``` ### 3.3 MCPEditSourceClient - **Purpose**: Edits the details of an existing source on the MCP server. - **Main Features**: - Sends an `edit_source` command with optional updates for the source title, content, and group associations. - Supports adding or updating multiple groups for the source. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the server. - `--source-id`: ID of the source to edit. - `--title`: (Optional) New title for the source. - `--content`: (Optional) New content for the source. - `--groups`: (Optional) List of groups to associate with the source. - **Usage Example**: ```bash dotnet run -- --server-ip 127.0.0.1 --server-port 1234 --token MyToken --source-id 12345 --title "Updated Title" --content "Updated content for the source." --groups devops finance ``` ### 3.4 MCPDeleteSourceClient - **Purpose**: Deletes a specific source from the MCP server. - **Main Features**: - Sends a `delete_source` command to remove the source identified by its ID. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the server. - `--source-id`: ID of the source to delete. - **Usage Example**: ```bash dotnet run -- --server-ip 127.0.0.1 --server-port 1234 -token MyToken --source-id 12345 ``` --- ### 4.0 MCPListGroupsClient - **Purpose**: Lists all the groups available on the MCP server. - **Main Features**: - Sends a `list_groups` command to retrieve the available groups. - Outputs the groups in JSON format. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the session. - **Usage Example**: ```bash dotnet run -- --server-ip 127.0.0.1 --server-port 1234 --token MyToken ``` ### 4.1 MCPStoreGroupClient - **Purpose**: - Creates or updates a group on the MCP server. - **Main Features**: - Sends a `store_group` command with the group's name and description. - Allows creation of new groups or modification of existing ones. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the session. - `--group-name`: Name of the group to create or update. - `--description`: (Optional) Description of the group. - **Usage Example**: ```bash dotnet run -- --server-ip 127.0.0.1 --server-port 1234 --token MyToken --group-name "Team DevOps" --description "Group for development and operations" ``` ### 4.2 MCPDeleteGroupClient - **Purpose**: - Deletes a specified group from the MCP server. - **Main Features**: - Sends a `delete_group` command with the group name. - Ensures the group is removed from the server. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the session. - `--group-name`: Name of the group to delete. - **Usage Example**: ```bash dotnet run -- --server-ip 127.0.0.1 --server-port 1234 --token MyToken --group-name "Team DevOps" ``` --- ### 5.0 MCPStoreUserClient - **Purpose:** Creates or updates user details on the MCP server. - **Main Features:** - Sends a `store_user` command with comprehensive user details. - Allows specification of default values for language and timezone if not provided. - **Key Arguments:** - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--name`: Name of the user. - `--email`: Email address of the user. - `--password`: Password for the user account. - `--language` (Optional): User's preferred language (default: "en"). - `--timezone` (Optional): User's timezone (default: "Europe/Berlin"). - `--roles` (Optional): Roles assigned to the user. - `--groups` (Optional): Groups the user belongs to. - `--usePublic` (Optional): Flag to set the user as public. - `--activateFtp` (Optional): Flag to activate FTP access. - `--ftpPassword` (Optional): Password for FTP access. **Usage Example:** ```bash dotnet run -- --server-ip 127.0.0.1 --server-port 1234 --token MyToken --name John --email [email protected] --password secret --language en --roles admin manager --groups devops finance --usePublic --activateFtp --ftpPassword ftpPass123 ``` ### 5.1 MCPEditUserClient - **Purpose:** Modifies the details of an existing user on the MCP server. - **Main Features:** - Sends an `edit_user` command with the specified user details. - Supports conditional sending of fields to avoid unnecessary data transmission. - **Key Arguments:** - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--user-id`: ID of the user to modify. - `--name` (Optional): New name of the user. - `--email` (Optional): New email for the user. - `--password` (Optional): New password for the user. - `--language` (Optional): New language for the user. - `--timezone` (Optional): New timezone for the user. - `--roles` (Optional): New roles for the user. - `--groups` (Optional): New groups for the user. - `--usePublic` (Optional): Flag to set the user as public. - `--activateFtp` (Optional): Flag to activate FTP for the user. - `--ftpPassword` (Optional): New password for FTP access. - **Usage Example:** ```bash dotnet run -- --server-ip 127.0.0.1 --server-port 1234 --token MyToken --user-id 12345 --name Jane --roles manager devops --groups hr devops ``` ### 5.2 MCPDeleteUserClient - **Purpose:** Deletes a user from the MCP server. - **Main Features:** - Sends a `delete_user` command using the user's email as an identifier. - **Key Arguments:** - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--email`: Email address of the user to delete. - `--token`: Authentication token. - **Usage Example:** ```bash dotnet run -- --server-ip 127.0.0.1 --server-port 1234 --token MyToken --email [email protected] ``` --- ## General Notes **JSON Communication:** - Each file constructs and sends JSON payloads specific to its functionality. - Responses from the server are parsed and displayed in JSON format. **Socket Communication:** - The files use C# .Net's Socket class for establishing TCP connections with the MCP server. **Error Handling:** - The scripts handle missing or invalid arguments gracefully, printing clear usage instructions where necessary. **Examples:** - Replace placeholders (e.g., `<SERVER_IP>`, `<TOKEN>`) with actual values relevant to your environment. ## Prerequisites and Dependencies: 1. **.NET SDK**: Ensure you have the .NET SDK installed. Download it from [dotnet.microsoft.com](https://dotnet.microsoft.com/). 2. **Newtonsoft.Json**: The examples use the `Newtonsoft.Json` library for JSON serialization/deserialization. Install it using: ```bash dotnet add package Newtonsoft.Json ``` ## Build and Run Each .NET C# console application is designed to perform a specific operation. Below are the details for compiling and running each application: ```bash dotnet build dotnet run -- <APPLICATION with PARAMETERS> ``` ## Error Handling Both clients include error handling for: - Missing or invalid parameters. - Server connection issues. - Unexpected server responses. ## Future Enhancements - Add support for SSL/TLS encryption for secure communication. - Implement a configuration file to simplify the command-line parameters. - Enhance error reporting with detailed server-side error codes. ## License This project is licensed under the MIT License - see the LICENSE file for details. This repository and/or code is provided "as is" without warranty of any kind, and use is at your own risk. ``` -------------------------------------------------------------------------------- /clients/C++/README.md: -------------------------------------------------------------------------------- ```markdown # MCP Client Examples (C++) This repository contains examples for interacting with the MCP server using **C++**. Each console application demonstrates a specific operation and its corresponding server interaction. ## Main Menu Choose an operation from the list below. Each example demonstrates a specific server interaction. ### 1. Authentication [1.1 Login User](#10-mcploginclient) [1.2 Logout User](#12-mcplogoutclient) ### 2. Chat Operations [2.1 Start a New Chat](#20-mcpchatclient) [2.2 Continue a Chat Session](#21-mcpcontinuechatclient) [2.3 Retrieve Chat Info](#22-mcpgetchatinfoClient) ### 3. Source Management [3.1 Create a New Source](#30-mcpcreatesourceclient) [3.2 Retrieve Source Details](#31-mcpgetsourceclient) [3.3 List All Sources in a Group](#32-mcplistsourcesclient) [3.4 Edit an Existing Source](#33-mcpeditsourceclient) [3.5 Delete a Source](#34-mcpdeletesourceclient) ### 4. Group Management [4.1 List All Groups](#40-mcplistgroupsclient) [4.2 Create/Update a Group](#41-mcpstoregroupclient) [4.3 Delete a Group](#42-mcpdeletegroupclient) ### 5. User Management [5.1 Create/Update a User](#50-mcpstoreuserclient) [5.2 Edit User Details](#51-mcpedituserclient) [5.3 Delete a User](#52-mcpdeleteuserclient) --- ### 1.0 MCPLoginClient - **Purpose**: Handles user authentication by sending login requests to the MCP server. - **Main Features**: - Sends a `login` command to the server with user credentials. - Handles JSON-based requests and parses the server's response. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--email`: User email for authentication. - `--password`: User password for authentication. - **Usage Example**: ```bash MCPLoginClient.exe --server-ip 127.0.0.1 --server-port 1234 --email [email protected] --password secret ``` ### 1.2 MCPLogoutClient - **Purpose**: Logs out an authenticated user by invalidating their session token. - **Main Features**: - Sends a `logout` command to the server. - Invalidates the token provided in the request. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token to be invalidated. - **Usage Example**: ```bash MCPLogoutClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken ``` --- ### 2.0 MCPChatClient - **Purpose**: Initiates a new chat session with the MCP server. - **Main Features**: - Sends a `chat` command to the server with a question. - Supports optional parameters for public chats, groups, and language. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--question`: Initial question for the chat session. - `--use-public`: Optional flag for public chat. - `--groups`: Optional group list. - `--language`: Optional language parameter. - **Usage Example**: ```bash MCPChatClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --question "Hello World" --use-public --groups "devops,hr" --language en ``` ### 2.1 MCPContinueChatClient - **Purpose**: Continues an existing chat session by sending follow-up messages. - **Main Features**: - Sends a `continue_chat` command to the server. - Provides the conversation ID and follow-up message. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--conversation-id`: ID of the conversation to continue. - `--message`: Follow-up message. - **Usage Example**: ```bash MCPContinueChatClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --conversation-id 12345 --message "Can you provide an update?" ``` ### 2.2 MCPGetChatInfoClient - **Purpose**: Retrieves metadata and status information about an existing chat session. - **Main Features**: - Sends a `get_chat_info` command to the server. - Extracts and displays information about the chat session. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--chat-id`: ID of the chat session to retrieve information for. - **Usage Example**: ```bash MCPGetChatInfoClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --chat-id 6789 ``` --- ### 3.0 MCPCreateSourceClient - **Purpose**: Creates a new source on the MCP server and associates it with specified groups. - **Main Features**: - Sends a `create_source` command with details such as name, content, and associated groups. - Provides robust error handling for missing arguments and server communication issues. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the session. - `--name`: Name of the source to create. - `--content`: Content of the source in plain text or markdown. - `--groups`: (Optional) List of groups to associate with the source. - **Usage Example**: ```bash MCPCreateSourceClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --name "Sample Source" --content "This is a test content" --groups devops hr ``` --- ### 3.1 MCPGetSourceClient - **Purpose**: Fetches detailed information about a specific source from the MCP server. - **Main Features**: - Sends a `get_source` command to the server with the source ID as a parameter. - Retrieves and displays the source's metadata and contents. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the server. - `--source-id`: Unique ID of the source to retrieve. - **Usage Example**: ```bash MCPGetSourceClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --source-id 12345 ``` ### 3.2 MCPListSourcesClient - **Purpose**: Lists all sources belonging to a specified group on the MCP server. - **Main Features**: - Sends a `list_sources` command with the group name as a parameter. - Displays a list of sources available in the specified group. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the server. - `--group-name`: Name of the group for which to list sources. - **Usage Example**: ```bash MCPListSourcesClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --group-name devops ``` ### 3.3 MCPEditSourceClient - **Purpose**: Edits the details of an existing source on the MCP server. - **Main Features**: - Sends an `edit_source` command with optional updates for the source title, content, and group associations. - Supports adding or updating multiple groups for the source. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the server. - `--source-id`: ID of the source to edit. - `--title`: (Optional) New title for the source. - `--content`: (Optional) New content for the source. - `--groups`: (Optional) List of groups to associate with the source. - **Usage Example**: ```bash MCPEditSourceClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --source-id 12345 --title "Updated Title" --content "Updated content for the source." --groups devops finance ``` ### 3.4 MCPDeleteSourceClient - **Purpose**: Deletes a specific source from the MCP server. - **Main Features**: - Sends a `delete_source` command to remove the source identified by its ID. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the server. - `--source-id`: ID of the source to delete. - **Usage Example**: ```bash MCPDeleteSourceClient.exe --server-ip 127.0.0.1 --server-port 1234 -token MyToken --source-id 12345 ``` --- ### 4.0 MCPListGroupsClient - **Purpose**: Lists all the groups available on the MCP server. - **Main Features**: - Sends a `list_groups` command to retrieve the available groups. - Outputs the groups in JSON format. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the session. - **Usage Example**: ```bash MCPListGroupsClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken ``` ### 4.1 MCPStoreGroupClient - **Purpose**: - Creates or updates a group on the MCP server. - **Main Features**: - Sends a `store_group` command with the group's name and description. - Allows creation of new groups or modification of existing ones. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the session. - `--group-name`: Name of the group to create or update. - `--description`: (Optional) Description of the group. - **Usage Example**: ```bash MCPStoreGroupClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --group-name "Team DevOps" --description "Group for development and operations" ``` ### 4.2 MCPDeleteGroupClient - **Purpose**: - Deletes a specified group from the MCP server. - **Main Features**: - Sends a `delete_group` command with the group name. - Ensures the group is removed from the server. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the session. - `--group-name`: Name of the group to delete. - **Usage Example**: ```bash MCPDeleteGroupClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --group-name "Team DevOps" ``` --- ### 5.0 MCPStoreUserClient - **Purpose:** Creates or updates user details on the MCP server. - **Main Features:** - Sends a `store_user` command with comprehensive user details. - Allows specification of default values for language and timezone if not provided. - **Key Arguments:** - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--name`: Name of the user. - `--email`: Email address of the user. - `--password`: Password for the user account. - `--language` (Optional): User's preferred language (default: "en"). - `--timezone` (Optional): User's timezone (default: "Europe/Berlin"). - `--roles` (Optional): Roles assigned to the user. - `--groups` (Optional): Groups the user belongs to. - `--usePublic` (Optional): Flag to set the user as public. - `--activateFtp` (Optional): Flag to activate FTP access. - `--ftpPassword` (Optional): Password for FTP access. **Usage Example:** ```bash MCPStoreUserClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --name John --email [email protected] --password secret --language en --roles admin manager --groups devops finance --usePublic --activateFtp --ftpPassword ftpPass123 ``` ### 5.1 MCPEditUserClient - **Purpose:** Modifies the details of an existing user on the MCP server. - **Main Features:** - Sends an `edit_user` command with the specified user details. - Supports conditional sending of fields to avoid unnecessary data transmission. - **Key Arguments:** - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--user-id`: ID of the user to modify. - `--name` (Optional): New name of the user. - `--email` (Optional): New email for the user. - `--password` (Optional): New password for the user. - `--language` (Optional): New language for the user. - `--timezone` (Optional): New timezone for the user. - `--roles` (Optional): New roles for the user. - `--groups` (Optional): New groups for the user. - `--usePublic` (Optional): Flag to set the user as public. - `--activateFtp` (Optional): Flag to activate FTP for the user. - `--ftpPassword` (Optional): New password for FTP access. - **Usage Example:** ```bash MCPEditUserClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --user-id 12345 --name Jane --roles manager devops --groups hr devops ``` ### 5.2 MCPDeleteUserClient - **Purpose:** Deletes a user from the MCP server. - **Main Features:** - Sends a `delete_user` command using the user's email as an identifier. - **Key Arguments:** - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--email`: Email address of the user to delete. - `--token`: Authentication token. - **Usage Example:** ```bash MCPDeleteUserClient.exe --server-ip 127.0.0.1 --server-port 1234 --token MyToken --email [email protected] ``` --- ## General Notes **JSON Communication:** - Each file constructs and sends JSON payloads specific to its functionality. - Responses from the server are parsed and displayed in JSON format. **Socket Communication:** - The files use C++'s Socket class for establishing TCP connections with the MCP server. **Error Handling:** - The scripts handle missing or invalid arguments gracefully, printing clear usage instructions where necessary. **Examples:** - Replace placeholders (e.g., `<SERVER_IP>`, `<TOKEN>`) with actual values relevant to your environment. ## Prerequisites and Dependencies: 1. **C-Compiler**: Those agents have been build using g++. 2. **JsonCpp **: The examples use the `JsonCpp ` library for JSON serialization/deserialization. ## Build Each C++ console application is designed to perform a specific operation. Below are the details for compiling an example application, in this case MCPKeygenClient: ```bash g++ -std=c++17 -o .\MCPKeygenClient .\MCPKeygenClient.cpp -I"C:\msys64\mingw64\include" -L"C:\msys64\mingw64\lib" -ljsoncpp -lws2_32 ``` ## Error Handling Both clients include error handling for: - Missing or invalid parameters. - Server connection issues. - Unexpected server responses. ## Future Enhancements - Add support for SSL/TLS encryption for secure communication. - Implement a configuration file to simplify the command-line parameters. - Enhance error reporting with detailed server-side error codes. ## License This project is licensed under the MIT License - see the LICENSE file for details. This repository and/or code is provided "as is" without warranty of any kind, and use is at your own risk. ``` -------------------------------------------------------------------------------- /clients/PHP/README.md: -------------------------------------------------------------------------------- ```markdown # MCP Agent Examples (PHP) This repository contains examples for interacting with the MCP server using **PHP**. Each console application demonstrates a specific operation and its corresponding server interaction. ## Main Menu Choose an operation from the list below. Each example demonstrates a specific server interaction. ### 1. Authentication [1.1 Login User](#10-mcploginclient) [1.2 Logout User](#12-mcplogoutclient) ### 2. Chat Operations [2.1 Start a New Chat](#20-mcpchatclient) [2.2 Continue a Chat Session](#21-mcpcontinuechatclient) [2.3 Retrieve Chat Info](#22-mcpgetchatinfoclient) ### 3. Source Management [3.1 Create a New Source](#30-mcpcreatesourceclient) [3.2 Retrieve Source Details](#31-mcpgetsourceclient) [3.3 List All Sources in a Group](#32-mcplistsourcesclient) [3.4 Edit an Existing Source](#33-mcpeditsourceclient) [3.5 Delete a Source](#34-mcpdeletesourceclient) ### 4. Group Management [4.1 List All Groups](#40-mcplistgroupsclient) [4.2 Create/Update a Group](#41-mcpstoregroupclient) [4.3 Delete a Group](#42-mcpdeletegroupclient) ### 5. User Management [5.1 Create/Update a User](#50-mcpstoreuserclient) [5.2 Edit User Details](#51-mcpedituserclient) [5.3 Delete a User](#52-mcpdeleteuserclient) --- ### 1.0 MCPLoginClient - **Purpose**: Handles user authentication by sending login requests to the MCP server. - **Main Features**: - Sends a `login` command to the server with user credentials. - Handles JSON-based requests and parses the server's response. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--email`: User email for authentication. - `--password`: User password for authentication. - **Usage Example**: ```bash php MCPLoginClient.php ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --email [email protected] ^ --password secret ``` ### 1.2 MCPLogoutClient - **Purpose**: Logs out an authenticated user by invalidating their session token. - **Main Features**: - Sends a `logout` command to the server. - Invalidates the token provided in the request. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token to be invalidated. - **Usage Example**: ```bash php MCPLogoutClient.php ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ``` --- ### 2.0 MCPChatClient - **Purpose**: Initiates a new chat session with the MCP server. - **Main Features**: - Sends a `chat` command to the server with a question. - Supports optional parameters for public chats, groups, and language. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--question`: Initial question for the chat session. - `--use-public`: Optional flag for public chat. - `--groups`: Optional group list. - `--language`: Optional language parameter. - **Usage Example**: ```bash php MCPChatClient.php ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --question "Hello World" ^ --use-public ^ --groups "devops,hr" ^ --language en ``` ### 2.1 MCPContinueChatClient - **Purpose**: Continues an existing chat session by sending follow-up messages. - **Main Features**: - Sends a `continue_chat` command to the server. - Provides the conversation ID and follow-up message. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--conversation-id`: ID of the conversation to continue. - `--message`: Follow-up message. - **Usage Example**: ```bash php MCPContinueChatClient.php ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --conversation-id 12345 ^ --message "Can you provide an update?" ``` ### 2.2 MCPGetChatInfoClient - **Purpose**: Retrieves metadata and status information about an existing chat session. - **Main Features**: - Sends a `get_chat_info` command to the server. - Extracts and displays information about the chat session. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--chat-id`: ID of the chat session to retrieve information for. - **Usage Example**: ```bash php MCPGetChatInfo.php ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --chat-id 6789 ``` --- ### 3.0 MCPCreateSourceClient - **Purpose**: Creates a new source on the MCP server and associates it with specified groups. - **Main Features**: - Sends a `create_source` command with details such as name, content, and associated groups. - Provides robust error handling for missing arguments and server communication issues. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the session. - `--name`: Name of the source to create. - `--content`: Content of the source in plain text or markdown. - `--groups`: (Optional) List of groups to associate with the source. - **Usage Example**: ```bash php MCPCreateSourceClient.php ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --name "Sample Source" ^ --content "This is a test content" ^ --groups devops hr ``` --- ### 3.1 MCPGetSourceClient - **Purpose**: Fetches detailed information about a specific source from the MCP server. - **Main Features**: - Sends a `get_source` command to the server with the source ID as a parameter. - Retrieves and displays the source's metadata and contents. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the server. - `--source-id`: Unique ID of the source to retrieve. - **Usage Example**: ```bash php MCPGetSourceClient.php ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --source-id 12345 ``` ### 3.2 MCPListSourcesClient - **Purpose**: Lists all sources belonging to a specified group on the MCP server. - **Main Features**: - Sends a `list_sources` command with the group name as a parameter. - Displays a list of sources available in the specified group. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the server. - `--group-name`: Name of the group for which to list sources. - **Usage Example**: ```bash php MCPListSourcesClient.php ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --group-name devops ``` ### 3.3 MCPEditSourceClient - **Purpose**: Edits the details of an existing source on the MCP server. - **Main Features**: - Sends an `edit_source` command with optional updates for the source title, content, and group associations. - Supports adding or updating multiple groups for the source. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the server. - `--source-id`: ID of the source to edit. - `--title`: (Optional) New title for the source. - `--content`: (Optional) New content for the source. - `--groups`: (Optional) List of groups to associate with the source. - **Usage Example**: ```bash php MCPEditSourceClient.php ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --source-id 12345 ^ --title "Updated Title" ^ --content "Updated content for the source." ^ --groups devops finance ``` ### 3.4 MCPDeleteSourceClient - **Purpose**: Deletes a specific source from the MCP server. - **Main Features**: - Sends a `delete_source` command to remove the source identified by its ID. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the server. - `--source-id`: ID of the source to delete. - **Usage Example**: ```bash php MCPDeleteSourceClient.php ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --source-id 12345 ``` --- ### 4.0 MCPListGroupsClient - **Purpose**: Lists all the groups available on the MCP server. - **Main Features**: - Sends a `list_groups` command to retrieve the available groups. - Outputs the groups in JSON format. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the session. - **Usage Example**: ```bash php MCPListGroupsClient.php ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ``` ### 4.1 MCPStoreGroupClient - **Purpose**: - Creates or updates a group on the MCP server. - **Main Features**: - Sends a `store_group` command with the group's name and description. - Allows creation of new groups or modification of existing ones. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the session. - `--group-name`: Name of the group to create or update. - `--description`: (Optional) Description of the group. - **Usage Example**: ```bash php MCPStoreGroupClient.php ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --group-name "Team DevOps" ^ --description "Group for development and operations" ``` ### 4.2 MCPDeleteGroupClient - **Purpose**: - Deletes a specified group from the MCP server. - **Main Features**: - Sends a `delete_group` command with the group name. - Ensures the group is removed from the server. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the session. - `--group-name`: Name of the group to delete. - **Usage Example**: ```bash php MCPDeleteGroupClient.php ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --group-name "Team DevOps" ``` --- ### 5.0 MCPStoreUserClient - **Purpose:** Creates or updates user details on the MCP server. - **Main Features:** - Sends a `store_user` command with comprehensive user details. - Allows specification of default values for language and timezone if not provided. - **Key Arguments:** - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--name`: Name of the user. - `--email`: Email address of the user. - `--password`: Password for the user account. - `--language` (Optional): User's preferred language (default: "en"). - `--timezone` (Optional): User's timezone (default: "Europe/Berlin"). - `--roles` (Optional): Roles assigned to the user. - `--groups` (Optional): Groups the user belongs to. - `--usePublic` (Optional): Flag to set the user as public. - `--activateFtp` (Optional): Flag to activate FTP access. - `--ftpPassword` (Optional): Password for FTP access. **Usage Example:** ```bash php MCPStoreUserClient.php ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --name John ^ --email [email protected] ^ --password secret ^ --language en ^ --roles admin manager ^ --groups devops finance ^ --usePublic ^ --activateFtp ^ --ftpPassword ftpPass123 ``` ### 5.1 MCPEditUserClient - **Purpose:** Modifies the details of an existing user on the MCP server. - **Main Features:** - Sends an `edit_user` command with the specified user details. - Supports conditional sending of fields to avoid unnecessary data transmission. - **Key Arguments:** - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--user-id`: ID of the user to modify. - `--name` (Optional): New name of the user. - `--email` (Optional): New email for the user. - `--password` (Optional): New password for the user. - `--language` (Optional): New language for the user. - `--timezone` (Optional): New timezone for the user. - `--roles` (Optional): New roles for the user. - `--groups` (Optional): New groups for the user. - `--usePublic` (Optional): Flag to set the user as public. - `--activateFtp` (Optional): Flag to activate FTP for the user. - `--ftpPassword` (Optional): New password for FTP access. - **Usage Example:** ```bash php MCPEditUserClient.php ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --user-id 12345 ^ --name Jane ^ --roles manager devops ^ --groups hr devops ``` ### 5.2 MCPDeleteUserClient - **Purpose:** Deletes a user from the MCP server. - **Main Features:** - Sends a `delete_user` command using the user's email as an identifier. - **Key Arguments:** - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--email`: Email address of the user to delete. - `--token`: Authentication token. - **Usage Example:** ```bash php MCPDeleteUserClient.php ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --email [email protected] ``` --- ## General Notes **JSON Communication:** - Each file constructs and sends JSON payloads specific to its functionality. - Responses from the server are parsed and displayed in JSON format. **Socket Communication:** - The files use PHP's Socket class for establishing TCP connections with the MCP server. **Error Handling:** - The scripts handle missing or invalid arguments gracefully, printing clear usage instructions where necessary. **Examples:** - Replace placeholders (e.g., `<SERVER_IP>`, `<TOKEN>`) with actual values relevant to your environment. ## Prerequisites Ensure you have PHP installed. The code is compatible with PHP 7.1 and above. ## Dependencies: json which is meanwhile integrated in PHP directly ## Build and Run Use the `php` command to run the PHP files with the appropriate parameters as described above: ```bash php MCPLoginClient.php --<PARAMETER 1> --<PARAMETER 2> --<PARAMETER n> ... ``` ## Error Handling Both clients include error handling for: - Missing or invalid parameters. - Server connection issues. - Unexpected server responses. ## Future Enhancements - Add support for SSL/TLS encryption for secure communication. - Implement a configuration file to simplify the command-line parameters. - Enhance error reporting with detailed server-side error codes. ## License This project is licensed under the MIT License - see the LICENSE file for details. This repository and/or code is provided "as is" without warranty of any kind, and use is at your own risk. ``` -------------------------------------------------------------------------------- /clients/JavaScript/README.md: -------------------------------------------------------------------------------- ```markdown # MCP Agent Examples (JavaScript) This repository contains examples for interacting with the MCP server using **JavaScript**. Each console application demonstrates a specific operation and its corresponding server interaction. ## Main Menu Choose an operation from the list below. Each example demonstrates a specific server interaction. ### 1. Authentication [1.1 Login User](#10-mcploginclient) [1.2 Logout User](#12-mcplogoutclient) ### 2. Chat Operations [2.1 Start a New Chat](#20-mcpchatclient) [2.2 Continue a Chat Session](#21-mcpcontinuechatclient) [2.3 Retrieve Chat Info](#22-mcpgetchatinfoclient) ### 3. Source Management [3.1 Create a New Source](#30-mcpcreatesourceclient) [3.2 Retrieve Source Details](#31-mcpgetsourceclient) [3.3 List All Sources in a Group](#32-mcplistsourcesclient) [3.4 Edit an Existing Source](#33-mcpeditsourceclient) [3.5 Delete a Source](#34-mcpdeletesourceclient) ### 4. Group Management [4.1 List All Groups](#40-mcplistgroupsclient) [4.2 Create/Update a Group](#41-mcpstoregroupclient) [4.3 Delete a Group](#42-mcpdeletegroupclient) ### 5. User Management [5.1 Create/Update a User](#50-mcpstoreuserclient) [5.2 Edit User Details](#51-mcpedituserclient) [5.3 Delete a User](#52-mcpdeleteuserclient) --- ### 1.0 MCPLoginClient - **Purpose**: Handles user authentication by sending login requests to the MCP server. - **Main Features**: - Sends a `login` command to the server with user credentials. - Handles JSON-based requests and parses the server's response. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--email`: User email for authentication. - `--password`: User password for authentication. - **Usage Example**: ```bash node MCPLoginClient.js ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --email [email protected] ^ --password secret ``` ### 1.2 MCPLogoutClient - **Purpose**: Logs out an authenticated user by invalidating their session token. - **Main Features**: - Sends a `logout` command to the server. - Invalidates the token provided in the request. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token to be invalidated. - **Usage Example**: ```bash node MCPLogoutClient.js ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ``` --- ### 2.0 MCPChatClient - **Purpose**: Initiates a new chat session with the MCP server. - **Main Features**: - Sends a `chat` command to the server with a question. - Supports optional parameters for public chats, groups, and language. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--question`: Initial question for the chat session. - `--use-public`: Optional flag for public chat. - `--groups`: Optional group list. - `--language`: Optional language parameter. - **Usage Example**: ```bash node MCPChatClient.js ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --question "Hello World" ^ --use-public ^ --groups "devops,hr" ^ --language en ``` ### 2.1 MCPContinueChatClient - **Purpose**: Continues an existing chat session by sending follow-up messages. - **Main Features**: - Sends a `continue_chat` command to the server. - Provides the conversation ID and follow-up message. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--conversation-id`: ID of the conversation to continue. - `--message`: Follow-up message. - **Usage Example**: ```bash node MCPContinueChatClient.js ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --conversation-id 12345 ^ --message "Can you provide an update?" ``` ### 2.2 MCPGetChatInfoClient - **Purpose**: Retrieves metadata and status information about an existing chat session. - **Main Features**: - Sends a `get_chat_info` command to the server. - Extracts and displays information about the chat session. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--chat-id`: ID of the chat session to retrieve information for. - **Usage Example**: ```bash node MCPGetChatInfo.js ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --chat-id 6789 ``` --- ### 3.0 MCPCreateSourceClient - **Purpose**: Creates a new source on the MCP server and associates it with specified groups. - **Main Features**: - Sends a `create_source` command with details such as name, content, and associated groups. - Provides robust error handling for missing arguments and server communication issues. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the session. - `--name`: Name of the source to create. - `--content`: Content of the source in plain text or markdown. - `--groups`: (Optional) List of groups to associate with the source. - **Usage Example**: ```bash node MCPCreateSourceClient.js ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --name "Sample Source" ^ --content "This is a test content" ^ --groups devops hr ``` --- ### 3.1 MCPGetSourceClient - **Purpose**: Fetches detailed information about a specific source from the MCP server. - **Main Features**: - Sends a `get_source` command to the server with the source ID as a parameter. - Retrieves and displays the source's metadata and contents. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the server. - `--source-id`: Unique ID of the source to retrieve. - **Usage Example**: ```bash node MCPGetSourceClient.js ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --source-id 12345 ``` ### 3.2 MCPListSourcesClient - **Purpose**: Lists all sources belonging to a specified group on the MCP server. - **Main Features**: - Sends a `list_sources` command with the group name as a parameter. - Displays a list of sources available in the specified group. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the server. - `--group-name`: Name of the group for which to list sources. - **Usage Example**: ```bash node MCPListSourcesClient.js ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --group-name devops ``` ### 3.3 MCPEditSourceClient - **Purpose**: Edits the details of an existing source on the MCP server. - **Main Features**: - Sends an `edit_source` command with optional updates for the source title, content, and group associations. - Supports adding or updating multiple groups for the source. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the server. - `--source-id`: ID of the source to edit. - `--title`: (Optional) New title for the source. - `--content`: (Optional) New content for the source. - `--groups`: (Optional) List of groups to associate with the source. - **Usage Example**: ```bash node MCPEditSourceClient.js ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --source-id 12345 ^ --title "Updated Title" ^ --content "Updated content for the source." ^ --groups devops finance ``` ### 3.4 MCPDeleteSourceClient - **Purpose**: Deletes a specific source from the MCP server. - **Main Features**: - Sends a `delete_source` command to remove the source identified by its ID. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the server. - `--source-id`: ID of the source to delete. - **Usage Example**: ```bash node MCPDeleteSourceClient.js ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --source-id 12345 ``` --- ### 4.0 MCPListGroupsClient - **Purpose**: Lists all the groups available on the MCP server. - **Main Features**: - Sends a `list_groups` command to retrieve the available groups. - Outputs the groups in JSON format. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the session. - **Usage Example**: ```bash node MCPListGroupsClient.js ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ``` ### 4.1 MCPStoreGroupClient - **Purpose**: - Creates or updates a group on the MCP server. - **Main Features**: - Sends a `store_group` command with the group's name and description. - Allows creation of new groups or modification of existing ones. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the session. - `--group-name`: Name of the group to create or update. - `--description`: (Optional) Description of the group. - **Usage Example**: ```bash node MCPStoreGroupClient.js ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --group-name "Team DevOps" ^ --description "Group for development and operations" ``` ### 4.2 MCPDeleteGroupClient - **Purpose**: - Deletes a specified group from the MCP server. - **Main Features**: - Sends a `delete_group` command with the group name. - Ensures the group is removed from the server. - **Key Arguments**: - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token for the session. - `--group-name`: Name of the group to delete. - **Usage Example**: ```bash node MCPDeleteGroupClient.js ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --group-name "Team DevOps" ``` --- ### 5.0 MCPStoreUserClient - **Purpose:** Creates or updates user details on the MCP server. - **Main Features:** - Sends a `store_user` command with comprehensive user details. - Allows specification of default values for language and timezone if not provided. - **Key Arguments:** - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--name`: Name of the user. - `--email`: Email address of the user. - `--password`: Password for the user account. - `--language` (Optional): User's preferred language (default: "en"). - `--timezone` (Optional): User's timezone (default: "Europe/Berlin"). - `--roles` (Optional): Roles assigned to the user. - `--groups` (Optional): Groups the user belongs to. - `--usePublic` (Optional): Flag to set the user as public. - `--activateFtp` (Optional): Flag to activate FTP access. - `--ftpPassword` (Optional): Password for FTP access. **Usage Example:** ```bash node MCPStoreUserClient.js ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --name John ^ --email [email protected] ^ --password secret ^ --language en ^ --roles admin manager ^ --groups devops finance ^ --usePublic ^ --activateFtp ^ --ftpPassword ftpPass123 ``` ### 5.1 MCPEditUserClient - **Purpose:** Modifies the details of an existing user on the MCP server. - **Main Features:** - Sends an `edit_user` command with the specified user details. - Supports conditional sending of fields to avoid unnecessary data transmission. - **Key Arguments:** - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--token`: Authentication token. - `--user-id`: ID of the user to modify. - `--name` (Optional): New name of the user. - `--email` (Optional): New email for the user. - `--password` (Optional): New password for the user. - `--language` (Optional): New language for the user. - `--timezone` (Optional): New timezone for the user. - `--roles` (Optional): New roles for the user. - `--groups` (Optional): New groups for the user. - `--usePublic` (Optional): Flag to set the user as public. - `--activateFtp` (Optional): Flag to activate FTP for the user. - `--ftpPassword` (Optional): New password for FTP access. - **Usage Example:** ```bash node MCPEditUserClient.js ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --user-id 12345 ^ --name Jane ^ --roles manager devops ^ --groups hr devops ``` ### 5.2 MCPDeleteUserClient - **Purpose:** Deletes a user from the MCP server. - **Main Features:** - Sends a `delete_user` command using the user's email as an identifier. - **Key Arguments:** - `--server-ip`: IP address of the MCP server. - `--server-port`: Port number of the MCP server. - `--email`: Email address of the user to delete. - `--token`: Authentication token. - **Usage Example:** ```bash node MCPDeleteUserClient.js ^ --server-ip 127.0.0.1 ^ --server-port 1234 ^ --token MyToken ^ --email [email protected] ``` --- ## General Notes **JSON Communication:** - Each file constructs and sends JSON payloads specific to its functionality. - Responses from the server are parsed and displayed in JSON format. **Socket Communication:** - The files use JavaScript's Socket class for establishing TCP connections with the MCP server. **Error Handling:** - The scripts handle missing or invalid arguments gracefully, printing clear usage instructions where necessary. **Examples:** - Replace placeholders (e.g., `<SERVER_IP>`, `<TOKEN>`) with actual values relevant to your environment. ## Prerequisites JavaScript Development Kit (JDK): Ensure you have JDK installed. The code is compatible with JavaScript 8 and above. ## Dependencies: - org.json library for handling JSON data. ## Build and Run Use the `node` command to run the JavaScript files with the appropriate parameters as described above: ```bash node MCPLoginClient.js --<PARAMETER 1> --<PARAMETER 2> --<PARAMETER n> ``` ## Error Handling Both clients include error handling for: - Missing or invalid parameters. - Server connection issues. - Unexpected server responses. ## Future Enhancements - Add support for SSL/TLS encryption for secure communication. - Implement a configuration file to simplify the command-line parameters. - Enhance error reporting with detailed server-side error codes. ## License This project is licensed under the MIT License - see the LICENSE file for details. This repository and/or code is provided "as is" without warranty of any kind, and use is at your own risk. ```