brainfaq-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@brainfaq-mcpload '+++[>+++<-]>' and step 5 times"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
brainfaq-mcp
MCP server for the Brainfuck programming language that allows your favourite LLM to debug Brainfuck programs.
Usage
Use this command to run the MCP server:
npx brainfaq-mcpTo use it in VS Code, add the following JSON snippet to .vscode/mcp.json (create the file if you don't have it):
{
"servers": {
"brainfaq-mcp": {
"command": "npx",
"args": ["brainfaq-mcp"]
}
}
}The MCP can be added to other IDEs with LLM agents support (e.g. Cursor) in similar ways. Check their documentation and configure them to run npx brainfaq-mcp. It will start the MCP server in stdio mode.
Related MCP server: rr-mcp
Features
MCP Tools
load_code - Reset the debugger and load new Brainfuck source code. Supports configurable tape size, min/max cell values, and initial input.
step - Execute a specified number of instructions (default 1) with detailed state output.
run - Run the program until it finishes or waits for input, with optional instruction limit.
add_input - Append characters to the input buffer when the program is waiting for input.
get_state - Get the current interpreter state (memory, pointers, output) with optional windowing.
read_output - Get the complete output string generated so far.
Capabilities
Full Brainfuck support (8 operations:
>,<,+,-,.,,,[,])Overflow/underflow detection with configurable value limits
Bracket matching validation and loop control
Step-by-step execution and debugging
Memory protection with configurable tape size
Development
Setup:
npm iBuild:
npm run buildTests:
npm run testTests are inspired by the Brainfuck test suite by Daniel Cristofani.
Release
Build first the source code using the command above.
Login to NPM:
npm loginPublish to NPM:
npm publishLicense
All work in this repos is licensed under "Creative Commons Attribution-ShareAlike 4.0 International License".
Available Tools
6 toolsadd_inputA
Append characters to input buffer. Use when status is WAITING_FOR_INPUT. Outputs the engine status.
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It describes the action (append) and notes that it 'Outputs the engine status', but does not disclose potential side effects, permissions, or limitations like buffer size or character constraints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences, front-loaded with the action. No superfluous information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and no output schema, the description is mostly complete: purpose, usage condition, and output hint. Could specify what the engine status output looks like, but overall sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so description must compensate. It implies that 'input' is the characters to append, but lacks details on formatting, length, or encoding. Adequate but not thorough.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Append characters to input buffer') and the resource. It distinguishes itself from siblings which handle state, code, output, execution, and stepping.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says 'Use when status is WAITING_FOR_INPUT', providing clear context for when to use. However, it does not mention when not to use or suggest alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_stateA
Get the current full state (memory, pointers, output). When windowRadius is not specified, returns the entire tape which may be a large amount of data.
| Name | Required | Description | Default |
|---|---|---|---|
| windowRadius | No | Optional radius around data pointer. When omitted, returns entire tape. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It discloses the return components and large data behavior but does not mention read-only nature or potential side effects. The transparency is adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences: first states purpose, second adds critical usage constraint. No unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given one parameter and no output schema, the description covers key aspects: what is returned (memory, pointers, output) and behavior with/without windowRadius. For a simple getter, this is complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage for windowRadius is 100% but description adds value by explaining default behavior (returns entire tape) and warning about large data, which is useful beyond the schema description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool gets the 'current full state' specifying components (memory, pointers, output). It distinguishes from sibling tools like read_output which is more specific, and step/run which execute transitions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implicitly guides usage by warning about large data when windowRadius is omitted, suggesting using that parameter for limited data. However, it does not explicitly state when to use this tool over alternatives like read_output.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
load_codeB
Reset the debugger and load new Brainfuck source code.
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| maxValue | No | Maximum allowed value for tape cells (default: 9007199254740991) | |
| minValue | No | Minimum allowed value for tape cells (default: -9007199254740991) | |
| tapeSize | No | Size of the memory tape (default: 30000) | |
| initial_input | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description mentions resetting the debugger, implying state destruction, but does not elaborate on side effects, permissions, or return behavior. With no annotations, it provides basic but incomplete transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence with front-loaded key information. Efficient but lacks structured detail like parameter summary.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 5 parameters, no output schema, and no annotations, the description is too minimal. It omits return values, error conditions, and use cases.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds no explanation of parameters beyond the input schema. With 60% schema description coverage, it fails to clarify the 'initial_input' or reinforce usage of others.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool resets the debugger and loads Brainfuck source code, specifying verb and resource. It is distinct from siblings like 'run' or 'step' which execute code.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like 'add_input' or 'run'. The description lacks context for selecting this tool over others.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_outputA
Get the full output string generated so far.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It only states the basic function, omitting details like side effects (e.g., whether reading clears the output), idempotency, or authorization needs.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no filler. It is concise and front-loaded with the verb, meeting the requirement of efficiency.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (0 params, no output schema), the description is adequate but lacks context about what 'output' refers to (e.g., console output from run?) and whether it resets after reading.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0 parameters, so schema coverage is 100%. The baseline for 0 parameters is 4, and the description adds no additional parameter info because none exist.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Get the full output string generated so far' clearly states the verb (Get) and the resource (the full output string). It distinguishes from siblings like get_state (state vs output) and other actions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus siblings like get_state or run. The description does not mention prerequisites, alternatives, or context for use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
runB
Run the program until it finishes or waits for input. Infinite loops WILL hang the server. Then outputs the summary of the current state.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Optional limit if you still want one. Omit to run forever. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It warns about infinite loops and mentions output, but does not detail error behavior, destructive potential, or return format.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences efficiently cover purpose, a warning, and output, with no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the main action and a warning, but lacks guidance on alternatives like 'step', error handling, and return structure, which would be beneficial given the sibling tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description provides no additional meaning beyond the schema's description of the 'limit' parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states that the tool runs a program until it finishes or waits for input, and outputs a summary. It distinguishes from siblings like 'step' which is for single-step execution.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description warns about infinite loops hanging the server but does not provide guidance on when to use this tool versus alternatives like 'step' or 'add_input'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
stepC
Execute a specific number of instructions (default 1). Then outputs the summary of the current state.
| Name | Required | Description | Default |
|---|---|---|---|
| count | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided; description only states that it executes instructions and outputs a summary. It does not disclose whether execution modifies state,what the side effects are, or any required permissions. This is minimal transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, front-loaded with the main action. It is concise with no wasted words, though it could be slightly more structured for clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and no output schema, the description covers the basic purpose and parameter meaning. However, it lacks details on usage context, state changes, and output format, which are needed for full completeness given the sibling tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The single parameter 'count' has a description in the tool description (number of instructions, default 1) which adds meaning beyond the schema's type and default. Schema description coverage was 0%, so the description compensates adequately.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it executes instructions and outputs a summary. The verb 'execute' and resource 'instructions' are specific. It distinguishes from sibling 'run' by mentioning a specific count, though the exact nature of instructions is implicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like 'run' or 'add_input'. The description does not mention when to choose step over siblings, leaving the agent to infer usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a clear, distinct purpose: loading code, stepping, running, input/output, and state inspection. No overlap or ambiguity.
All tool names follow a consistent verb_noun pattern (add_input, get_state, load_code, read_output, run, step), with the exception of 'step' which is a verb but fits the pattern.
6 tools is well-scoped for a Brainfuck debugger/interpreter, covering all essential operations without unnecessary bloat.
The tool set covers the core workflow (load, step, run, input, output, state) but lacks an explicit stop/interrupt mechanism, which is a minor gap given the warning about infinite loops.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for understanding Javascript internals from ECMAScript specification.
MCP server to assist with JxBrowser development.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server for debugging Windows processes using WinDbg and CDB. It enables users to attach to processes, manage breakpoints, inspect memory, and control execution flow through natural language.2
- AlicenseNot gradedqualityDmaintenanceMCP server for orchestrating multi-process rr debugging sessions with reverse execution, breakpoints, and dynamic session state.1MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for remote debugging with gdbserver, offering full debugging capabilities including breakpoint control, stepping, memory inspection, and process management.MIT
- AlicenseAqualityCmaintenanceAn MCP server that exposes Python debugging tools backed by debugpy, providing a focused debugging surface for local scripts.11MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/labarilem/brainfaq-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server