Skip to main content
Glama

get_config

Retrieve configuration settings for the Global MCP Manager server to manage terminal commands and files across local, remote SSH, and GitHub environments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • index.js:50-99 (handler)
    The asynchronous handler function for the 'get_config' tool. It creates a masked version of the globalConfig and returns it formatted as MCP content.
    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 using server.tool(), with empty schema and inline handler.
    '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}` } ] }; } } );
  • Global configuration object that stores context, GitHub, SSH, and local work directory settings, used by the get_config handler.
    export const globalConfig = { context: 'local', github: { token: process.env.GITHUB_TOKEN || '', owner: '', repo: '' }, ssh: { host: '', port: '22', username: '', password: '', appPath: '' }, localWorkDir: process.cwd() };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mamprimauto/mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server