Skip to content

Commit 50d48b0

Browse files
authored
Merge pull request #16 from IMvision12/mcp
Remove MCP
2 parents 8509410 + b90c2a9 commit 50d48b0

16 files changed

Lines changed: 10 additions & 1992 deletions

README.md

Lines changed: 4 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@ Claude Code, Cursor CLI, OpenAI Codex, Gemini CLI, Kiro CLI, OpenCode, and Ollam
7070

7171
Terminal, process manager, git, file search, HTTP client, environment variables, network diagnostics, cron jobs, and system info all callable by the LLM.
7272

73-
### 18 MCP Servers
74-
75-
Connect GitHub, Brave Search, Puppeteer, PostgreSQL, MongoDB, Redis, Elasticsearch, AWS, GCP, Cloudflare, Vercel, Atlassian, Supabase, CircleCI, Postman, Stripe, ElevenLabs, and Kaggle as external tools via the Model Context Protocol.
76-
7773
### Session Logging
7874

7975
Per-session logs accessible from the TUI. Follow live, view by index, auto-pruned after 7 days.
@@ -125,9 +121,9 @@ docker run -it \
125121
txtcode
126122
```
127123

128-
| Flag | Purpose |
129-
| :--- | :------ |
130-
| `-v $(pwd):/workspace` | Mounts your project directory into the container |
124+
| Flag | Purpose |
125+
| :----------------------------- | :-------------------------------------------------- |
126+
| `-v $(pwd):/workspace` | Mounts your project directory into the container |
131127
| `-v ~/.txtcode:/root/.txtcode` | Persists config, session data, and logs across runs |
132128

133129
> **Note:** API keys are stored securely via your OS keychain when running natively. Inside Docker, txtcode uses an encrypted file-based fallback (`TXTCODE_DOCKER=1` is set automatically). You can also pass keys as environment variables with `-e`, e.g. `-e ANTHROPIC_API_KEY=sk-...`.
@@ -163,7 +159,7 @@ txtcode supports **9 LLM providers** for chat mode. Configure one or more during
163159
| **HuggingFace** | _Discovered at runtime_ | Inference Providers API |
164160
| **OpenRouter** | _Discovered at runtime_ | Unified API for 100+ models |
165161

166-
All providers support tool calling and LLM can invoke any built-in tool or connected MCP server.
162+
All providers support tool calling and the LLM can invoke any built-in tool.
167163

168164
---
169165

@@ -201,52 +197,6 @@ The primary LLM in chat mode has access to **9 built-in tools** that it can call
201197

202198
---
203199

204-
## 📟 MCP Servers
205-
206-
txtcode integrates with the **Model Context Protocol** to connect external tool servers. Configure during initial setup or later via **Configuration** → **Manage MCP Servers** in the TUI.
207-
208-
### Developer Tools
209-
210-
| Server | Transport | Description |
211-
| :--------------- | :-------- | :-------------------------------------------------------- |
212-
| **GitHub** | stdio | Repos, issues, PRs, code search, Actions |
213-
| **Brave Search** | stdio | Web, image, video, and news search |
214-
| **Puppeteer** | stdio | Browser automation, screenshots, form filling |
215-
| **CircleCI** | stdio | Build logs, flaky tests, pipeline status, rerun workflows |
216-
| **Postman** | stdio | Collections, workspaces, API specs, code generation |
217-
| **Stripe** | stdio | Customers, payments, invoices, subscriptions, refunds |
218-
| **ElevenLabs** | stdio | Text-to-speech, voice cloning, audio transcription |
219-
| **Kaggle** | HTTP | Datasets, notebooks, competitions, models, benchmarks |
220-
221-
### Databases
222-
223-
| Server | Transport | Description |
224-
| :---------------- | :-------- | :--------------------------------------------- |
225-
| **PostgreSQL** | stdio | Read-only SQL queries and schema inspection |
226-
| **MongoDB** | stdio | CRUD, indexes, vector search, Atlas management |
227-
| **Redis** | stdio | Data structures, caching, vectors, pub/sub |
228-
| **Elasticsearch** | stdio | Index management, search queries, cluster ops |
229-
| **Supabase** | HTTP | Postgres, Auth, Storage, Edge Functions |
230-
231-
### Cloud
232-
233-
| Server | Transport | Description |
234-
| :--------------- | :-------- | :------------------------------------------------- |
235-
| **AWS** | stdio | S3, Lambda, EKS, CDK, CloudFormation, 60+ services |
236-
| **Google Cloud** | HTTP | BigQuery, GKE, Compute, Storage, Firebase |
237-
| **Cloudflare** | HTTP | Workers, R2, DNS, Zero Trust, 2500+ endpoints |
238-
| **Vercel** | HTTP | Deployments, domains, env vars, logs |
239-
240-
### Productivity
241-
242-
| Server | Transport | Description |
243-
| :------------ | :-------- | :------------------------------------------------ |
244-
| **Atlassian** | HTTP | Jira issues, Confluence pages, Compass components |
245-
246-
> **stdio** = local process, **HTTP** = remote Streamable HTTP endpoint. You can also add custom MCP servers via **Configuration** → **Manage MCP Servers**.
247-
248-
---
249-
250200
## 💬 Chat Commands
251201

252202
Send these commands in any messaging app while connected:
@@ -272,7 +222,6 @@ To modify settings, select **Configuration** from the main menu. Options include
272222
- Change Messaging Platform
273223
- Change Coding CLI Type
274224
- Change AI Provider
275-
- Manage MCP Servers (add/remove/enable/disable)
276225
- Change Project Path
277226
- View Current Config
278227

@@ -327,13 +276,4 @@ Verbose and debug output goes to the log file; the terminal shows only key statu
327276

328277
</details>
329278

330-
<details>
331-
<summary><b>MCP server connection failures</b></summary>
332-
333-
- **stdio servers:** ensure the required npm package is installed (e.g. `npx @modelcontextprotocol/server-github`)
334-
- **HTTP servers:** verify the token is correct via **Configuration** &rarr; **Manage MCP Servers**
335-
- Check **View Logs** for specific error messages
336-
337-
</details>
338-
339279
---

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
"dependencies": {
6060
"@anthropic-ai/sdk": "^0.74.0",
6161
"@google/generative-ai": "^0.24.1",
62-
"@modelcontextprotocol/sdk": "^1.27.1",
6362
"@slack/bolt": "^4.6.0",
6463
"@whiskeysockets/baileys": "^7.0.0-rc.9",
6564
"botbuilder": "^4.23.3",

src/cli/commands/auth.ts

Lines changed: 0 additions & 159 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ import makeWASocket, {
88
} from "@whiskeysockets/baileys";
99
import chalk from "chalk";
1010
import qrcode from "qrcode-terminal";
11-
import type { MCPServerEntry } from "../../shared/types";
1211
import { setApiKey, setBotToken } from "../../utils/keychain";
13-
import { loadMCPServersCatalog, type MCPCatalogServer } from "../../utils/mcp-catalog-loader";
1412
import {
1513
discoverHuggingFaceModels,
1614
discoverOpenRouterModels,
@@ -571,8 +569,6 @@ export async function authCommand() {
571569
console.log(chalk.green(`✅ Configured ${configuredProviders.length} provider(s)`));
572570
console.log();
573571

574-
const mcpServerEntries = await configureMCPServers();
575-
576572
const platform = await showCenteredList({
577573
message: "Select messaging platform: (Use arrow keys)",
578574
choices: [
@@ -851,8 +847,6 @@ export async function authCommand() {
851847
idePort: 3000,
852848
authorizedUser: "",
853849
configuredAt: new Date().toISOString(),
854-
855-
mcpServers: mcpServerEntries,
856850
};
857851

858852
fs.writeFileSync(CONFIG_FILE, JSON.stringify(config, null, 2));
@@ -884,14 +878,6 @@ export async function authCommand() {
884878
console.log(chalk.white(` ${label}: ${provider.provider} (${provider.model})`));
885879
});
886880

887-
if (mcpServerEntries.length > 0) {
888-
console.log(chalk.cyan("\nMCP Servers:"));
889-
mcpServerEntries.forEach((server) => {
890-
const status = server.enabled ? chalk.green("enabled") : chalk.gray("disabled");
891-
console.log(chalk.white(` ${server.id} (${server.transport}) - ${status}`));
892-
});
893-
}
894-
895881
console.log(
896882
chalk.cyan("\nRun ") +
897883
chalk.bold("txtcode") +
@@ -905,151 +891,6 @@ export async function authCommand() {
905891
}
906892
}
907893

908-
async function configureMCPServers(): Promise<MCPServerEntry[]> {
909-
const catalog = loadMCPServersCatalog();
910-
if (!catalog || catalog.servers.length === 0) {
911-
return [];
912-
}
913-
914-
console.log(chalk.cyan("MCP Servers (optional)"));
915-
console.log();
916-
console.log(
917-
chalk.gray("Connect external tools to your AI provider (GitHub, databases, cloud, etc.)"),
918-
);
919-
console.log();
920-
921-
const categoryNames = catalog.categories as Record<string, string>;
922-
const serversByCategory = new Map<string, MCPCatalogServer[]>();
923-
for (const server of catalog.servers) {
924-
const cat = server.category || "other";
925-
if (!serversByCategory.has(cat)) {
926-
serversByCategory.set(cat, []);
927-
}
928-
serversByCategory.get(cat)!.push(server);
929-
}
930-
931-
const selectedServers: MCPCatalogServer[] = [];
932-
const selectedIds = new Set<string>();
933-
934-
let continueSelecting = true;
935-
while (continueSelecting) {
936-
const choices: Array<{ name: string; value: string }> = [
937-
{ name: "Configure later", value: "__SKIP__" },
938-
];
939-
940-
if (selectedServers.length > 0) {
941-
choices[0] = { name: `← Done (${selectedServers.length} selected)`, value: "__SKIP__" };
942-
}
943-
944-
for (const [category, servers] of serversByCategory) {
945-
const label = categoryNames[category] || category;
946-
for (const server of servers) {
947-
if (selectedIds.has(server.id)) {
948-
continue;
949-
}
950-
const transportTag = server.transport === "http" ? " [remote]" : "";
951-
choices.push({
952-
name: `[${label}] ${server.name} - ${server.description}${transportTag}`,
953-
value: server.id,
954-
});
955-
}
956-
}
957-
958-
if (choices.length === 1) {
959-
console.log(chalk.yellow("\nAll available MCP servers have been selected.\n"));
960-
break;
961-
}
962-
963-
const selected = await showCenteredList({
964-
message:
965-
selectedServers.length > 0
966-
? `Add another MCP server: (Use arrow keys)`
967-
: `Select MCP server to connect: (Use arrow keys)`,
968-
choices,
969-
pageSize: 10,
970-
});
971-
972-
if (selected === "__SKIP__") {
973-
if (selectedServers.length === 0) {
974-
console.log();
975-
console.log(
976-
chalk.gray(
977-
"You can configure MCP servers anytime from 'txtcode config' → 'Manage MCP Servers'.",
978-
),
979-
);
980-
console.log();
981-
}
982-
continueSelecting = false;
983-
break;
984-
}
985-
986-
const server = catalog.servers.find((s) => s.id === selected);
987-
if (!server) {
988-
continue;
989-
}
990-
991-
selectedIds.add(server.id);
992-
993-
if (server.requiresToken) {
994-
console.log();
995-
const token = await showCenteredInput({
996-
message: server.tokenPrompt || `Enter token for ${server.name}:`,
997-
password: true,
998-
validate: (input) => input.length > 0 || "Token/credential is required",
999-
});
1000-
await setBotToken(server.keychainKey, token);
1001-
1002-
if (server.additionalTokens) {
1003-
for (const additional of server.additionalTokens) {
1004-
console.log();
1005-
const additionalToken = await showCenteredInput({
1006-
message: additional.tokenPrompt,
1007-
password: !additional.tokenPrompt.toLowerCase().includes("region"),
1008-
validate: (input) => input.length > 0 || "This field is required",
1009-
});
1010-
await setBotToken(additional.keychainKey, additionalToken);
1011-
}
1012-
}
1013-
}
1014-
1015-
selectedServers.push(server);
1016-
console.log();
1017-
console.log(chalk.white(" Connected servers:"));
1018-
for (const s of selectedServers) {
1019-
console.log(chalk.green(` ✅ ${s.name}`));
1020-
}
1021-
console.log();
1022-
}
1023-
1024-
if (selectedServers.length > 0) {
1025-
console.log();
1026-
console.log(chalk.green(`✅ Configured ${selectedServers.length} MCP server(s)`));
1027-
console.log();
1028-
}
1029-
1030-
return selectedServers.map((server): MCPServerEntry => {
1031-
const entry: MCPServerEntry = {
1032-
id: server.id,
1033-
transport: server.transport,
1034-
enabled: true,
1035-
};
1036-
1037-
if (server.transport === "stdio") {
1038-
entry.command = server.command;
1039-
entry.args = server.args ? [...server.args] : undefined;
1040-
1041-
if (server.tokenIsArg && server.keychainKey) {
1042-
entry.args = entry.args || [];
1043-
entry.args.push(`__KEYCHAIN:${server.keychainKey}__`);
1044-
}
1045-
} else {
1046-
entry.url = server.url;
1047-
}
1048-
1049-
return entry;
1050-
});
1051-
}
1052-
1053894
export function loadConfig(): Record<string, unknown> | null {
1054895
if (!fs.existsSync(CONFIG_FILE)) {
1055896
return null;

0 commit comments

Comments
 (0)