get_config
Retrieve configuration settings and system details across local, remote SSH, and GitHub environments using the Global MCP Manager's command and file management capabilities.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:49-99 (handler)The handler function for the 'get_config' tool. It creates a masked version of the globalConfig, formats it into a text response, and returns it in the MCP content format. Includes error handling.async () => { try { const maskedConfig = { context: globalConfig.context, github: { token: globalConfig.github.token ? '***' + globalConfig.github.token.slice(-4) : 'Não configurado', owner: globalConfig.github.owner || 'Não configurado', repo: globalConfig.github.repo || 'Não configurado' }, ssh: { host: globalConfig.ssh.host || 'Não configurado', port: globalConfig.ssh.port || 'Não configurado', username: globalConfig.ssh.username || 'Não configurado', password: globalConfig.ssh.password ? '******' : 'Não configurado', appPath: globalConfig.ssh.appPath || 'Não configurado' }, localWorkDir: globalConfig.localWorkDir }; return { content: [ { type: 'text', text: `Configuração atual do Global MCP Manager: Contexto atual: ${maskedConfig.context} GitHub: - Repositório: ${maskedConfig.github.owner}/${maskedConfig.github.repo} - Token: ${maskedConfig.github.token} SSH: - Servidor: ${maskedConfig.ssh.username}@${maskedConfig.ssh.host}:${maskedConfig.ssh.port} - Caminho da aplicação: ${maskedConfig.ssh.appPath} Sistema local: - Diretório de trabalho: ${maskedConfig.localWorkDir}` } ] }; } catch (error) { return { content: [ { type: 'text', text: `Erro ao obter configuração: ${error.message}` } ] }; } }
- index.js:47-100 (registration)Registration of the 'get_config' tool on the MCP server with an empty input schema and the inline handler function.'get_config', {}, async () => { try { const maskedConfig = { context: globalConfig.context, github: { token: globalConfig.github.token ? '***' + globalConfig.github.token.slice(-4) : 'Não configurado', owner: globalConfig.github.owner || 'Não configurado', repo: globalConfig.github.repo || 'Não configurado' }, ssh: { host: globalConfig.ssh.host || 'Não configurado', port: globalConfig.ssh.port || 'Não configurado', username: globalConfig.ssh.username || 'Não configurado', password: globalConfig.ssh.password ? '******' : 'Não configurado', appPath: globalConfig.ssh.appPath || 'Não configurado' }, localWorkDir: globalConfig.localWorkDir }; return { content: [ { type: 'text', text: `Configuração atual do Global MCP Manager: Contexto atual: ${maskedConfig.context} GitHub: - Repositório: ${maskedConfig.github.owner}/${maskedConfig.github.repo} - Token: ${maskedConfig.github.token} SSH: - Servidor: ${maskedConfig.ssh.username}@${maskedConfig.ssh.host}:${maskedConfig.ssh.port} - Caminho da aplicação: ${maskedConfig.ssh.appPath} Sistema local: - Diretório de trabalho: ${maskedConfig.localWorkDir}` } ] }; } catch (error) { return { content: [ { type: 'text', text: `Erro ao obter configuração: ${error.message}` } ] }; } } );
- index.js:13-31 (helper)Global configuration object that stores context, GitHub, SSH, and local work directory settings, used by the get_config handler to build the response.export const globalConfig = { context: 'local', github: { token: process.env.GITHUB_TOKEN || '', owner: '', repo: '' }, ssh: { host: '', port: '22', username: '', password: '', appPath: '' }, localWorkDir: process.cwd() };