Jachy MCP Server
A centralized automation hub that provides a unified interface for AI agents to interact with various services, currently featuring Discord forum post creation. It offers an extensible TypeScript architecture designed for easily adding new tool domains and integrating with platforms like Claude Desktop and Cursor.
README
jachy-mcp-server
Personal MCP (Model Context Protocol) server for centralized automation tools. Provides a unified interface so nanobot, Qwen, Cursor, Claude Desktop, and other AI agents can invoke the same set of tools through a single server.
Current tools
| Tool | Domain | Description |
|---|---|---|
discord_create_forum_post |
Discord | Creates a new post in a Discord Forum channel |
Quick Start
Prerequisites
- Node.js ≥ 22
- pnpm ≥ 9
1 — Install dependencies
pnpm install
# or
make install
2 — Configure environment variables
cp .env.example .env
# Open .env and fill in DISCORD_BOT_TOKEN
See .env.example for descriptions and links to obtain each value.
3 — Run in development mode (hot-reload)
pnpm dev
# or
make dev
4 — Build for production
pnpm build # compiles src/ → dist/
pnpm start # runs dist/index.js
# or
make build && make start
Project Structure
src/
├── index.ts Entry point — validates config, creates MCP server, registers tools
├── core/
│ ├── config.ts Centralised env-var config; call validateConfig() at startup
│ └── httpClient.ts Shared fetch wrapper with retry, error formatting, request logging
├── tools/
│ ├── index.ts Single source of truth for allTools[] — only file to edit when adding a domain
│ ├── discord/
│ │ ├── index.ts Exports discordTools[]
│ │ ├── forum.ts discord_create_forum_post tool
│ │ └── helpers.ts Discord REST API helpers (private to this domain)
│ └── _template/
│ ├── index.ts Template domain index
│ ├── exampleTool.ts Template tool — copy & adapt
│ └── HOWTO.md Step-by-step guide for adding a new tool domain
└── types/
└── index.ts ToolDefinition interface and shared types
tests/
└── tools/
└── discord/
└── forum.test.ts Unit tests for discord_create_forum_post
Adding a New Tool Domain
Full walkthrough:
src/tools/_template/HOWTO.md
TL;DR — three steps, zero changes to src/index.ts:
Step 1 — Create your domain folder
cp -r src/tools/_template src/tools/github
mv src/tools/github/exampleTool.ts src/tools/github/createIssue.ts
Step 2 — Implement your tool
Edit createIssue.ts:
import { z } from 'zod';
import { type ToolDefinition } from '../../types/index.js';
import { config } from '../../core/config.js'; // ← env vars here
import { httpRequest } from '../../core/httpClient.js'; // ← HTTP here
const Schema = z.object({ repo: z.string(), title: z.string() });
export const githubCreateIssueTool: ToolDefinition = {
name: 'github_create_issue',
description: '...',
inputSchema: { type: 'object', properties: { ... }, required: ['repo', 'title'] },
handler: async (input) => {
const { repo, title } = Schema.parse(input);
// … call GitHub API …
return `Issue created: ${url}`;
},
};
Update src/tools/github/index.ts:
import { githubCreateIssueTool } from './createIssue.js';
export const githubTools = [githubCreateIssueTool];
Step 3 — Register in the global registry
Open src/tools/index.ts and add one line:
import { githubTools } from './github/index.js';
export const allTools: ToolDefinition[] = [
...discordTools,
...githubTools, // ← add this
];
Done. No other file needs to change.
Architecture Rules
| Rule | Why |
|---|---|
All env vars through config.* |
Single validation point; tests can override process.env safely |
All HTTP through httpRequest() |
Unified retry, error format, and logging |
| Input validated with Zod in every handler | Type safety at runtime; descriptive errors for the agent |
console.log forbidden; use console.error |
MCP uses stdout for JSON-RPC — any extra stdout breaks the protocol |
Integrating with AI Agents
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"jachy-mcp-server": {
"command": "node",
"args": ["/absolute/path/to/jachy-mcp-server/dist/index.js"],
"env": {
"DISCORD_BOT_TOKEN": "your-token-here"
}
}
}
}
Cursor
Add to your Cursor MCP settings (~/.cursor/mcp.json or workspace .cursor/mcp.json):
{
"mcpServers": {
"jachy-mcp-server": {
"command": "node",
"args": ["/absolute/path/to/jachy-mcp-server/dist/index.js"],
"env": {
"DISCORD_BOT_TOKEN": "your-token-here"
}
}
}
}
nanobot
In your nanobot config file:
{
"mcp_servers": {
"jachy": {
"command": ["node", "/absolute/path/to/jachy-mcp-server/dist/index.js"],
"env": {
"DISCORD_BOT_TOKEN": "your-token-here"
}
}
}
}
Using tsx for development (skip build step)
Replace node dist/index.js with npx tsx src/index.ts in any config above and omit the build step.
Development Commands
pnpm dev # Run with hot-reload (tsx watch)
pnpm build # Compile TypeScript → dist/
pnpm start # Run compiled output
pnpm test # Run tests once (vitest)
pnpm test:watch # Run tests in watch mode
pnpm lint # ESLint
pnpm format # Prettier (writes in-place)
Or use make <command> for any of the above.
Setting Up a Discord Bot
- Go to https://discord.com/developers/applications and create a New Application.
- Under Bot, click Reset Token and copy it to
DISCORD_BOT_TOKENin.env. - Under OAuth2 → URL Generator, select scope
botand permissionSend Messages+Create Public Threads. - Use the generated URL to invite the bot to your server.
- The bot must have View Channel + Send Messages in Threads permissions on the Forum channel.
- Enable Developer Mode in Discord (Settings → Advanced) to right-click channels and copy their IDs.
License
ISC
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。