Skip to main content
Glama

MCP Background Job Server

by dylan-gluck

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_BG_MAX_JOBSNoMaximum concurrent jobs10
MCP_BG_JOB_TIMEOUTNoDefault job timeout in seconds (default: no timeout)
MCP_BG_MAX_OUTPUT_SIZENoMaximum output buffer per job (in bytes)10485760
MCP_BG_CLEANUP_INTERVALNoCleanup interval for completed jobs in seconds300

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
list_jobs

List all background jobs with their status.

Returns a list of all background jobs, including their job ID, status, command, and start time. Jobs are sorted by start time (newest first).

get_job_status

Get the current status of a background job.

Args: job_id: The UUID of the job to check

Returns: The current status of the job (running, completed, failed, or killed)

get_job_output

Get the complete stdout and stderr output of a job.

Args: job_id: The UUID of the job to get output from

Returns: ProcessOutput containing the complete stdout and stderr content

tail_job_output

Get the last N lines of stdout and stderr from a job.

Args: job_id: The UUID of the job to tail lines: Number of lines to return (1-1000, default 50)

Returns: ProcessOutput containing the last N lines of stdout and stderr

execute_command

Execute a command as a background job and return job ID.

Args: command: Shell command to execute in the background

Returns: ExecuteOutput containing the job ID (UUID) of the started job

interact_with_job

Send input to a job's stdin and return any immediate output.

Args: job_id: The UUID of the job to interact with input: Text to send to the job's stdin

Returns: ProcessOutput containing any immediate stdout/stderr output after sending input

kill_job

Kill a running background job.

Args: job_id: The UUID of the job to terminate

Returns: KillOutput indicating the result of the kill operation

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/dylan-gluck/mcp-background-job'

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