Skip to content
pnsk-labPublic

About

Self-host finance management system

Resources

Stars

26 stars

Watchers

0 watching

Forks

Repository files navigation

Mnie: Finance Management System

Your money.
Your machine

技術者倫理 遵守済み codecov

Self-host finance management for running your own portfolio, trading, API key, OAuth, MCP, and CLI workflows.

Mnie SDK

@repo/client-mnie opens a remote financial workspace. @mnie/sdk provides the same workspace contract locally for directly connected providers.

import { connectMnie } from '@repo/client-mnie'

const workspace = await connectMnie({ baseURL, token })
const valuation = await workspace.invoke('portfolio.valuation.get', { baseCurrency: 'JPY' })
const positions = await workspace.profile('sbi_xxx').invoke('investments.positions.list', {})

Individual profiles implement FinancialProvider; cross-profile aggregation implements FinancialWorkspace. See docs/docs/sdk/workspaces.md for direct, local, and remote usage.

MCP

Connect a Streamable HTTP MCP client to /api/mcp on your Mnie server origin. The legacy /mcp path is also supported. Authenticate through OAuth or an Authorization: Bearer <API_KEY> header. API keys retain their OAuth scopes and trade limits; owner administration requires an owner session.

Start with mnie-workspace-operations, then use mnie-workspace-invoke with operation: "profiles.list". Pass a returned profile ID to mnie-profile-operations and mnie-profile-invoke. MCP uses the same operations as WebSocket RPC.

Apps

  • apps/mnie-app: bundled server plus UI runtime
  • apps/mnie-server: API, OAuth, MCP, RPC, storage, and profile session management
  • apps/mnie-ui: web UI

Packages

  • packages/mnie-types: shared finance SDK interfaces
  • packages/client-mnie: authenticated Mnie connection client
  • packages/mnie-sdk: high-level mnie SDK
  • packages/mnie-cli: CLI using client-mnie
  • packages/auth-bitwarden: Bitwarden Auth Manager
  • packages/provider-sbi-sec: SBI Securities provider
  • packages/provider-mobile-suica: Mobile Suica provider

Install

Before running, setup .env, refering .env.example.

With docker

Docker uses MNIE_KEYRING_BACKEND=sqlite because platform keyrings are not available in headless containers. Set MNIE_KEYRING_SECRET in .env before saving SBI passkeys.

docker-compose.yml:

services:
  mnie:
    image: ghcr.io/pnsk-lab/mnie:latest
    ports:
      - '18787:8787'
    env_file:
      - .env
    volumes:
      - ./data:/app/data

or

docker run --rm -it --name mnie \
  -p 18787:8787 \
  --env-file .env \
  -v "$PWD/data:/app/data" \
  ghcr.io/pnsk-lab/mnie:latest

With Nix

nix run 'github:pnsk-lab/mnie#mnie'

NixOS (systemd)

The flake exports a NixOS module that runs Mnie as a native systemd service:

{
  inputs.mnie.url = "github:pnsk-lab/mnie";

  outputs =
    { nixpkgs, mnie, ... }:
    {
      nixosConfigurations.my-host = nixpkgs.lib.nixosSystem {
        system = "x86_64-linux";
        modules = [
          mnie.nixosModules.systemd
          {
            services.mnie = {
              enable = true;
              runtime = "native";
              envFile = /etc/mnie.env;
            };
          }
        ];
      };
    };
}

Acknowledgment

About

Self-host finance management system

Resources

Stars

26 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages