Building block 10 · Going further
Sharing outward
One line on a tool lets other AI apps on the same computer use it, starting with Claude Code. They run your tool through Charlie, with the same settings, data and file access a Charlie conversation gets.
What you'd use it for
- Let Claude Code query the same database Charlie uses.
- Build a tool once and use it from both Charlie and your coding sessions.
- Keep one copy of your settings and sign-ins, in Charlie, instead of setting each app up separately.
In your manifest
From the sqlite extension. All three of its tools are shared this way, and so are the three tools in hub-database.
{
"name": "sqlite",
"tools": [
{
"name": "query",
"description": "Run SQL against the local SQLite database...",
"handler": "./handlers/query.js",
"mcp": true
},
{
"name": "describe",
"description": "Look at the database's structure...",
"handler": "./handlers/describe.js",
"mcp": true
}
]
}What each part means
| Field | What it does |
|---|---|
mcp | Set on a tool. true also offers the tool through Charlie's MCP server. Off unless you set it. |
Turning it on
Mark the tool
Add
"mcp": trueto the tool, then restart Charlie so it reads the change.Switch on the server
In Charlie, open Settings > Tool use and tick Serve extension tools over MCP. This takes effect straight away. It is off until you turn it on.
Register Charlie once
The same section shows a
claude mcp addcommand. Copy it and run it in a terminal. Claude Code then lists your tools under the server namecharlie, with the same names Charlie uses, such assqlite__query.
Things to know
- Some tools are never shared. A tool that needs the person mid-call is left out even with
"mcp": true: one with a modal, popover or chat-replacementui, one markedconfirm, or one that belongs to a top-bar view's own thread. There's no Charlie conversation to show a prompt in. A tool that opens awindowcan still be shared. - Charlie has to be running. While it's closed, Claude Code sees an empty tool list and a clear error. Tools reappear on their own once Charlie starts, without restarting Claude Code.
- This computer only. The server only accepts connections from the same machine. claude.ai and other cloud apps can't reach it.
- Your instructions go too. For each extension with a shared tool, Claude Code receives the same
"instructions"text Charlie's model gets. - You can tell who called.
ctx.calleris'mcp'for a call from Claude Code and'charlie'otherwise. It's meant for things like a history log. The tool should behave the same either way. The sqlite extension uses it this way. - Share on purpose. Most tools assume a Charlie conversation. bash keeps its tools unshared, since Claude Code has its own shell.
See it in
None of the five examples on this site shares its tools. Two installed extensions do: sqlite and hub-database.
Every field in detail: mcp in the reference.