File size: 5,497 Bytes
a8f4b72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# ProjectOS MCP Adapter Library

`bootstrap.xml` is the source of truth for MCP server entries and named profiles. `pnpm generate` compiles those sections into `generated/registries/mcp.json` and `generated/registries/mcp-profiles.json`; generated files are never edited by hand.

## Discover and load profiles

- `pnpm mcp:profiles` lists the curated adapters, profile membership, access mode, and credential-reference names.
- `pnpm mcp:check workspace` starts the workspace profile, negotiates the MCP stdio handshake, and confirms each server's tools.
- `pnpm mcp:connect workspace` keeps the profile connected until Ctrl+C.
- The library API is exported from `packages/mcp-fabric/src/index.ts`: `loadMcpLibrary()` loads generated registries, and `connectProfile(name)` connects all servers selected by that profile.

Enabled profiles are `workspace` (filesystem and persistent memory), `research` (public fetch plus read-only GitHub), `implementation` (workspace files plus read-only GitHub), and `database-readonly` (a saved PostgreSQL read-only keyring profile). `database-write` and GitHub write access stay disabled in the bootstrap manifest. The Git adapter entry is catalogued but disabled until a repository root is configured.

## Adapter catalog

| Adapter | Default auth | Upstream | Runtime | Credentials and limits |
| --- | --- | --- | --- | --- |
| filesystem | none | [MCP filesystem server](https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem) | `npx @modelcontextprotocol/server-filesystem@2.1.0` | Limited to `PROJECTOS_MCP_FILESYSTEM_ROOT` or this ProjectOS directory. |
| github | OAuth + PKCE | [GitHub MCP server](https://github.com/github/github-mcp-server) | Docker image `ghcr.io/github/github-mcp-server:v2.0.3` | Browser authorization by default; no user-managed PAT. Read mode and lockdown are set by the server entry. |
| postgres | OS keyring | [Microsoft PostgreSQL MCP server](https://github.com/microsoft/postgres-mcp) | `npx -y @microsoft/postgres-mcp run` | Selects a saved keyring profile by name. The database role itself must have only read permissions. |
| fetch | none | [MCP fetch server](https://github.com/modelcontextprotocol/servers/tree/main/src/fetch) | `uvx --from mcp-server-fetch==2026.10.28 mcp-server-fetch` | Public web requests; no account token. |
| memory | none | [MCP memory server](https://github.com/modelcontextprotocol/servers/tree/main/src/memory) | `npx @modelcontextprotocol/server-memory@2.0.1` | Persistent data stays in `data/mcp-memory.jsonl`. |
| git | none | [MCP Git server](https://github.com/modelcontextprotocol/servers/tree/main/src/git) | `uvx --from mcp-server-git==2026.10.28 mcp-server-git` | Disabled by default; requires `PROJECTOS_GIT_ROOT` and is restricted to that repository. |

The upstream security release recommends Node.js 24.22.1+ or 26.12.1+ for npm-based servers. On Windows, the filesystem server documents a junction race limitation; keep its allowed root narrow and do not point it at a path writable by an untrusted local process.

## Credential setup

No real credential values are committed or included in generated artifacts. GitHub uses the official Docker server's OAuth login by default: on first use, approve access in the browser; the server holds the resulting token in memory. The official build provides its OAuth app for github.com, so ProjectOS needs no client ID or PAT. The callback is bound to loopback only at port 8085 by default. If you need a different port, set `PROJECTOS_GITHUB_OAUTH_CALLBACK_PORT`. GitHub PAT-based authentication remains an opt-in by changing the server's `authMode` to `environment` and adding a `credentialRef`; no PAT is required for the default profile. See [GitHub's local OAuth instructions](https://github.com/github/github-mcp-server/blob/main/docs/oauth-login.md).

For PostgreSQL, install the server's profile in its OS keyring, then set the non-secret ProjectOS selector to that profile name. For example, the official server supports:

```powershell
npx -y @microsoft/postgres-mcp connection add projectos-readonly "host=HOST user=projectos_reader dbname=DATABASE sslmode=verify-full" --access-mode ro
npx -y @microsoft/postgres-mcp connection set-password projectos-readonly
$env:PROJECTOS_POSTGRES_READ_PROFILE = 'projectos-readonly'
```

Use a database role that is read-only as well as the server's `ro` profile flag. The MCP server is a gateway; the database permissions are the authority boundary. Keep passwords out of command arguments and shell history.

Run `pnpm mcp:connect research` to start the GitHub MCP profile. When a GitHub tool is first used, the official server can direct you through browser OAuth; approve the requested access in GitHub. The OAuth flow uses PKCE and the token is held in memory by the server. For headless use, the official server supports a device-code flow. To opt into a PAT instead, retrieve it from a secret manager into `PROJECTOS_GITHUB_READ_TOKEN` for that process only, set the server to `authMode="environment"` with that `credentialRef`, and run `pnpm mcp:check research`.

## Permission handling

The library rejects tool calls from read-only profiles unless the upstream tool marks itself read-only. Any non-read-only tool requires an explicit `approved=true` argument in the library call. GitHub read-only mode also removes GitHub write tools at the server level. A profile check establishes server connections and discovers tools; it does not execute those tools.