NexusNote MCP Server
Enables debate search and citation functionality through web search, Wikipedia, arXiv, and AWS documentation APIs. Designed to power debate features with comprehensive research and citation tools via MCP protocol.
README
NexusNote MCP Server Scaffold
This directory contains an initial scaffold for the Anthropic Model Context Protocol (MCP) server that will power debate search/citation tooling. The goal is to let the debate feature call a local MCP endpoint while we iterate, and later move this folder into its own repository for dedicated deployment (ECS/App Runner, etc.).
Folder layout
mcp/
Dockerfile # production container image (multi-stage)
.dockerignore # excludes local artefacts from the image build
package.json # npm scripts and dependencies
tsconfig.json # TypeScript compiler options
src/ # MCP server source
index.ts # entry point
config/env.ts # environment variable loader
server/mcp-server.ts # WebSocket server implementing MCP protocol
tools/ # MCP tool definitions and handlers
infrastructure/ # Standalone AWS CDK app (Option A)
package.json
tsconfig.json
cdk.json
bin/mcp-infra.ts
lib/mcp-stack.ts
Running locally
cd mcp
npm install
npm run dev
# or build + run Node output
npm run build
npm run start:websocket
By default the server listens on 0.0.0.0:8080. Configure MCP_HOST and MCP_PORT if you need different bindings.
Required environment variables
| Variable | Description |
|---|---|
SERPAPI_KEY |
API key for SerpAPI (used by search.web). |
LOG_LEVEL |
Optional Pino log level (info by default). |
All other tools (Wikipedia, arXiv, AWS docs) rely on public APIs and do not require keys.
Container image
A production-ready Dockerfile is provided and builds a multi-stage Node.js 20 image. Example build command:
cd mcp
docker build -t nexusnote-mcp .
The runtime stage installs only production dependencies and boots dist/index.js.
Option A — Embedded CDK infrastructure
The infrastructure/ folder contains a standalone AWS CDK v2 application that deploys the MCP server on ECS Fargate behind an Application Load Balancer. The stack builds the container image directly from the mcp/ directory, provisions a VPC with a NAT gateway, and wires Secrets Manager to the runtime (SERPAPI_KEY).
Prerequisites
- Bootstrap the target AWS environment if you have not already:
cd mcp/infrastructure npm install npx cdk bootstrap - Store your SerpAPI key in AWS Secrets Manager (string secret is expected), for example:
aws secretsmanager create-secret \ --name nexusnote/mcp/serpapi \ --secret-string "<YOUR_SERPAPI_KEY>" - Ensure Docker is available locally so CDK can build the image asset.
Deploy
cd mcp/infrastructure
npm install # one-time
npm run build
export SERPAPI_SECRET_NAME=nexusnote/mcp/serpapi
# Optional overrides:
# export STACK_NAME=NexusNoteMcpStack
# export MCP_DESIRED_COUNT=2
# export MCP_FARGATE_CPU=1024
# export MCP_FARGATE_MEMORY=2048
# export MCP_LOG_LEVEL=debug
npm run synth
npm run deploy
Outputs include the Application Load Balancer DNS name and a ws:// URL you can plug into the debate backend.
Stack behaviour
- VPC with two AZs and one NAT gateway (required for outbound internet calls to SerpAPI, Wikipedia, etc.).
- Fargate service with configurable CPU, memory, desired count, and port (defaults: 512 CPU, 1024 MiB, 1 task, port 8080).
- Secrets Manager integration for
SERPAPI_KEY. - CloudWatch Logs group
/nexusnote/mcp/{stackName}retaining logs for 30 days. - ALB health checks accept HTTP status codes
200-499, allowing the WebSocket server’s 426 upgrade response to pass.
Next steps
- Wire the debate backend to call the deployed MCP WebSocket endpoint.
- Add CI/CD to build and push the image automatically (ECR + CDK deploy).
- Expand the test suite to cover each MCP tool’s error handling and API quota limits.
TODO
- [ ] Automate MCP image builds and CDK deploys through CI so the service stays in sync with NexusNote releases.
- [ ] Tighten network access when exposing beyond internal integrations (e.g., restrict the ALB security group or front with a private link).
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。