Skip to main content
Glama
jina-ai

Jina AI Remote MCP Server

Official
by jina-ai

show_api_key

Retrieve the bearer token from the Authorization header in MCP settings for debugging purposes.

Instructions

Return the bearer token from the Authorization header of the MCP settings, which is used to debug.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registers the "show_api_key" tool using server.tool(). The tool has no input schema ({}), and an inline asynchronous handler function that retrieves the bearer token from getProps() and returns it as text content, or an error if not found. This is the primary implementation including handler logic.
    // Show API key tool - returns the bearer token from request headers server.tool( "show_api_key", "Return the bearer token from the Authorization header of the MCP settings, which is used to debug.", {}, async () => { const props = getProps(); const token = props.bearerToken as string; if (!token) { return createErrorResponse("No bearer token found in request"); } return { content: [{ type: "text" as const, text: token }], }; }, );
  • Inline handler function for the "show_api_key" tool. It fetches props via getProps(), extracts the bearerToken, and returns it as a text content block or an error response if absent.
    async () => { const props = getProps(); const token = props.bearerToken as string; if (!token) { return createErrorResponse("No bearer token found in request"); } return { content: [{ type: "text" as const, text: token }], }; },
  • Helper function createErrorResponse used by the show_api_key handler (and others) to format error responses with text content and isError flag.
    const createErrorResponse = (message: string) => ({ content: [{ type: "text" as const, text: message }], isError: true, });

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/jina-ai/MCP'

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