0.2.1 • Published 6 months ago

@threedn/mcp-memory-mongo v0.2.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

MCP Memory Server

An MCP server implementation for project memory management, providing tools for managing users, projects, teams, and project elements (requirements, objectives, tasks, and decisions).

Features

  • User Management

    • Create and manage user accounts
    • API key management
    • Role-based access control (admin/member)
  • Project Management

    • Create and manage projects
    • Track project status and metadata
    • Archive and complete projects
  • Team Management

    • Create and manage teams
    • Manage team members and roles
    • Associate projects with teams
  • Project Elements

    • Requirements tracking
    • Objectives and progress monitoring
    • Task management
    • Decision records

Installation

npm install @threedn/mcp-memory-mongo

Configuration

Create a .env file based on .env.example:

cp .env.example .env

Required environment variables:

  • MEMORY_API_URL: Base URL for the Memory API
  • APIKEY: API key for authentication

Optional configuration:

  • Rate limiting settings
  • MongoDB connection details
  • JWT configuration
  • Logging level
  • Caching options

Usage

Starting the Server

npm start

For development:

npm run dev

Available Tools

  1. API Key Management

    • create_api_key: Create a new API key for a user
    • get_api_key_info: Get information about a user's API key
    • delete_api_key: Delete a user's API key
  2. User Management

    • list_users: Get a list of users with filtering and pagination
    • create_user: Create a new user account
  3. Project Management

    • list_projects: Get a list of projects with filtering and pagination
    • create_project: Create a new project
    • update_project: Update an existing project
    • delete_project: Delete a project

Tool Examples

Creating a new user:

{
  "name": "create_user",
  "arguments": {
    "username": "johndoe",
    "email": "john@example.com",
    "password": "securepassword",
    "role": "member"
  }
}

Creating a new project:

{
  "name": "create_project",
  "arguments": {
    "name": "Project X",
    "description": "A new innovative project",
    "team": "team-id-123",
    "metadata": {
      "priority": "high",
      "category": "development"
    }
  }
}

Development

Building

npm run build

Testing

npm test

Linting

npm run lint

Formatting

npm run format

API Documentation

Endpoints

The server interacts with the following API endpoints:

  1. Users

    • GET /api/users
    • POST /api/users
    • GET /api/users/:id
    • PUT /api/users/:id
    • DELETE /api/users/:id
  2. Projects

    • GET /api/projects
    • POST /api/projects
    • GET /api/projects/:id
    • PUT /api/projects/:id
    • DELETE /api/projects/:id
  3. Teams

    • GET /api/teams
    • POST /api/teams
    • GET /api/teams/:id
    • PUT /api/teams/:id
    • DELETE /api/teams/:id
  4. Project Elements

    • GET /api/projects/:id/elements
    • Various endpoints for requirements, objectives, tasks, and decisions

Rate Limiting

  • Window: 15 minutes
  • Maximum requests: 100 per window
  • Status code 429 returned when limit exceeded

Error Handling

All errors follow the format:

{
  "success": false,
  "error": "Error message",
  "details": {}
}

Common status codes:

  • 400: Bad Request
  • 401: Unauthorized
  • 404: Not Found
  • 409: Conflict
  • 429: Too Many Requests
  • 500: Internal Server Error

Contributing

Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

0.2.1

6 months ago

0.2.0

6 months ago

1.0.0

6 months ago