Skip to main content
Glama
Rodriguespn

Logflare MCP Code Mode

by Rodriguespn

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOG_LEVELNotrace/debug/info/warn/error/fatal/silentinfo
LOG_FORMATNojson (structured) or pretty (dev)json
VERCEL_TOKENYesVercel API token for sandbox creation.
VERCEL_TEAM_IDYesVercel team ID for sandbox creation.
LOGFLARE_API_KEYYesThe Logflare API key used for every execute_read/execute_write call.
VERCEL_PROJECT_IDYesVercel project ID for sandbox creation.
LOGFLARE_OPENAPI_URLNoOverride the OpenAPI spec URL the search tool loadshttps://api.logflare.app/api/openapi
LOGFLARE_EXEC_TIMEOUT_MSNoPer-call budget for the agent's code120000
LOGFLARE_SANDBOX_RUNTIMENoVercel Sandbox runtime the sandboxes boot fromnode24

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
searchA

Search the Logflare Management API's OpenAPI spec by writing JavaScript. Runs in a network-isolated sandbox.

Your code is an async arrow function that returns a value; it receives spec (all $refs resolved inline):

interface OperationInfo { summary?: string; description?: string; deprecated?: boolean; tags?: string[]; parameters?: Array<{ name: string; in: string; required?: boolean; schema?: unknown; description?: string }>; requestBody?: { required?: boolean; content?: Record<string, { schema?: unknown }> }; responses?: Record<string, { description?: string; content?: Record<string, { schema?: unknown }> }>; } declare const spec: { paths: Record<string, Record<string, OperationInfo>> };

Use this to find endpoints and their parameters/request bodies before calling execute_read/execute_write. Output over 100k chars is truncated — return small slices.

Example — find endpoints for sources (grouped by path): async () => Object.entries(spec.paths) .filter(([path]) => path.includes('/sources')) .map(([path, ops]) => ({ path, methods: Object.keys(ops) }))

Example — inspect one operation's request body and parameters: async () => spec.paths['/api/sources']?.post

execute_readA

Read data from the Logflare Management API by writing JavaScript. Only GET requests are allowed — use execute_write for anything that changes state.

Example: async () => (await api.request({ method: 'GET', path: '/api/sources' })).data

Your code is an async arrow function that returns a value. In scope:

declare const api: { request<T = unknown>(options: { method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; // default GET path: string; // e.g. "/api/sources" — see the search tool query?: Record<string, string | number | boolean | undefined>; body?: unknown; // JSON by default contentType?: string; // overrides the default application/json rawBody?: boolean; // send body as-is (no JSON.stringify) }): Promise<{ status: number; ok: boolean; data: T }>; };

Returns a JSON object — result (or error), calledEndpoints, and stdout/stderr — wrapped in an untrusted-data envelope. Use the search tool first to find paths. Access-token, backend, and team endpoints (/api/access-tokens, /api/backends, /api/teams) are blocked — they mint/reveal access tokens, backend connection config, or the account's master API key.

execute_writeA

Call the Logflare Management API by writing JavaScript, including state-changing requests (POST/PUT/PATCH/DELETE). Use execute_read for plain reads.

Example: async () => (await api.request({ method: 'POST', path: '/api/sources', body: { name: 'my-source' } })).data

Your code is an async arrow function that returns a value. In scope:

declare const api: { request<T = unknown>(options: { method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; // default GET path: string; // e.g. "/api/sources" — see the search tool query?: Record<string, string | number | boolean | undefined>; body?: unknown; // JSON by default contentType?: string; // overrides the default application/json rawBody?: boolean; // send body as-is (no JSON.stringify) }): Promise<{ status: number; ok: boolean; data: T }>; };

Returns a JSON object — result (or error), calledEndpoints, and stdout/stderr — wrapped in an untrusted-data envelope. Use the search tool first to find paths. Access-token, backend, and team endpoints (/api/access-tokens, /api/backends, /api/teams) are blocked — they mint/reveal access tokens, backend connection config, or the account's master API key.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/Rodriguespn/logflare-mcp-code-mode'

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