freebuff-mcp-server
Click on "Deploy 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., "@freebuff-mcp-serverwhy does this test fail in src/app.test.ts?"
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.
freebuff-mcp-server
Run the Freebuff coding agent from inside VS Code (or any MCP client) via the Model Context Protocol. Delegate coding tasks to the agent without leaving the editor.
Tools
Tool | What it does |
| Run the agent on a prompt. Sessions are continuable via |
| Check auth + backend connectivity + storage info. |
| Cancel the in-flight run. |
| Delete a session by id (memory + disk). |
| List sessions (memory + disk) with token-size estimates. |
freebuff_run options: prompt (required), cwd, agent, session_id,
max_steps, timeout_seconds, cost_mode (free ≈ the CLI's --lite
mode), force_resume.
Safe-by-default: read-only ask agent
By default freebuff_run uses a built-in local agent, freebuff-ask
(read-only): it can read_files, list_directory, glob, and code_search,
but has no write or terminal tools, so it can't modify your workspace.
Ideal for codebase Q&A like "where is the auth middleware?" or "why does this
test fail?".
codebuff/askis not published to the public agent registry, so this server ships its own equivalent definition (z-ai/glm-4.6).
To let the agent edit files and run commands, pass
agent: 'codebuff/base@0.0.16' explicitly.
Related MCP server: vscode-agent-bridge
MCP resources
URI | What it is |
| JSON index of all sessions. |
| Markdown transcript (user/assistant/tool messages). |
Transcripts appear in resources/list, so MCP clients can browse past runs.
Session persistence & resume guard
Sessions are written to disk after every run and survive server restarts:
Default location:
~/.freebuff-mcp/sessions/<id>.jsonOverride with
FREEBUFF_MCP_DIR(directory) — the test suite uses thisPruning: keep at most
FREEBUFF_MCP_MAX_SESSIONS(default 50), delete older thanFREEBUFF_MCP_MAX_AGE_DAYS(default 30); runs on every saveRestarts: pass a previous
session_idtofreebuff_runin a brand-new server process — it loads from disk and continues the conversation
Because agent context windows are finite, resuming is guarded by a character-based token estimate (~4 chars/token, an upper bound — the backend still does its own truncation/compaction):
Env var | Default | Behavior |
| 80000 | Warn when resuming above this size |
| 150000 | Refuse to resume above this unless |
Estimates are stored with each session and shown by freebuff_sessions
(~12345 tokens), so oversized sessions are visible before you try.
Installation
Published as freebuff-mcp-server.
Use it directly with npx (no clone needed):
npx -y freebuff-mcp-serverOr install globally:
npm install -g freebuff-mcp-server
freebuff-mcp-serverAuthentication
Get an API key at https://www.codebuff.com/api-keys (same account as your Freebuff login), then supply it in one of these ways (first match wins):
--api-key <key>argumentFREEBUFF_API_KEYorCODEBUFF_API_KEYenvironment variableYour existing Freebuff CLI login (
~/.config/manicode/credentials.json) — tried automatically as a fallback
Note (verified experimentally, Sept 2026): the stored CLI session token authenticates and reaches the backend, but SDK runs are billed through the Codebuff API-key path, so it currently yields
Payment Required(normal mode) orForbidden(cost_mode: "free"). Generate an API key at the link above and the server works out of the box. If your account has no SDK access, that's an account/billing matter on codebuff.com — there is no free headless path in the Freebuff CLI itself today.
Use in VS Code
A ready-made config is included at .vscode/mcp.json (workspace root). It
launches the server via npx and prompts for your API key on first use:
{
"servers": {
"freebuff": {
"type": "stdio",
"command": "npx",
"args": ["-y", "freebuff-mcp-server"],
"env": { "CODEBUFF_API_KEY": "${input:codebuffApiKey}" }
}
}
}For any other MCP client, the launch command is the same:
npx -y freebuff-mcp-server.
Publishing (maintainers)
Publishing is automated from GitHub releases:
Add
NPM_TOKEN(an npm automation or granular token) as a repository secretBump
package.jsonversion, commit, and tag itCreate a GitHub release with tag
v<version>(e.g.v0.3.1)
The publish.yml workflow then typechecks, builds, runs the protocol-only
smoke test, verifies the tag matches the package version, and runs
npm publish --provenance --access public.
Manual publish still works: npm publish (prepublishOnly re-runs typecheck +
build). The tarball contains only dist/ + README.md (~12 kB packed).
CI
.github/workflows/ci.yml runs on every push/PR touching src/, test/
(Node 20 + 22): typecheck → build → npm test with SMOKE_SKIP_NETWORK=1.
That mode exercises the full MCP protocol surface (handshake, tool schemas,
resource listing/reads, delete and resume error paths, persistence across a
restart) without agent runs, since CI has no credentials. The full test with
real agent runs still works locally: npm test.
Development
npm install
npm run typecheck # tsc --noEmit
npm run build # emit dist/index.js
node test/smoke.js # full end-to-end test (see below)
# optional args: [agentId] [costMode]The smoke test exercises: initialize → tools/list → status → two real agent
runs → sessions list (with token estimates) → resources/list +
resources/read (index + transcript) → freebuff_delete (unknown id, real
delete, transcript gone) → restart: a second server instance must list the
surviving session, serve its transcript from disk, refuse an oversized resume
(FREEBUFF_MCP_RESUME_MAX_TOKENS=1), resume with force_resume, and still
reject unknown ids.
stdout is reserved for the MCP protocol; all diagnostics go to stderr.
Status & limitations
The MCP layer (tools, resources, persistence, resume guard, cancellation, timeouts) is complete and tested against a live server.
Runs require a Codebuff API key with SDK access (see Authentication).
Transcripts omit
systemmessages and reasoning parts.Token estimates are character-based upper bounds, not exact counts.
Available Tools
5 toolsfreebuff_deleteA
Delete a Freebuff agent session by id — from memory and disk.
Returns error if the id is unknown. The transcript resource for a deleted session disappears; active runs must be cancelled (freebuff_stop) before deleting their session.
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Id of the session to delete (see freebuff_sessions). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full behavioral disclosure burden. It fully discloses destructive effects: deletion from memory and disk, disappearance of the transcript resource, error behavior for unknown ids, and the precondition that active runs must be stopped first. This is exemplary for a destructive tool without annotation support.
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 concise, front-loaded with the primary action, and every sentence adds necessary information: the scope of deletion, the error case, the side effect on transcripts, and the required precondition. There is no redundant or filler content.
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 one-parameter destructive tool with no output schema, the description covers everything an agent needs: what is deleted, from where, what error to expect, what happens to related resources, and how to safely prepare a session for deletion. No important context is missing.
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 is 100%, and the single parameter session_id is already described as 'Id of the session to delete (see freebuff_sessions).' The tool description mostly reiterates the id-based deletion without adding substantial new semantics beyond the schema, so the baseline score of 3 applies.
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 uses a specific verb and resource: 'Delete a Freebuff agent session by id — from memory and disk.' This clearly distinguishes it from sibling tools like freebuff_stop, freebuff_sessions, freebuff_run, and freebuff_status, which handle different operations. The scope and effect are unambiguous.
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 explicitly states when the tool should not be used by saying active runs must be cancelled with freebuff_stop before deleting their session. It also warns that deleting an unknown id returns an error, giving the agent the context needed to call the right tool at the right time.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
freebuff_runA
Run the Freebuff coding agent on a prompt, inside a workspace folder.
By default runs the built-in read-only 'freebuff-ask' agent, which can read files, search code, and answer questions but cannot modify anything — safe for codebase Q&A. Pass agent: 'codebuff/base@0.0.16' to let the agent edit files and run commands.
Returns the agent's final answer plus a log of what it did. Continue a conversation by passing the session_id returned from a previous run (sessions persist across server restarts).
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for the run. Defaults to the folder this server was started in. | |
| agent | No | Agent id to run. Defaults to 'freebuff-ask' (read-only). Use 'codebuff/base@0.0.16' for full edit/terminal capability. | |
| prompt | Yes | What you want the agent to do. | |
| cost_mode | No | Billing tier. 'free' routes to free-tier models (like the CLI's --lite mode); 'normal' uses the standard paid path. | |
| max_steps | No | Cap on agent steps to avoid runaway runs. Default 40. | |
| session_id | No | A session id returned by a previous freebuff_run call, to continue that conversation. | |
| force_resume | No | Resume even when the persisted session is estimated above the token ceiling (FREEBUFF_MCP_RESUME_MAX_TOKENS). | |
| timeout_seconds | No | Hard timeout for this run. Default 300 (5 minutes). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It does this well by explicitly stating that the default agent 'cannot modify anything' and that the alternative agent can 'edit files and run commands,' plus it discloses return content and session persistence. It doesn't cover failure/cost edge cases, but the core behavioral risks are transparent.
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 three short paragraphs with the main purpose front-loaded, followed by safety-relevant detail and session continuation. It is concise and free of filler, though it could be slightly tightened without losing value.
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 tool with 8 parameters and no output schema, the description covers the essential launch behavior, the read-only vs editing distinction, the return value, and conversation continuation. It doesn't include examples or error/edge-case details, but it provides enough for an agent to invoke the tool correctly.
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 all eight parameters are already documented structurally. The description adds useful context for 'agent' and 'session_id' (default behavior, continuation), but does not add meaning beyond the schema for cost_mode, max_steps, timeout_seconds, or force_resume. Baseline 3 is appropriate.
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 states a specific verb ('Run'), a resource ('Freebuff coding agent'), and a context ('inside a workspace folder'). It clearly differentiates this from the sibling tools (freebuff_status, freebuff_delete, freebuff_stop, freebuff_sessions), which manage existing runs rather than launching new ones.
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 explains when to use the default read-only agent vs the editing agent ('Pass agent: 'codebuff/base@0.0.16' to let the agent edit files and run commands'), giving condition-based usage guidance. It does not explicitly mention when to prefer sibling tools, but the purpose separation is clear enough.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
freebuff_sessionsA
List Freebuff agent sessions known to this server (memory + persisted on disk).
| 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 the behavioral burden. 'List' clearly signals a read-only operation, and 'known to this server (memory + persisted on disk)' usefully discloses the data source and scope. It does not mention ordering, whether all session states are included, or error behavior, but these are minor for a simple list operation.
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 compact sentence with no filler. It front-loads the action ('List'), then the resource ('Freebuff agent sessions'), then useful scope detail ('known to this server', 'memory + persisted on disk'). Every phrase earns its place.
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 zero-parameter list tool, the description is largely complete: an agent knows what the tool does and where the data comes from. However, there is no output schema and no explicit note about what a returned session contains, such as an ID or status field, which would be helpful for chaining with freebuff_status or freebuff_delete.
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 tool has zero parameters and schema coverage is 100%, so there are no input arguments for the description to clarify. The baseline of 4 applies because there is nothing meaningful left undocumented.
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 states a specific verb and resource: 'List Freebuff agent sessions'. It also adds scope ('known to this server (memory + persisted on disk)'), making the operation concrete. While it does not name a sibling, the plural resource 'sessions' contrasts clearly with the action-oriented siblings freebuff_run, freebuff_status, freebuff_delete, and freebuff_stop.
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 intended use is implied by 'List Freebuff agent sessions', but the description gives no explicit guidance about when to choose this tool over siblings. It does not say, for example, to use freebuff_status for a detailed look at one session or freebuff_delete to remove one. With four related lifecycle tools present, some routing guidance would improve the definition.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
freebuff_statusA
Check whether the Freebuff MCP server has valid credentials and can reach the agent backend.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the behavioral disclosure burden. 'Check whether' signals a non-mutating verification and describes exactly what is checked (credentials, backend reachability). However, it does not mention possible side effects, network behavior, or what happens when credentials are invalid.
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?
A single sentence that front-loads the action and directly states the tool's purpose with no filler, repetition, or unnecessary detail. Every word earns its place.
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 zero-input status tool, this is nearly complete: an agent can select and invoke it correctly based on the description alone. The main gap is the absence of return-value/output details, which matters more because there is no output schema and no annotations to clarify what the check returns.
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 tool has zero parameters and the schema is complete, so there is no parameter semantics burden. Per the rubric, a zero-parameter tool with full schema coverage gets a baseline of 4; the description adds no parameter information and does not need to.
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 names a specific action ('Check whether') and a specific resource/condition (Freebuff MCP server credentials and agent backend reachability). This clearly distinguishes it from the operational siblings freebuff_run, freebuff_delete, freebuff_stop, and freebuff_sessions, which all imply different purposes.
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 implies a health/credential-check use case, likely as a precondition before running other Freebuff commands, but it does not explicitly state when to use this tool versus siblings or when not to use it. Usage context is present but left to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
freebuff_stopA
Cancel the currently running Freebuff agent session, if any.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry behavioral disclosure. It does communicate a useful trait: the operation only acts on an existing running session ('if any'), implying a no-op when none is active. However, it does not mention side effects or whether cancellation is immediate, graceful, or irreversible.
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?
A single sentence, front-loaded with the action ('Cancel') and the target ('currently running Freebuff agent session'), with no filler. Every word contributes to selection and invocation.
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 no-argument, single-purpose stop tool without an output schema, the description is nearly complete. The only minor gap is the lack of an explicit note about the destructive/irreversible nature of cancellation, though 'Cancel' largely conveys this.
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 tool has zero parameters, so the baseline is 4; there is no parameter ambiguity for the agent. The empty input schema already represents this completely, and the description has nothing more it needs to add.
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 uses a specific verb ('Cancel') and a specific resource ('currently running Freebuff agent session'), and the qualifier 'currently running' clearly scopes the action. This semantically distinguishes it from siblings like freebuff_sessions and freebuff_delete without ambiguity.
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 usage context is only implied: call this when a Freebuff agent session is running and should be cancelled. It does not explicitly say when not to use it or contrast it with freebuff_delete/freebuff_sessions, so the agent must infer the routing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.3.0- First observed
freebuff_delete - First observed
freebuff_run - First observed
freebuff_sessions - First observed
freebuff_status - First observed
freebuff_stop
TDQS
Scored across 5 tools
Each tool targets a distinct operation: run executes the agent, stop cancels a run, status checks connectivity, sessions lists stored sessions, and delete removes a session. There is no meaningful overlap or ambiguity between them.
All tools use the freebuff_ prefix and snake_case, and most are verb-based (run, stop, delete, status). The exception is freebuff_sessions, which is a noun rather than an action verb, but it is still predictable and easily understood.
Five tools is well-scoped for the server's purpose: managing and interacting with Freebuff coding agent sessions. Each tool covers a necessary part of the lifecycle without redundancy or bloat.
The tool surface covers the full session lifecycle: create/continue with run, cancel with stop, list with sessions, delete with delete, and validate availability with status. There are no obvious dead ends for the stated domain.
Maintenance
Related MCP Connectors
Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Agent-native notes, tasks, dev-docs, vaults, sync & handoffs. MCP + OpenAPI dual surface.
System-of-record notebook for AI coding agents: pages, datastores, tasks, skills over MCP.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables multiple coding agents (Claude Code, Codex, Cursor) to discover each other's sessions, search transcripts, ask questions, and handoff tasks through a shared MCP server.54 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to access live VS Code editor state, symbol navigation, diagnostics, and language-aware editing through MCP, bridging the gap between what the agent can infer from disk and what the editor actually knows.MIT
- AlicenseNot gradedqualityBmaintenanceEnables approved Microsoft 365 agents to be queried from VS Code and MCP-compatible AI clients through a local MCP bridge.MIT
- AlicenseNot gradedqualityCmaintenanceBridges web-based AI agents to a local VS Code workspace over MCP Streamable HTTP, letting them inspect files, edit code, and run persistent shell commands within session-scoped boundaries. Risky, destructive, or out-of-scope operations pause for explicit human approval, with session state surviving reconnects.8 npmGPL 3.0