TokenHub MCP
Allows performing web searches using the Brave Search API, returning cited results.
Provides web search capability using DuckDuckGo (no API key needed), returning search results.
Provides git operations such as status, diff, log, commit, and branch within the configured workspace.
Allows retrieving repository summaries, issues, pull requests, and workflow runs from GitHub.
Fetches npm registry metadata, latest version, documentation, repository info, and releases for a given package.
Summarizes and clusters Sentry issues, providing impact analysis.
Inspects SQLite database schema and runs safe SELECT queries on a provided base64-encoded database.
Click on "Install 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., "@TokenHub MCPAnalyze the repository and give me an architectural overview."
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.
TokenHub MCP
TokenHub MCP is a production-packaged Model Context Protocol server for coding agents. It keeps the always-loaded MCP surface small, then routes larger file, git, web, database, package, browser, GitHub, and Sentry work through token-budgeted tools, workflows, and tokenhub://resource/... artifacts.
Install
Run without installing:
npx tokenhub-mcp --root /path/to/workspaceInstall globally:
npm install -g tokenhub-mcp
tokenhub-mcp --root /path/to/workspaceFor local development from this repository:
npm install
npm run build
node dist/cli.js --root /path/to/workspaceWhen serving the repository root itself during local development:
node dist/cli.js --root .Quick Start
Start TokenHub with a workspace root that should bound filesystem and git operations:
npx tokenhub-mcp --root /path/to/workspaceThen call the public MCP tool run_workflow with an advertised workflow capability:
{
"name": "resolve_request",
"request": "Inspect this repository and summarize the main architecture, runtime stack, and entry points.",
"depth": "standard",
"evidence": "resource_links",
"execution": "answer_only"
}Large or raw outputs are returned as redacted tokenhub://resource/... handles. Use read_resource to expand snippets, ranges, or full resource content.
Documentation
The README is the quick production reference. The full project docs live under docs/:
Document | Purpose |
Navigation for operators, contributors, and release owners. | |
Runtime layout, tool surface, workflows, resources, and package boundaries. | |
CLI flags, MCP client setup, provider inputs, and environment variables. | |
Install, run, validate, smoke test, troubleshoot, and maintain the service. | |
Workspace confinement, mutation opt-in, credential handling, and network boundaries. | |
Release checklist, verification evidence, npm packaging contract, and rollback notes. |
Public release support files:
CHANGELOG.md records user-facing changes by version.
CONTRIBUTING.md explains local setup, testing, and contribution expectations.
SECURITY.md explains how to report vulnerabilities and what versions are supported.
CODE_OF_CONDUCT.md sets the baseline for community behavior.
MCP Client Configuration
Local package execution with npx:
{
"mcpServers": {
"tokenhub": {
"command": "npx",
"args": ["tokenhub-mcp", "--root", "/path/to/workspace"]
}
}
}Global install:
{
"mcpServers": {
"tokenhub": {
"command": "tokenhub-mcp",
"args": ["--root", "/path/to/workspace"]
}
}
}On Windows, quote paths in your MCP client JSON as a single JSON string, for example "C:\\Users\\you\\project".
Tools
TokenHub exposes exactly six public MCP tools:
Tool | Production status | Purpose |
| Production | Finds deferred internal capabilities without loading every schema into the client context. |
| Production | Runs server-side workflows such as |
| Production | Retrieves token-budgeted context from runtime sources including files, git, web pages, search, databases, GitHub, npm docs, Sentry, and browser state. |
| Production | Reads a |
| Production | Stores caller-provided logs, snapshots, or state summaries as resource artifacts. |
| Production | Estimates tool cost, saved tokens, and whether the operation clears the default ROI threshold. |
The user-facing advertised capabilities in this README are resolve_request, answer_from_web, web_fetch, web_search, filesystem, and git. Those are not separate top-level MCP tools; they are workflows or retrieval capabilities reached through the six public tools above.
Workflows
Workflow | Invoke through | Behavior |
|
| Infers intent, source strategy, output shape, depth, evidence mode, and execution mode from a natural-language request. It supports |
|
| Searches the web, fetches source pages, extracts clean text, and returns cited ranked-list or summary answers with source resource links. |
|
| Runs allowlisted validation commands ( |
|
| Lists a workspace tree by default. Write, move, and delete require the service process to be started with |
|
| Runs bounded git status, diff, show, stage, commit, or branch operations inside the configured workspace. |
|
| Combines git summary and filesystem search into compact project context. |
Example web answer:
{
"name": "answer_from_web",
"query": "top 10 healthiest vegetables",
"target": "ranked_list",
"limit": 10,
"sourceLimit": 5
}Validation example:
{
"name": "validate",
"command": "npm",
"args": ["test"]
}Unsupported workflow modes, including execution: "implement" and execution: "implement_and_verify" for resolve_request, return explicit errors rather than claiming a mutation happened.
Retrieval Sources
retrieve_context.source uses the runtime names shown below. The docs also name friendly advertised sources where they differ.
Documented source | Runtime source | Required configuration | Supported operations | Optional-provider errors |
|
|
| Search workspace files, return redacted snippets and resource links | Missing matches return empty results; workspace escape attempts are rejected. |
|
|
| Summarize status, recent commits, diff stats, and raw log resource | Non-repositories return warnings instead of raw git floods. |
|
|
| Fetch and scrape one web page with timeout and optional raw resource | Missing |
|
|
| Search Brave, Exa, Tavily, SerpAPI, or no-key DuckDuckGo fallback | Provider-specific modes error when the required API key is absent. |
|
|
| Summarize repo, issues, PRs, and workflow runs | Missing owner/repo errors; private or rate-limited repos need a token. |
|
|
| Inspect schema and safe | Missing database bytes errors; non-SELECT queries return warnings and no rows. |
|
|
| Inspect public schema and safe | Missing connection string errors; auth/network failures come from |
|
|
| Fetch npm registry metadata, latest version, docs, repository, and releases link | Missing package/query errors; registry HTTP failures include status. |
|
|
| Summarize and cluster issue impact | Missing issues or organization/token errors; Sentry API HTTP failures include status. |
|
|
| Capture title, headings, links, form controls, console errors, failed requests, and optional screenshot | Missing URL errors; navigation timeout is currently 20000ms. |
Environment Variables
Variable | Used for |
| Selects Brave as the default |
| Selects Exa as the default search provider when Brave is not set. |
| Selects Tavily as the default search provider when Brave and Exa are not set. |
| Selects SerpAPI as the default search provider when the other keyed providers are not set. |
| When set to |
| When set to |
GitHub tokens are supplied as retrieve_context input token; there is no dedicated GitHub environment variable in the runtime. Sentry tokens are supplied as token, Postgres uses connectionString, npm registry lookup uses the public registry URL, and browser capture uses local Playwright without a credential variable. Network timeouts are currently fixed in code: web fetch and DuckDuckGo search use 5000ms, browser navigation uses 20000ms, git commands use 10000ms, and validation commands use 120000ms.
Security Notes
TokenHub confines filesystem paths to the configured --root workspace and rejects path escapes, including symlink-realpath escapes for mutation targets. File snippets and stored file resources redact secret-looking values before model-facing output.
File deletion and mutation are opt-in. filesystem_action tree is available by default, but write, move, and delete require TOKENHUB_ENABLE_FS_MUTATIONS=true on the TokenHub process; use it only in trusted local workspaces.
Git operations run in the workspace and can stage, commit, or branch when explicitly requested through git_action. Review paths and messages before allowing agent-driven git changes.
Network fetches, search providers, GitHub, npm, Sentry, Postgres, and browser capture can contact external services. Web and browser retrieval reject localhost, private LAN, metadata, and unverified DNS targets by default; set TOKENHUB_ALLOW_PRIVATE_NETWORK=true only for trusted local network debugging. Treat URLs, credentials, connection strings, and returned third-party content as sensitive. Do not place secrets in prompts when they can be passed as tool input, and prefer resource links over copying raw logs into chat.
read_resource can expand redacted resources; screenshots may still contain visible secrets from the captured page. Share resource URIs only with clients that should have access to the workspace resource store.
Troubleshooting
Symptom | Fix |
Missing search credentials | Use no-key DuckDuckGo fallback by omitting |
GitHub, Sentry, or Postgres credential errors | Pass |
Blocked network or provider timeout | Check outbound HTTPS access to the provider URL. Web fetch/search timeouts are currently fixed at 5000ms. |
Package install issues | Use Node 20 or newer, then retry |
Windows path quoting | In MCP JSON, write paths as one escaped string such as |
Unsupported workflow mode | Use |
Filesystem mutation blocked | Restart TokenHub with |
Release Verification
Run the production release gate:
npm run verify:releaseThe script expands to:
npm run lint
npm test
npm run build
npm run eval:resolve-request
npm run eval:resolve-request:live
npm pack --dry-run
npm run smoke:installEval artifacts are written under artifacts/evals. The live eval uses live DuckDuckGo search and page fetches, so failures can reflect network or provider volatility.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Gravitied/tokenhub'
If you have feedback or need assistance with the MCP directory API, please join our Discord server