Skip to main content
Glama

ig_logout

Log out from an IG Trading account securely via the IG Trading MCP server. Use this tool to close active sessions and manage account access.

Instructions

Logout from IG Trading account

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

Implementation Reference

  • MCP tool handler for ig_logout that delegates to IGService.logout() and formats the response.
    case 'ig_logout': await igService.logout(); return { content: [ { type: 'text', text: 'Successfully logged out', }, ], };
  • Tool registration in TOOLS array, including name, description, and empty input schema.
    { name: 'ig_logout', description: 'Logout from IG Trading account', inputSchema: { type: 'object', properties: {}, }, },
  • IGService.logout method: core implementation that calls IG API DELETE /session and clears session tokens.
    async logout() { try { const response = await this.apiClient.delete('/session'); config.clearSessionTokens(); logger.info('Logout successful'); return response; } catch (error) { logger.error('Logout failed:', error.message); throw error; } }

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/kea0811/ig-trading-mcp'

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