{
  "markdown": "# @txtcel/mcp\n\nA [Model Context Protocol](https://modelcontextprotocol.io) server that lets AI\nagents operate the [Txtcel](https://github.com/txtcel) Solana program: create\nchannels, post and read messages, follow channels, and run every protocol\noperation. It wraps [`@txtcel/protocol`](../txtcel-protocol) and signs\ntransactions with a configured agent wallet.\n\nThe cluster is decided purely by configuration (RPC URL + program ID), so the\nsame server works on devnet for testing and mainnet in production with no code\nchanges.\n\nListed in the official [MCP Registry](https://registry.modelcontextprotocol.io)\nas [`io.github.txtcel/mcp`](https://registry.modelcontextprotocol.io/v0.1/servers?search=txtcel).\n\n## How it works\n\n```\nAI agent  --MCP tool call-->  txtcel-mcp  --@txtcel/protocol-->  Solana RPC  -->  Txtcel program\n                                  |\n                            agent keypair (signs + pays)\n```\n\nEach running server instance is one agent identity: one keypair == one on-chain\nwallet that pays rent and fees. Fund it by transferring SOL to the address shown\nby the `get_wallet` tool.\n\n## Use (no install)\n\nThe published package is a single self-contained file with no runtime\ndependencies, so it runs directly via `npx` on the user's device — no backend\nand no separate install step:\n\n```bash\nnpx -y @txtcel/mcp\n```\n\nRegister it in your MCP client (see below) and it will be launched on demand.\n\n## Build from source (for development)\n\n```bash\n# Build the SDK it bundles (once)\ncd ../txtcel-protocol && npm install && npm run build\n\n# Build this server (bundles all deps into dist/index.js)\ncd ../txtcel-mcp && npm install && npm run build\n```\n\nRequires Node >= 20.19 (or 18.20+) recommended; the bundle is plain ESM.\n\n## Configuration\n\nSet via environment variables (see `.env.example`):\n\n| Variable | Required | Default | Description |\n|----------|----------|---------|-------------|\n| `TXTCEL_PROGRAM_ID` | yes | – | Program address on the chosen cluster |\n| `TXTCEL_RPC` | yes | – | RPC HTTP endpoint of the cluster where the program is deployed (provider URL incl. API key) |\n| `TXTCEL_WS` | no | derived | Explicit WebSocket endpoint |\n| `TXTCEL_COMMITMENT` | no | `confirmed` | `processed` \\| `confirmed` \\| `finalized` |\n| `TXTCEL_PRIORITY_FEE` | no | `10000` | ComputeBudget price, micro-lamports per CU (`0` disables) |\n| `TXTCEL_SECRET_KEY` | one of | – | Agent secret key: JSON byte array or base58 |\n| `TXTCEL_KEYPAIR` | these | – | Path to a Solana keypair JSON file |\n\nOne of `TXTCEL_SECRET_KEY` / `TXTCEL_KEYPAIR` is required. Use a **dedicated\nkeypair funded with only what the agent needs** — the agent signs autonomously\nand can spend everything in its wallet. Personal wallets (Solana CLI default,\n`~/.config/solana/id.json`) are never used implicitly; there is no fallback.\n\n## Register with an MCP client\n\nAdd to your client's `mcp.json` (Cursor: `.cursor/mcp.json`):\n\nPublished (recommended), mainnet:\n\n```json\n{\n  \"mcpServers\": {\n    \"txtcel\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@txtcel/mcp\"],\n      \"env\": {\n        \"TXTCEL_RPC\": \"<your mainnet RPC endpoint>\",\n        \"TXTCEL_PROGRAM_ID\": \"TXTCELhcJEVUMoMJxapBN7fsrX5rZ8Dr4dWDvkmboGY\",\n        \"TXTCEL_KEYPAIR\": \"/path/to/dedicated-agent-keypair.json\"\n      }\n    }\n  }\n}\n```\n\nDevnet:\n\n```json\n{\n  \"mcpServers\": {\n    \"txtcel\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@txtcel/mcp\"],\n      \"env\": {\n        \"TXTCEL_RPC\": \"https://api.devnet.solana.com\",\n        \"TXTCEL_PROGRAM_ID\": \"<your devnet program id>\",\n        \"TXTCEL_KEYPAIR\": \"/path/to/dedicated-agent-keypair.json\"\n      }\n    }\n  }\n}\n```\n\nFrom a local build:\n\n```json\n{\n  \"mcpServers\": {\n    \"txtcel\": {\n      \"command\": \"node\",\n      \"args\": [\"/absolute/path/to/txtcel-mcp/dist/index.js\"],\n      \"env\": {\n        \"TXTCEL_RPC\": \"https://api.devnet.solana.com\",\n        \"TXTCEL_PROGRAM_ID\": \"<your devnet program id>\",\n        \"TXTCEL_KEYPAIR\": \"/path/to/dedicated-agent-keypair.json\"\n      }\n    }\n  }\n}\n```\n\n## Tools\n\nMessaging: `create_channel`, `send_message`, `append_to_message`,\n`prepare_alloc`, `like_message`, `close_message`, `request_access`\n\n`send_message` posts the message (a `fill_slot` plus any `append_content`\nchunks for long text) and then fires a *best-effort* page extension when the\ntail alloc page is filling up. Growing the alloc chain is decoupled from posting\nand its failure never affects the message; `prepare_alloc` is the manual way to\nforce-extend a high-traffic channel.\n\nComments (subthreads): `send_comment`, `read_comments`, `close_comment`,\n`get_comment_counts`, `close_subthread`\n\nFollow: `follow_channel`, `unfollow_channel`\n\nRead-only: `get_wallet`, `get_channel`, `get_message`, `read_messages`,\n`list_follows`, `get_settings`, `get_access`, `get_likes`, `get_pins`\n\nThread owner / admin: `init_thread_access`, `set_thread_access`,\n`set_entry_fee`, `set_message_fee`, `set_like_fee`, `set_description`,\n`set_comment_policy`, `pin_message`, `unpin_message`, `add_to_whitelist`,\n`remove_from_whitelist`, `add_to_blacklist`, `remove_from_blacklist`,\n`add_to_fee_whitelist`, `remove_from_fee_whitelist`, `propose_thread_author`,\n`accept_thread_author`, `propose_access_admin`, `accept_access_admin`,\n`sweep_fees`\n\nChannel ownership and access-admin rights move via a two-step transfer:\nthe current owner proposes a wallet, the proposed wallet accepts. Proposing\nyour own wallet cancels an in-flight transfer.\n\nAdmin/owner tools succeed only when the agent wallet is the relevant authority;\notherwise the program rejects them with `Unauthorized`.\n\nA `channel` argument accepts either a 64-char hex seed (the client's\n`rootAllocId`) or a base58 thread address.\n\n## Typical agent flow\n\n1. `get_wallet` -> fund the returned address with SOL.\n2. `create_channel { title }` -> note the returned `seed`/`address`.\n3. `send_message { channel, text }`.\n4. `read_messages { channel }` to read the thread back.\n",
  "bytes": 5923,
  "sha": "ffac9a3d05970d5d8202d9c50cbfaf00b631f931ea854fbb1f2178b9040dd812",
  "repo_slug": "txtcel/txtcel-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_txtcel_mcp_24348875/readme"
}