Your agent gets the tools. ToolMesh keeps the keys.
ToolMesh is a self-hosted MCP gateway. Claude, ChatGPT and other MCP clients connect to one endpoint and call tools from GitHub, NetBox, Stripe, Zammad or your own REST API. ToolMesh holds the API keys, checks for every call whether the caller may make it, and writes each call to an audit log.
REST APIs come in through DADL files, a few lines of YAML per endpoint that an LLM can write for you. Existing MCP servers, over HTTP or stdio, sit behind the same endpoint.
4,591 tools across 36 APIs in the DADL registryAPI keys stay on the serverAuthorization on by defaultAn audit entry for every callREST APIs and MCP serversApache 2.0Self-hosted
In the registry today
36 APIs already described as DADL files.
4,591tools
One tool is one API action: list a repo, create an invoice, reboot a server. Each backend is one YAML file; ToolMesh serves them all behind one endpoint.
An MCP client that talks to five systems usually holds five API keys in its configuration, and every agent that uses the client may call every tool those keys open. An MCP server offers the endpoints its author chose; when you need another one, you wait for a release or fork the server. And when an agent did something unexpected, the question “which tool did it call, with which parameters?” often has no answer.
ToolMesh moves the keys, the permissions and the record of calls into one service you run yourself.
What you get
๐
One endpoint for many backends
REST APIs through DADL files and existing MCP servers over HTTP or stdio. Tools are named <backend>_<tool>, for example github_list_issues.
๐
API keys stay on the server
ToolMesh reads them from its environment, or from a command such as a sops decryption, and adds them to the request at call time. They appear neither in prompts nor in the client configuration.
๐
Authorization from the first start
OpenFGA runs inside ToolMesh. Grants name users, roles, plans or companies and allow all tools, a backend, single tools or an access class such as read. Tool listings show each caller only what it may call.
๐
An audit entry for every call
Who called which tool with which parameters, how long it took and how it ended. Structured log lines by default; with AUDIT_STORE=sqlite a database you query with SQL.
๐ป
Code Mode
The model sees two tools, discover_tools and execute_code, looks up the signatures it needs and writes short JavaScript that makes several calls in one round trip. In the DADL paper, advertising 1,833 tools took about 142,000 tokens; the two Code Mode tools take about 1,000.
๐ก๏ธ
Optional JavaScript policies
A policy checks a call before it runs and filters its result, for example to redact personal data. None is active until you add one; examples ship with ToolMesh.
A REST API becomes tools with a few lines of YAML per endpoint.
A DADL file describes a REST API as MCP tools. It also declares how the API authenticates (bearer token, API key, OAuth2, session login), how it pages and when to retry. ToolMesh does the HTTP work.
Prompt“Create a DADL for the Hetzner Cloud API: list servers, create server, delete server”
โ
ResultA hetzner-cloud.dadl with three tools. Test it against the real API before you rely on it.
The DADL registry has descriptions for 36 APIs. For others, ask an LLM that knows the DADL spec. ToolMesh does not check a DADL an LLM wrote, so try new tools with a throwaway account or test data first.
Four APIs as four MCP servers, and the same four as DADL files behind ToolMesh:
MCP servers
Existing MCP servers sit behind the same endpoint.
ToolMesh also runs without DADL. Add an MCP server you already operate toconfig/backends.yaml, over HTTP or stdio, and its tools go through the same authorization, credential handling, policies and audit log.
The DADL specification is published under CC BY-SA 4.0. Write your own files, version them in git, share them, fork them.
Files on your own server.
ToolMesh reads .dadl files from its dadl/ directory. The daily usage statistics carry only a hash of each file, and one line in .env switches them off.
No runtime dependency on dadl.ai.
dadl.ai is a catalog you can copy files from. ToolMesh does not call it at runtime. Mirror the files, or write your own.
Optional.
ToolMesh also runs with MCP servers only. DADL is one of two ways in.
An API key in apikeys.yaml can carry a caller ID, and an OAuth client is identified by its client ID. config/caller-classes.yaml maps caller IDs to classes; an ID that matches no pattern is untrusted. Policies read the class. The example policypii_protection.js masks by class as shown below. It is inactive until you copy it intoconfig/policies/.
Caller class
What pii_protection.js masks in a result
trusted
AWS keys and API tokens
standard
Credit card numbers, US social security numbers, AWS keys and API tokens
untrusted and any other class
All of the above, plus email addresses, phone numbers and IPv4 addresses
A person grants the rights for one task. And signs the grant.
Grants cover the daily work. For the task that needs more, an agent asks for a kit: a named bundle of tools with a time limit, defined by you in config/authz.yaml. The request becomes a link. The person who approves it signs a statement of exactly what is granted, with a key that never leaves their browser. ToolMesh verifies the signature, keeps it with the statement in the audit trail, and the grant ends by itself.
The agent asks once.tell_me_my_rights names the tools a task lacks and the kit that covers them; request_grant answers with the link and a fingerprint, also from inside execute_code.
The approval is a signature by the approver.A plain-text statement (BIP-322) names the request, the entries granted, the duration and the requester. ToolMesh holds the address, never the key. Approve part of a kit, or for less time.
The audit trail keeps the proof.Address, signature and statement of every approval, and for every call under a kit, which kit applied and which gate policies it replaced. Verifiable later by anyone with the log.
Where it ends.A grant expires or is revoked. Denies in authz.yaml win over every kit, and parameter filters marked enforce-with-kit still run.
Connect Claude Desktop, Claude Code or ChatGPT to the public demo at demo.toolmesh.io. It serves two Hacker News backends and needs no API key of yours. The login is dadl / toolmesh.
You need Docker with Docker Compose and a free port, 8123 by default. Claude Code connects over plain HTTP on localhost. Claude Desktop, claude.ai and most other clients accept only HTTPS URLs, so they need a reverse proxy with TLS in front of ToolMesh. The steps below end with a first tool call and use the Hacker News DADL that ships with ToolMesh.
1
Clone the repository
git clone https://github.com/DunkelCloud/ToolMesh.git && cd ToolMesh
2
Create .env and set an API key
cp .env.example .env
In .env, set TOOLMESH_API_KEY, for example to the output of openssl rand -hex 32. Without a password or API key ToolMesh rejects every request.
Save this as config/backends.yaml. The Hacker News API needs no key.
4
Start ToolMesh and check that it answers
docker compose up -d
curl http://localhost:8123/health
5
Connect Claude Code
claude mcp add -t http -H "Authorization: Bearer <YOUR_API_KEY>" -s user toolmesh http://localhost:8123/mcp
6
Ask: “What are the top stories on Hacker News right now?”Claude Code calls hackernews_get_top_stories through ToolMesh, and the audit entry shows up in docker compose logs toolmesh.
It does not terminate TLS. ToolMesh serves plain HTTP; put a reverse proxy in front for anything beyond localhost.
It holds the backends' keys. Each client still signs in to ToolMesh, with OAuth or with an API key that sits in its configuration.
It enforces no policy until you add one. The shipped examples stay inactive.
Its default audit log is write-only. Searching past calls with SQL needs AUDIT_STORE=sqlite.
It speaks REST through DADL, and MCP. Other protocols, such as gRPC, SOAP or direct database access, need an MCP server in front.
It does not check a DADL an LLM wrote. Test new tools against the real API, best with a throwaway account or test data.
An execute_code script makes at most 50 tool calls and runs at most 120 seconds (TOOLMESH_CODE_TIMEOUT).
For platform teams
ToolMesh and DADL as an Enterprise Tool Library
MCP defines how an agent talks to one tool. A company with a four-digit catalog of tools across many backends also needs one place for access rules, one audit trail and one description format that lives in git. The DADL paper calls this an Enterprise Tool Library. ToolMesh and DADL are an open, self-hosted way to build one.
Project statusOpen source · actively developed · version 0.xToolMesh runs in production at Dunkel Cloud. A minor release can still change the configuration; the upgrade notes list what an operator has to adjust.
Maintained byBuilt by Dunkel Cloud GmbHA German cloud-engineering company. Questions or commercial support: contact.
PricingOpen source & self-hosted today.Managed service planned, not announced. No paywalled features, no “enterprise edition” today.
TelemetryAnonymous usage statistics, once a day.A random site ID, the hash of each DADL file, call and error counts per DADL, the number of MCP backends and the version. No user IDs, keys, parameters, URLs or request content. DO_NOT_SEND_ANONYMOUS_STATISTICS=yes switches it off. Details →
ResearchThe design is written up in a paper.DADL and the token measurement for Code Mode (about 142,000 down to about 1,000 for 1,833 tools) are described on arXiv (cs.SE) and archived on Zenodo with a DOI.