Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@focus-mcp/cli

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@focus-mcp/cli

Focus your AI agents on what matters. 68+ bricks, 1 MCP server, modular context — from 200k to 2k tokens. Works with Claude Code, Cursor, Codex.

Source
npmnpm
Version
2.2.1
Version published
Weekly downloads
207
-51.06%
Maintainers
1
Weekly downloads
 
Created
Source

@focus-mcp/cli

Focus your AI agents on what matters. Measured savings: 65.9% on output tokens across 29 bricks (details).

npm License: MIT CI Built with Claude Code

What

FocusMCP is an MCP (Model Context Protocol) orchestrator. Instead of giving your AI agent ALL your tools at once — polluting its context window — you compose bricks: atomic MCP modules that load on demand.

  • 68+ official bricks covering files, code intel, git, shell, reasoning, search, and more
  • One CLI, one MCP server, modular capabilities
  • Works with Claude Code, Cursor, Codex, Gemini CLI, any MCP-compatible AI

Install

npm install -g @focus-mcp/cli

Or via the Claude Code native plugin:

Install for Claude Code

Option 1 — Two lines (works today)

/plugin marketplace add focus-mcp/cli
/plugin install focus-mcp@focus-mcp-cli

Option 2 — Manual MCP add

claude mcp add focus-mcp npx @focus-mcp/cli start

(Official single-liner /plugin install focus-mcp@claude-plugins-official coming once Anthropic accepts the submission.)

Requires Node.js ≥ 22.

Quick start

Add FocusMCP as an MCP server in your AI client config:

{
    "mcpServers": {
        "focus": {
            "command": "npx",
            "args": ["-y", "@focus-mcp/cli", "start"]
        }
    }
}

For Claude Code specifically, this is already wired via the native plugin above.

Then browse and manage bricks:

focus browse          # Interactive TUI — browse, search, install/uninstall bricks
focus search git      # Search the catalog for bricks matching "git"
focus add echo        # Install the "echo" brick
focus list            # Show all installed bricks
focus info echo       # Show details for a specific brick

Commands

CommandDescription
focus listList installed bricks (reads ~/.focus/center.json)
focus info <name>Show details for a brick (version, catalog, config)
focus startLaunch FocusMCP as an MCP server over stdio
focus add <name>Install a brick from the catalog
focus remove <name>Uninstall a brick
focus search <query>Search the catalog
focus catalogShow and manage catalog sources
focus browseInteractive TUI browser (see below)

Interactive TUI — focus browse

focus browse opens a full-screen terminal interface to explore, search, and manage bricks without leaving your terminal.

┌─ Bricks (68) ────────────────┬─ echo ───────────────────────────────────┐
│ > echo              ✓        │                                          │
│   indexer                    │  A simple echo brick for testing.        │
│   shell                      │                                          │
│   git-log                    │  Version   ^1.0.0                        │
│   web-search                 │  Source    @focus-mcp/echo               │
│   …                          │  Status    installed                     │
│                              │                                          │
│  / search  i install         │  [i] Install   [u] Uninstall             │
│  ↑↓ nav    Enter open        │  [?] Help                                │
└──────────────────────────────┴──────────────────────────────────────────┘

Keybindings:

KeyAction
/ Navigate the brick list
EnterOpen brick details
/Search / filter
iInstall selected brick
uUninstall selected brick
?Toggle help overlay
q / EscQuit

Filtering exposed tools

By default, focus start exposes all tools from every loaded brick plus the focus management tools (focus_*). You can hide specific tools using a blacklist.

Per-launch: --hide

# Hide a single tool
focus start --hide=sym_get

# Hide an entire family with a glob
focus start --hide="focus_*"

# Hide multiple patterns (comma-separated)
focus start --hide="sym_get,ts_cleanup"

Patterns support a trailing * glob (focus_* matches focus_install, focus_list, etc.). Exact names are also accepted.

Note: focus_tools is always visible regardless of the hidden list, so you can always manage tool visibility from within your AI client.

Persistent config: ~/.focus/config.json

Add a tools section to persist filters across sessions:

{
    "tools": {
        "hidden": ["sym_get", "fo_delete"],
        "alwaysLoad": ["ts_index"]
    }
}

CLI flags override the config file. If neither is set, all tools are exposed (default).

Add --pin=<patterns> to mark tools as always-loaded (surfaced as _meta.anthropic/alwaysLoad: true in MCP responses):

focus start --pin="ts_index,sym_find"

Manage from the terminal: focus tools:

focus tools:list               # show current hidden + alwaysLoad lists
focus tools:hide sym_get       # add sym_get to the hidden list
focus tools:hide "focus_*"     # hide an entire family (glob)
focus tools:show sym_get       # remove sym_get from the hidden list
focus tools:pin ts_index       # mark ts_index as alwaysLoad
focus tools:unpin ts_index     # remove ts_index from alwaysLoad
focus tools:clear              # reset both lists

# Legacy aliases (permanent, no deprecation):
focus filter list
focus filter hide sym_get

Changes are written to ~/.focus/config.json and take effect on the next focus start.

From your AI client: focus_tools MCP tool

The focus_tools MCP tool lets your AI agent manage tool visibility directly:

focus_tools action=hide   pattern=sym_get
focus_tools action=show   pattern=sym_get
focus_tools action=pin    pattern=ts_index
focus_tools action=unpin  pattern=ts_index
focus_tools action=list
focus_tools action=clear

Restart focus start (or reload your MCP client) to apply changes.

Architecture

AI client (Claude Code, Cursor, Codex, …)
       │ stdio (JSON-RPC / MCP)
       ▼
@focus-mcp/cli  (this package)
  ├─ @modelcontextprotocol/sdk  StdioServerTransport
  ├─ @focus-mcp/core            Registry + EventBus + Router + brick loader
  └─ ~/.focus/center.json       user brick declarations

Bricks are atomic MCP modules. Each brick exposes exactly one domain of tools to the AI agent. You declare which bricks you want in ~/.focus/center.json; FocusMCP loads them on demand when focus start is called.

Why not give the agent all tools at once? Because a 200k-token context window filled with hundreds of tool descriptions leaves very little room for actual work. FocusMCP keeps the agent's context lean — ~2k tokens for the orchestrator itself — and loads domain-specific tools only when needed.

AI-assisted development

FocusMCP was built with heavy Claude Code assistance — its architecture, implementation, docs, and tests have all been co-authored with AI. We embrace this openly because:

  • Transparency matters — we'd rather disclose it than pretend otherwise
  • AI tooling is the context — we're building tools for AI agents, it makes sense to use them
  • Quality over origin — what matters is that the code is tested, reviewed, and working

Your AI-assisted contributions are welcome. We don't require you to hide the fact that Claude, Copilot, Cursor, or any other tool helped you. What we do expect:

  • Tests pass, code is typed, lint is green
  • You've read the diff and understand what the PR does
  • Conventional Commits, clear PR description
  • You can explain your design choices during review

See CONTRIBUTING.md for the full guidelines.

License

MIT

Keywords

mcp

FAQs

Package last updated on 01 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts