{"id":31530530,"url":"https://github.com/damassi/agent-chat-cli","last_synced_at":"2025-10-04T01:28:01.305Z","repository":{"id":317596432,"uuid":"1068037110","full_name":"damassi/agent-chat-cli","owner":"damassi","description":"An agent chat CLI built on top of the new Claude Agent SDK","archived":false,"fork":false,"pushed_at":"2025-10-01T20:50:07.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-01T22:10:20.370Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/damassi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-01T18:57:49.000Z","updated_at":"2025-10-01T20:50:10.000Z","dependencies_parsed_at":"2025-10-01T22:10:37.961Z","dependency_job_id":"e8b606ac-3ff5-4649-bb00-39ec22343551","html_url":"https://github.com/damassi/agent-chat-cli","commit_stats":null,"previous_names":["damassi/agent-cli"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/damassi/agent-chat-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damassi%2Fagent-chat-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damassi%2Fagent-chat-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damassi%2Fagent-chat-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damassi%2Fagent-chat-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/damassi","download_url":"https://codeload.github.com/damassi/agent-chat-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damassi%2Fagent-chat-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278254182,"owners_count":25956593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-03T02:00:06.070Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-04T01:27:59.493Z","updated_at":"2025-10-04T01:28:01.297Z","avatar_url":"https://github.com/damassi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Agent Chat CLI\n\nA bare-bones, terminal-based chat CLI built to explore the new [Claude Agent SDK](https://docs.claude.com/en/api/agent-sdk/overview). Terminal rendering is built on top of [React Ink](https://github.com/vadimdemedes/ink).\n\nThe app has three modes:\n\n- Interactive terminal app which communicates with LLM directly.\n- Interactive terminal app _as a stand-alone MCP client_ with no direct LLM communication, serving as a frontend to the agent or other MCP servers.\n- Stand-alone MCP server which clients can connect to, without TUI.\n\nThe agent, including MCP server setup, is configured in [agent-chat-cli.config.ts](agent-chat-cli.config.ts).\n\nThe MCP _client_ is configured in [mcp-client.config.ts](mcp-client.config.ts).\n\nhttps://github.com/user-attachments/assets/00cfb9b6-ac65-4b95-8842-28ad0414ffd9\n\n### Why?\n\nThis addresses a gap I’ve noticed in the ecosystem, where spinning up conversational LLM interfaces often comes with a lot of overhead. For example:\n\n- One shouldn’t need to use VS Code, Claude, or Claude Code to interact with MCP servers, with all their abundance of features.\n- How does one fine-tune behavior without expanding already long CLAUDE.md scripts (and similar configuration files)?\n- What if the MCP server you’re interacting with is already an agent connected to an LLM? In that case, you incur a double tax - both in terms of latency and token expense - where responses are computed on the server and then re-computed by the client LLM. [MCP Sampling](https://modelcontextprotocol.io/specification/2025-06-18/client/sampling) is not yet widely supported.\n- It’s hard to find lightweight, terminal-based chat UIs, and even harder to find terminal-based MCP _clients_, disconnected from an LLM.\n\nThis project aims to simplify things. It can run as an agent with simple UX, connected to an LLM, or as a stand-alone MCP pass-through client, sharing the same UX architecture, which communicate with an external MCP endpoint or stdio server to avoid double spends.\n\n### Setup\n\n1. Install dependencies:\n\n```bash\nbun install\n```\n\n2. Configure environment variables:\n\n```bash\ncp .env.example .env\n```\n\nThen edit `.env` and fill in the required values.\n\n3. Update `agent-chat-cli.config.ts` with MCP data-sources. System prompts for data-sources live in `src/prompts`.\n\nOAuth support works out of the box via `mcp-remote`:\n\n\u003cimg width=\"336\" height=\"191\" alt=\"Screenshot 2025-10-03 at 11 57 58 AM\" src=\"https://github.com/user-attachments/assets/1f138a05-7a05-4629-ac83-08a2a34519f2\" /\u003e\n\nSee the config above for an example.\n\n### Usage\n\n#### Interactive Agent Mode\n\nRun the agent in interactive terminal mode:\n\n```bash\nbun start\n```\n\nYou'll see a prompt where you can type your questions or requests.\n\nType `exit` to quit.\n\n#### Interactive MCP Client\n\nTo run as an MCP client (connecting to an MCP server):\n\n```bash\nbun start:client\n```\n\nBy default it will launch the MCP stdio server in the background (ie, `bun server`).\n\nConfigure the MCP server connection in `mcp-client.config.ts`. HTTP is also supported.\n\n#### MCP Server Mode\n\nRun as a stand-alone MCP server, using one of two modes:\n\n```bash\nbun server\nbun server:http\n```\n\nThe server exposes an `ask_agent` tool that other MCP clients can use to interact with the agent. The agent has access to all configured MCP servers and can use their tools.\n\n### Configuration\n\nMCP servers and system prompts are configured in `agent-chat-cli.config.ts`.\n\nTo add specific instructions for each MCP server, create a markdown file in `src/prompts` and reference it in `agent-chat-cli.config.ts`:\n\n```ts\nconst config = {\n  mcpServers: {\n    fooServer: {\n      command: \"npx\",\n      args: [\"...\"],\n      prompt: getPrompt(\"my-prompt.md\"),\n    },\n  },\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamassi%2Fagent-chat-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamassi%2Fagent-chat-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamassi%2Fagent-chat-cli/lists"}