Skip to main content
Glama
BBSRGUY
by BBSRGUY

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
TURBOC_BGINoBGI graphics driversC:\TURBOC3\BGI
TURBOC_LIBNoLibrary search pathC:\TURBOC3\LIB
TCC_COMMANDNoCompiler entry point (or a DOSBox .bat)C:\TURBOC3\BIN\TCC.EXE
TURBOC_ROOTNoTurbo C install rootC:\TURBOC3
MCP_C_WORKROOTNoScratch directory for sessionsC:\TURBOC3\mcp_work
TURBOC_INCLUDENoHeader search pathC:\TURBOC3\INCLUDE
MCP_C_TIMEOUT_MSNoPer-run execution timeout in milliseconds5000
MCP_C_RUN_COMMANDNoWrapper to launch the compiled .EXE (DOSBox bridge)
MCP_C_MAX_OUTPUT_BYTESNoOutput cap returned to the model65536
MCP_C_COMPILE_TIMEOUT_MSNoPer-compile timeout in milliseconds10000

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}
prompts
{}
resources
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
compile_and_runA

Compile C code with Borland Turbo C (TCC.EXE) and run the resulting DOS executable, capturing stdout/stderr, exit code, timing, and structured diagnostics. The everyday workhorse.

compile_checkA

Compile-only syntax/semantic check (no execution). Returns structured errors and warnings with line numbers — perfect for fast iteration and CI-style validation.

analyze_codeA

Static analysis of C source WITHOUT compiling: flags unsafe gets(), scanf-missing-&, assignment-in-if, unbalanced braces, missing main(), unchecked malloc, Turbo C float I/O pitfalls, and more. Instant, no toolchain required.

explain_errorA

Look up a Turbo C / Borland compiler, linker, or runtime message and get a plain-English cause + concrete fix. Feed it the raw error text (e.g. "Undefined symbol 'x' in function main").

generate_asmA

Compile C to a Turbo C assembly listing (TCC -S) and return the generated .ASM. Great for teaching how C maps to 16-bit x86, inspecting codegen, or optimization study.

list_examplesB

Browse the built-in library of classic Turbo C programs (hello, Fibonacci, prime sieve, bubble sort, Towers of Hanoi, structs, file I/O, conio colors, BGI graphics, matrix multiply, number-guessing game, Pascal's triangle). Returns ids you can run.

get_exampleA

Return the full C source of a built-in example by id (see list_examples).

run_exampleA

Compile and run a built-in example by id in one shot (uses its sample stdin when defined).

benchmarkA

Compile once, then run the program N times (default 5) and report min/max/avg execution time in milliseconds. Useful for comparing algorithm variants on the real DOS runtime.

format_codeA

Reformat C source: re-indent by brace depth, tidy trailing whitespace, and collapse blank-line runs. Dependency-free; returns the formatted code.

environment_doctorA

Inspect the Turbo C toolchain: verify TCC.EXE, INCLUDE, LIB, and BGI paths, count available headers, report workspace sessions, and list any problems with fix hints. Run this first if compiles fail.

clean_workspaceA

Delete old scratch session directories created by compiles/runs. Optionally keep the N most recent. Frees disk and keeps the DOS work root tidy.

Prompts

Interactive templates invoked by user choice

NameDescription
debug-c-errorDiagnose and fix a Turbo C compile error, then verify with compile_check.
optimize-cOptimize a C program for the 16-bit DOS target and benchmark before/after.
explain-programExplain what a C program does, line by line, then run it to confirm.

Resources

Contextual data attached and managed by the client

NameDescription
Turbo C environment snapshotLive toolchain health (same data as environment_doctor).
Example: Hello, Turbo CThe classic first program.
Example: Fibonacci sequencePrints the first N Fibonacci numbers read from stdin.
Example: Sieve of EratosthenesFinds all primes up to 100 using a classic sieve.
Example: Bubble sortSorts a small integer array and prints each pass.
Example: Towers of HanoiRecursive solution that prints every disk move.
Example: Pascal's trianglePrints a neat Pascal's triangle of a given height.
Example: Student records (structs)Demonstrates structs, arrays of structs, and averages.
Example: File write & readWrites a text file to disk then reads it back.
Example: Colorful console (conio.h)Uses Borland's conio.h for colored text — the DOS classic.
Example: BGI graphics: bouncing colorsOpens the BGI VGA driver and draws concentric circles — the iconic Turbo C graphics demo. Requires EGAVGA.BGI.
Example: Matrix multiplicationMultiplies two 2x2 matrices and prints the result.
Example: Number guessing gameA tiny interactive game using rand(); feed guesses on stdin.

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/BBSRGUY/turboc-mcp-server'

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