byaan:mcp-setup
Skill95 starsChanged 7 months agoMITView on GitHub
Configure the Byaan MCP server in AI coding assistants (Claude Code, Cursor, Codex CLI). Detects the local project, builds the correct stdio config, and installs it into the chosen tool. Only works for local/community mode — not the Mac desktop app.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- byaan:learnSkill
- byaan:startSkill
- byaan:learnSkill
- byaan:mcp-setupSkill
- byaan:startSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 9 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
If NOT_FOUND, look for clues:
- Very specific: line 26
If still not found, ask the user for the path to their Byaan project directory.
- Very specific: line 32
Check that uv is installed:
- Distinctive: line 37
If missing, tell the user:
- Distinctive: line 40
Check that the database exists (the app must have been run at least once):
- Distinctive: line 45
If the database is missing, tell the user:
- Very specific: line 51
Ask the user which AI assistant they want to connect Byaan to.
- Distinctive: line 67
No environment variables are needed for community/dev mode — the server auto-detects its database and configuration.
- Very specific: line 73
Run the following command (replace <PROJECT_ROOT> with the real path):
- Distinctive: line 90
Read the existing file (if it exists):
- Very specific: line 108
Be careful: Do NOT overwrite other existing MCP server entries.
- Distinctive: line 110
After writing, tell the user:
- Distinctive: line 117
Read the existing file:
- Very specific: line 122
Check if [mcp_servers.byaan] already exists.
- Distinctive: line 136
After configuring, test that the MCP server actually starts:
- Distinctive: line 142
If this fails, debug the error and help the user fix it before finishing.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
You are an MCP configuration assistant. Your job is to connect Byaan's MCP server to the user's AI coding assistant so they can query databases directly from their editor or terminal.
Important: This skill is for the local community/dev version of Byaan only. If the user is running the Mac desktop app (Tauri), tell them:
The Mac desktop app configures MCP through its built-in UI. Open the Byaan app and click the MCP icon to get setup instructions.
Step 1: Detect Environment
First, confirm we are in the Byaan project directory by checking for the project marker:
test -f pyproject.toml && echo "BYAAN_PROJECT_FOUND" || echo "NOT_FOUND"If NOT_FOUND, look for clues:
ls server/mcp/stdio_server.py 2>/dev/null && echo "FOUND" || echo "NOT_FOUND"If still not found, ask the user for the path to their Byaan project directory.
Set PROJECT_ROOT to the absolute path of the Byaan project root (the directory containing pyproject.toml).
Step 2: Verify Prerequisites
Check that uv is installed:
command -v uv && echo "UV_OK" || echo "UV_MISSING"If missing, tell the user:
uvis required to run the Byaan MCP server. Install it: https://docs.astral.sh/uv/
Check that the database exists (the app must have been run at least once):
test -f server/.data/app.db && echo "DB_OK" || echo "DB_MISSING"If the database is missing, tell the user:
Please run Byaan at least once to initialize the database before configuring MCP. You can start it with:
cd <PROJECT_ROOT> && make dev
Step 3: Ask User Which Tool to Configure
Ask the user which AI assistant they want to connect Byaan to. The options are:
- Claude Code - Uses
claude mcp add-jsonCLI command - Cursor - Edits
~/.cursor/mcp.jsonconfig file - Codex CLI - Edits
~/.codex/config.tomlconfig file - All of the above - Configure all three
Step 4: Build the MCP Configuration
The stdio MCP config for Byaan uses these values:
- command:
uv - args:
["--directory", "<PROJECT_ROOT>", "run", "python", "-m", "server.mcp.stdio_server"]
Replace <PROJECT_ROOT> with the actual absolute path detected in Step 1.
No environment variables are needed for community/dev mode — the server auto-detects its database and configuration.
Step 5: Install Configuration
For Claude Code
Run the following command (replace <PROJECT_ROOT> with the real path):
claude mcp add-json byaan '{"type":"stdio","command":"uv","args":["--directory","<PROJECT_ROOT>","run","python","-m","server.mcp.stdio_server"]}' --scope userAfter running, verify:
claude mcp listConfirm that byaan appears in the list.
For Cursor
The config file is ~/.cursor/mcp.json. This file may already exist with other MCP servers configured.
- Read the existing file (if it exists):
cat ~/.cursor/mcp.json 2>/dev/null || echo "{}"- Merge the Byaan config into the existing JSON. The final file should look like:
{
"mcpServers": {
...existing servers...,
"byaan": {
"command": "uv",
"args": ["--directory", "<PROJECT_ROOT>", "run", "python", "-m", "server.mcp.stdio_server"]
}
}
}Be careful: Do NOT overwrite other existing MCP server entries. Parse the existing JSON, add/update only the byaan key under mcpServers, and write back.
- After writing, tell the user:
Restart Cursor to activate the Byaan MCP server. You can use
@ask_byaanin Agent chat to query your data.
For Codex CLI
The config file is ~/.codex/config.toml.
- Read the existing file:
cat ~/.codex/config.toml 2>/dev/null || echo ""- Check if
[mcp_servers.byaan]already exists. If it does, update it. If not, append it. - The section to add/update:
[mcp_servers.byaan]
command = "uv"
args = ["--directory", "<PROJECT_ROOT>", "run", "python", "-m", "server.mcp.stdio_server"]- After writing, tell the user:
Start Codex CLI and run
/mcpto verify byaan is connected.
Step 6: Verify the Connection
After configuring, test that the MCP server actually starts:
cd <PROJECT_ROOT> && timeout 10 uv run python -c "from server.mcp.stdio_server import create_stdio_server; print('MCP server module OK')" 2>&1If this fails, debug the error and help the user fix it before finishing.
Step 7: Summary
Print a summary of what was configured:
Byaan MCP configured for: [list of tools] Project: <PROJECT_ROOT>
The MCP server connects your AI assistant directly to your local databases through Byaan. Restart your editor/tool to activate the connection.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

