Block a user
personal-mcp (0.1.0)
Published 2026-05-31 14:29:22 -05:00 by joe
Installation
[registry]
default = "gitea"
[registries.gitea]
index = "sparse+ " # Sparse index
# index = " " # Git
[net]
git-fetch-with-cli = truecargo add personal-mcp@0.1.0About this package
personal-mcp
Lightweight personal MCP server built with the official Rust SDK (rmcp).
Features
host_info: quick local runtime contextappend_note: append chat/note entries to local JSONL channelsread_notes: read recent entries from channelsrun_cmd: run simple local commands (shell operators blocked)baml_test: runbaml-cli test(orbunx @boundaryml/baml test)baml_generate: runbaml-cli generate(orbunx @boundaryml/baml generate)baml_init: runbaml-cli init(orbunx @boundaryml/baml init)baml_analyze_log: one-shot log analysis via localbaml serve+ HTTP function callbaml_analyze_log_stream: stream partial structured log analysis from/stream/*
Storage
- Default context root:
~/.ctx - Notes path:
~/.ctx/chats/<channel>.jsonl - Override with
MCP_CTX_DIR=/custom/path
Run
cd ~/dev/personal-mcp
cargo run
Server uses MCP stdio transport.
Build
cargo build --release
Binary:
./target/release/personal-mcp
BAML integration
The server will try BAML CLI in this order:
baml-clibunx --yes @boundaryml/baml
Examples (through MCP tool calls):
baml_initwith{ "cwd": "/path/to/project" }baml_generatewith{ "cwd": "/path/to/project" }baml_testwith{ "cwd": "/path/to/project", "args": ["--from", "."] }baml_analyze_logwith{ "cwd": "/path/to/project", "log_text": "...raw log..." }
Log parsing scaffold
This repo now includes a BAML scaffold under baml_src:
AnalyzeLogEvent(log_text: string) -> LogEventSummarizeIncident(log_lines: string[]) -> IncidentSummary- Semantic streaming annotations (
@stream.done,@stream.not_null,@stream.with_state)
Helper script:
./scripts/baml-log-lab.sh generate
./scripts/baml-log-lab.sh test
./scripts/baml-log-lab.sh serve
./scripts/baml-log-lab.sh dev
./scripts/baml-log-lab.sh analyze-file ./samples/auth-db-failure.log
./scripts/baml-log-lab.sh stream-file ./samples/auth-db-failure.log
Scaffold generator (profile-driven baml_src):
./scripts/baml-scaffold.sh --profile log-analysis --force
./scripts/baml-scaffold.sh --profile extraction --model gpt-5 --force
./scripts/baml-scaffold.sh --profile classify --force
./scripts/baml-scaffold.sh --profile minimal --force
Profiles:
log-analysis: streaming-friendly log parsing schema/functionsextraction: structured resume extraction scaffoldclassify: category classification scaffoldminimal: tiny starter scaffold
Notes:
- The scaffold writes
generators.bamlwith aversionmatching your installedbaml-cli(fallback0.219.0).
Equivalent mise tasks:
mise run baml-generate
mise run baml-scaffold # default BAML_PROFILE=log-analysis
BAML_PROFILE=classify mise run baml-scaffold
mise run baml-test
mise run baml-serve
mise run baml-dev
mise run baml-stream-sample
Runtime logging defaults:
BAML_LOG=infoBOUNDARY_MAX_LOG_CHUNK_CHARS=3000
You can override per run:
BAML_LOG=debug BOUNDARY_MAX_LOG_CHUNK_CHARS=1000 \
./scripts/baml-log-lab.sh stream-file ./samples/auth-db-failure.log
Notes:
- BAML streaming and REST/OpenAPI interfaces are preview features.
- Use BAML version
>=0.55for this flow. dev --previewexposes:- health route:
http://127.0.0.1:2024/_debug/ping - docs route:
http://127.0.0.1:2024/docs
- health route:
Environment variables
OPENAI_API_KEY(required): used bybaml_src/clients.bamlviaenv.OPENAI_API_KEYBOUNDARY_API_KEY(optional): enables Boundary Studio traces/logsBAML_LOG(optional, defaultinfo)BOUNDARY_MAX_LOG_CHUNK_CHARS(optional, default3000)
Setup:
cp .env.example .env
# fill OPENAI_API_KEY and optional BOUNDARY_API_KEY
scripts/baml-log-lab.sh auto-loads ./.env if present and fails fast if OPENAI_API_KEY is missing.
Claude Desktop MCP config example
{
"mcpServers": {
"personal": {
"command": "/Users/rentamac/dev/personal-mcp/target/release/personal-mcp",
"env": {
"MCP_CTX_DIR": "/Users/rentamac/.ctx"
}
}
}
}
Dependencies
| ID | Version |
|---|---|
| anyhow | ^1.0 |
| bytes | ^1 |
| claude-agent-sdk-rs | ^0.6.4 |
| hostname | ^0.4 |
| llm | ^1.3.7 |
| progenitor-client | ^0.13 |
| reqwest | ^0.13 |
| rmcp | ^0.16 |
| serde | ^1.0 |
| serde_json | ^1.0 |
| shlex | ^1 |
| tokio | ^1.48 |
| openapiv3 | ^2 |
| prettyplease | ^0.2 |
| progenitor | ^0.13 |
| serde_yaml | ^0.9 |
| syn | ^2 |
Details
2026-05-31 14:29:22 -05:00
Assets (1)
Versions (1)
View all
Cargo
1
67 KiB
personal-mcp-0.1.0.crate
67 KiB
0.1.0
2026-05-31