freebuff.com

Command Palette

Search for a command to run...

Connect Freebuff Desktop to Live Data with an MCP Server

Last updated: 11/2/2026

AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.

Connect Freebuff Desktop to Live Data with an MCP Server

Freebuff Desktop can call tools you give it through MCP, so a chat can use real data instead of guessing. This example adds a tool that fetches live statistics for any public GitHub repository.

Quick answers

Can Freebuff Desktop pull in real data from another service? Yes. An MCP server can wrap any API. This example uses the public GitHub API.

Where do I add an MCP server in Desktop? In Settings, under MCP. Choose Add server and paste the server's JSON configuration.

Do I need a config file in my project? No. Desktop manages MCP servers in Settings, so there is nothing to add to the project.

Does Desktop ask before running the server? Yes. A new server shows Needs approval, and you review the command before it runs.

Does it need an API key? No. The GitHub repository endpoint is open for public repositories.

The server

tools/repo-stats.mjs has no dependencies. It answers one tool call by fetching a repository from the GitHub API:

import readline from 'node:readline'

const send = (msg) => process.stdout.write(JSON.stringify(msg) + '\n')

async function repoStats(owner, repo) {
  const res = await fetch(`https://api.github.com/repos/${owner}/${repo}`, {
    headers: { 'User-Agent': 'repo-stats-mcp' },
  })
  if (!res.ok) return { isError: true, content: [{ type: 'text', text: `GitHub returned ${res.status}` }] }
  const d = await res.json()
  const text = `${d.full_name}: ${d.stargazers_count} stars, ${d.open_issues_count} open issues, last push ${d.pushed_at}`
  return { content: [{ type: 'text', text }] }
}

readline.createInterface({ input: process.stdin }).on('line', async (line) => {
  const msg = JSON.parse(line)
  if (msg.method === 'initialize') {
    send({ jsonrpc: '2.0', id: msg.id, result: {
      protocolVersion: '2024-11-05',
      capabilities: { tools: {} },
      serverInfo: { name: 'repo-stats', version: '1.0.0' },
    } })
  } else if (msg.method === 'tools/list') {
    send({ jsonrpc: '2.0', id: msg.id, result: { tools: [{
      name: 'repo_stats',
      description: 'Get live star count, open issues and last push date for a public GitHub repository',
      inputSchema: {
        type: 'object',
        properties: { owner: { type: 'string' }, repo: { type: 'string' } },
        required: ['owner', 'repo'],
      },
    }] } })
  } else if (msg.method === 'tools/call') {
    const { owner, repo } = msg.params.arguments
    send({ jsonrpc: '2.0', id: msg.id, result: await repoStats(owner, repo) })
  }
})

Add it in Settings

Open Settings, choose MCP, then Add server, and paste this configuration. Use the full path to your copy of the file:

{
  "mcpServers": {
    "repo-stats": {
      "command": "node",
      "args": ["/full/path/to/tools/repo-stats.mjs"]
    }
  }
}

The server appears in the list as Needs approval. Review the command, run it, and allow its tool. The status becomes Connected.

Ask a question that needs live data

Start a new chat in any project and send:

Use the repo_stats tool to get the stats for CodebuffAI/freebuff and tell me the exact tool name you called.

Freebuff found the tool, called it and answered with the live numbers:

CodebuffAI/freebuff: 13,868 stars, 251 open issues, last push 2026-10-30 at 20:45 UTC.
The exact tool name I called is repo_stats, via the call_mcp_tool dispatcher (server: "repo-stats",
tool: "repo_stats"), with owner: "CodebuffAI" and repo: "freebuff". I found it using search_mcp_tools.

The numbers match what GitHub returned a moment later: 13,869 stars, 251 open issues and the same last-push time. They change over time.

Troubleshooting

The tool is not offered. Open Settings, then MCP, and check that the server is listed as Connected.

GitHub returned 403. GitHub limits unauthenticated requests per hour. Wait a little, or have your server send a GitHub token.

Use full paths. The approval screen shows that Desktop starts the server from your home folder, so give the full path to the script.


Tested in Freebuff Desktop 0.0.184 on 2026-10-30.

Related Articles