Sponsored by Deepsite.site

MCP Agent Server

Created By
LeadBroaf6 months ago
Open-source, modular “brain” for AI employees. Integrates with n8n and workflow engines, features persistent agent memory, natural language interface, and feedback loops. SaaS-ready, extensible, and easy to deploy with Docker.
Content

MCP Agent Server

This is the open-source "brain" for AI employees, designed to work with n8n and other workflow engines.

Quick Start

  1. Clone the repo: git clone https://github.com/yourusername/mcp-agent-server.git cd mcp-agent-server

  2. Copy over your docs and memory folders if needed.

  3. Build and run with Docker Compose: docker-compose up --build

  4. The MCP server will be available at http://localhost:4000

Getting Started

  1. Ensure you have Node.js and Docker installed.
  2. Remove any comments from package.json (JSON does not support comments).
  3. Run npm install to install dependencies.
  4. Use docker-compose up --build to start all services.
  5. The server will be available at http://localhost:4000.
  6. For architecture and design, see the /docs and /memory folders and the "mcp-agent-server project plan" in MCP memory.

Project Structure

  • /docs — Design, architecture, and usage documentation
  • /memory — Persistent memory, logs, and knowledge

Project Vision: MCP Agent Server

The mcp-agent-server is an open-source, modular "brain" for AI employees/agents, designed to work seamlessly with n8n and other workflow engines.

  • AI Employee Metaphor:
    Enables users to "hire," "assign," "grade," and "improve" persistent AI agents, each with their own memory, learning, and feedback loop.

  • Opinionated & Agent-Centric:
    Unlike generic workflow automation tools, the MCP agent server is opinionated and focused on the "AI employee" metaphor, making memory, feedback, and learning core features—not optional add-ons.

  • Natural Language Interface:
    Accepts natural language instructions (not just API calls or workflow triggers), parses them into actionable tasks, and orchestrates execution via n8n or other connectors.

  • Proactive, Adaptive, and Personalized:
    Agents can suggest actions, learn from user feedback, and improve over time.

  • Vertical Solutions & Simplicity:
    Supports vertical solutions (e.g., "AI Analyst," "AI Admin") with prebuilt skills, workflows, and feedback loops, as well as a simple, non-technical user experience for SMBs and individuals.

  • Persistent, Agent-Centric Memory:
    Memory and feedback are persistent and agent-centric, enabling agents to remember past actions, user preferences, and performance history.

  • Easy Deployment & Extensibility:
    Designed for easy deployment (Docker, Docker Compose), extensibility (pluggable connectors and skills), and SaaS monetization (multi-tenant, API key management, billing integration).

  • Not Just Another Workflow Tool:
    The MCP agent server is a platform for building, managing, and improving AI employees that work alongside humans, learn from experience, and deliver real business value.

For full design, architecture, and context, see the "mcp-agent-server project plan" entity in MCP memory and the /docs and /memory folders.

API Authentication

All endpoints (except /health, /users/register, and /users/login) require an x-api-key header. API keys are managed per user. See below for user and API key management.

User & API Key Management

Endpoints

  • POST /users/register — Register a new user (email, password)
  • POST /users/login — Login and receive an API key
  • GET /users/me/api-keys — List your API keys
  • POST /users/me/api-keys — Create a new API key
  • DELETE /users/me/api-keys/:id — Revoke an API key

Example PowerShell Usage

# Register a new user
Invoke-RestMethod -Uri "http://localhost:4000/users/register" -Method Post -ContentType "application/json" -Body '{"email": "user@example.com", "password": "yourpassword"}'

# Login and get API key
$login = Invoke-RestMethod -Uri "http://localhost:4000/users/login" -Method Post -ContentType "application/json" -Body '{"email": "user@example.com", "password": "yourpassword"}'
$apiKey = $login.apiKey

# List API keys
Invoke-RestMethod -Uri "http://localhost:4000/users/me/api-keys" -Method Get -Headers @{ "x-api-key" = $apiKey }

# Create a new API key
Invoke-RestMethod -Uri "http://localhost:4000/users/me/api-keys" -Method Post -Headers @{ "x-api-key" = $apiKey }

# Revoke an API key (replace 1 with the actual key id)
Invoke-RestMethod -Uri "http://localhost:4000/users/me/api-keys/1" -Method Delete -Headers @{ "x-api-key" = $apiKey }

Example curl Usage

# Register a new user
curl -X POST http://localhost:4000/users/register -H "Content-Type: application/json" -d '{"email": "user@example.com", "password": "yourpassword"}'

# Login and get API key
curl -X POST http://localhost:4000/users/login -H "Content-Type: application/json" -d '{"email": "user@example.com", "password": "yourpassword"}'

# List API keys
curl http://localhost:4000/users/me/api-keys -H "x-api-key: <your-api-key>"

# Create a new API key
curl -X POST http://localhost:4000/users/me/api-keys -H "x-api-key: <your-api-key>"

# Revoke an API key (replace 1 with the actual key id)
curl -X DELETE http://localhost:4000/users/me/api-keys/1 -H "x-api-key: <your-api-key>"

Agent Memory & Feedback Endpoints

  • POST /agents/:id/memory — Add memory/feedback for an agent.
  • GET /agents/:id/memory — List all memory/feedback for an agent.
  • POST /agents/:id/trigger — Trigger an agent action (stub for n8n integration).

Example PowerShell Usage

$headers = @{ "x-api-key" = "changeme" }

# Create an agent
Invoke-RestMethod -Uri "http://localhost:4000/agents" -Method Post -Headers $headers -ContentType "application/json" -Body '{"name": "Test Agent"}'

# Add memory/feedback
Invoke-RestMethod -Uri "http://localhost:4000/agents/1/memory" -Method Post -Headers $headers -ContentType "application/json" -Body '{"content": "Agent completed onboarding."}'

# List memory/feedback
Invoke-RestMethod -Uri "http://localhost:4000/agents/1/memory" -Method Get -Headers $headers

# Trigger agent
Invoke-RestMethod -Uri "http://localhost:4000/agents/1/trigger" -Method Post -Headers $headers

Example curl Usage

curl -X POST http://localhost:4000/agents/1/memory -H "Content-Type: application/json" -H "x-api-key: changeme" -d '{"content": "Agent completed onboarding."}'
curl http://localhost:4000/agents/1/memory -H "x-api-key: changeme"
curl -X POST http://localhost:4000/agents/1/trigger -H "x-api-key: changeme"

Database Migrations & Schema Management

  • All database migrations are applied automatically on container startup (see docker-entrypoint.sh).
  • To add new models or fields:
    1. Edit prisma/schema.prisma.
    2. Run npx prisma migrate dev --name <desc> locally (with your Docker Postgres running).
    3. Commit the generated migration files in prisma/migrations/ to git.
  • On every deploy or container rebuild, all migrations will be applied automatically.
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Playwright McpPlaywright MCP server
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
DeepChatYour AI Partner on Desktop
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Amap Maps高德地图官方 MCP Server
Tavily Mcp
WindsurfThe new purpose-built IDE to harness magic
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
CursorThe AI Code Editor
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
ChatWiseThe second fastest AI chatbot™
Serper MCP ServerA Serper MCP Server