# tctc-mcp [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/kofujimura/tctc-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 459  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/tctc-mcp

## Description
ERC-7303 token-controlled roles for AI agents: grant, check, and revoke permissions on-chain

## Tools
Capabilities this server exposes over MCP:

- **whoami** — This agent's own EOA (from `.env.local`) + a signed dashboard link
- **list_roles** — Configured roles and their control tokens
- **check_role** — Does an account hold a role? (live `balanceOf`, with evidence)
- **check_all_roles** — Session-start self-assessment across all roles
- **discover_roles** — Introspect **any** contract via `IERC7303` — no role config needed
- **resolve_agent** — ERC-8004 `agentId` → owner / agentURI / agentWallet / ERC-6551 TBA
- **grant_role** — Mint the control token to a subject
- **revoke_role** — Burn the subject's control token — the kill switch

## Claude Desktop Quick Installation
Install path inferred — verify against the README before running it. Uses `npx` (confidence: medium):

```json
"mcpServers": {
  "tctc-mcp": {
    "command": "npx",
    "args": ["-y","tctc-mcp","--config","<config>"],
    "env": {
      "TCTC_ADMIN_PRIVATE_KEY": "",
      "TCTC_AGENT_PRIVATE_KEY": "",
      "TCTC_AGENT_NAME": "",
      "TCTC_DASHBOARD_URL": ""
    }
  }
}
```

**Requires environment variables:** `TCTC_ADMIN_PRIVATE_KEY`, `TCTC_AGENT_PRIVATE_KEY`, `TCTC_AGENT_NAME`, `TCTC_DASHBOARD_URL` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What tctc-mcp does

tctc-mcp lets an MCP-compatible agent inspect and manage permissions represented by ERC-7303 control tokens. A token held by an account represents access to a configured role, so the agent can determine whether an address is authorized by querying the relevant contract on-chain. Administrative deployments can also issue or destroy those tokens, making `grant_role` and `revoke_role` the permission-management operations.

The server can identify the agent through an EOA private key stored in the working directory. Its address becomes the default subject for self-assessment, while a signed dashboard link lets a human inspect the agent and its held control tokens. ERC-8004 `agentId` values can be resolved to an owner, agent URI, agent wallet, and ERC-6551 Token Bound Account.

## How it works

Run the published package through its `tctc-mcp` executable and provide a JSON configuration. Read-only operation registers the inspection and discovery tools. Admin operation additionally registers role issuance and revocation, provided the issuer key is supplied through `TCTC_ADMIN_PRIVATE_KEY`.

Role checks use live contract state. Configurations may identify control tokens directly, or name a target contract that supports IERC7303 so the server can obtain the target’s role and token information. `discover_roles` performs this inspection for an arbitrary address without requiring a role entry in the configuration. Non-IERC7303 contracts can use static control-token settings instead.

Expiring control tokens provide automatic, transaction-free expiry: after the expiry timestamp, `balanceOf()` returns zero and the permission is no longer effective. An issuer can still burn the token before that time for immediate revocation.

## Setup and configuration

The package can be launched without cloning or building:

```bash
npx -y tctc-mcp --config path/to/config.json
```

A secret-free Sepolia example configuration is available from the project’s examples. MCP clients can register the command as a stdio server, and applications can spawn the supported executable through `npx --no-install tctc-mcp` or the installed `node_modules/.bin/tctc-mcp` entry point.

Initialize an agent identity from its working directory with:

```bash
npx -y tctc-mcp agent init --name "Alice"
```

This creates a mode-0600 `.env.local` containing the agent key. Keep that file out of version control. The agent key derives the EOA and signs the dashboard link; it is not used to sign blockchain transactions. Administrative credentials must be supplied through the environment, not embedded in configuration files.

## Tools and capabilities

- `whoami` returns the agent EOA and a signed dashboard link.
- `list_roles` shows configured roles and their control tokens.
- `check_role` checks an account’s live role status and returns supporting evidence.
- `check_all_roles` evaluates the agent’s permissions across all configured roles.
- `discover_roles` inspects any address for IERC7303 role information.
- `resolve_agent` maps an ERC-8004 agent ID to related identity and wallet data when identity configuration is enabled.
- `grant_role` mints a role token in admin mode.
- `revoke_role` burns a subject’s role token in admin mode.

Subjects may be raw addresses, ERC-8004 agent IDs, the agent’s own key, or a configured `self` value.

## Limitations and notes

Granting and revoking require admin mode and an issuer private key. The agent private key alone does not authorize transactions. Automatic expiry depends on an expiring control-token contract; it is not a feature added to the target role contract itself. Role discovery depends on IERC7303 support, while older or non-compliant deployments require static control-token configuration. The server communicates through MCP stdio and should be registered with an MCP client or spawned by an MCP-SDK application.

_Full upstream README: https://allmcps.com/mcp/tctc-mcp/readme_

