Skip to content

Commit 2d6870e

Browse files
committed
Package PeasyAI MCP server with ~/.peasyai/settings.json config
- Add ~/.peasyai/settings.json config system (like ~/.claude/settings.json) replacing .env for LLM provider credentials and settings - Add pyproject.toml: pip-installable package with peasyai-mcp CLI entry point - Add src/core/config.py: config loader with env var fallback - Add src/ui/mcp/entry.py: CLI with init, config, and serve sub-commands - Add .peasyai-schema.json for IDE autocomplete in settings file - Update MCP server to load config from ~/.peasyai/settings.json - Update env validation tool to check for settings.json - Update ResourceLoader to find bundled resources in installed wheels - Update README with install steps for Cursor and Claude Code - Deprecate env.template in favor of peasyai-mcp init
1 parent 3a9be61 commit 2d6870e

File tree

11 files changed

+873
-196
lines changed

11 files changed

+873
-196
lines changed

Src/PeasyAI/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
.env.local
44
.env.*.local
55

6+
# PeasyAI config (lives at ~/.peasyai/ — never in the repo)
7+
# This entry is a safety net in case someone copies it here.
8+
.peasyai/
9+
610
# Cursor MCP settings (contains local paths)
711
cursor-mcp-settings.json
812

Src/PeasyAI/.peasyai-schema.json

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "PeasyAI Settings",
4+
"description": "Configuration for the PeasyAI MCP server. Stored at ~/.peasyai/settings.json",
5+
"type": "object",
6+
"properties": {
7+
"$schema": {
8+
"type": "string"
9+
},
10+
"llm": {
11+
"type": "object",
12+
"description": "LLM provider configuration",
13+
"properties": {
14+
"provider": {
15+
"type": "string",
16+
"description": "Active LLM provider",
17+
"enum": ["snowflake", "anthropic", "bedrock"],
18+
"default": "bedrock"
19+
},
20+
"model": {
21+
"type": "string",
22+
"description": "Model name override (uses provider default if omitted)"
23+
},
24+
"timeout": {
25+
"type": "number",
26+
"description": "Request timeout in seconds",
27+
"default": 600
28+
},
29+
"providers": {
30+
"type": "object",
31+
"description": "Per-provider credentials and settings",
32+
"properties": {
33+
"snowflake": {
34+
"type": "object",
35+
"properties": {
36+
"api_key": { "type": "string", "description": "Snowflake programmatic access token" },
37+
"base_url": { "type": "string", "description": "Snowflake Cortex OpenAI-compatible endpoint" }
38+
}
39+
},
40+
"anthropic": {
41+
"type": "object",
42+
"properties": {
43+
"api_key": { "type": "string", "description": "Anthropic API key" },
44+
"model": { "type": "string", "description": "Anthropic model name", "default": "claude-3-5-sonnet-20241022" },
45+
"base_url": { "type": "string", "description": "Optional custom base URL" }
46+
}
47+
},
48+
"bedrock": {
49+
"type": "object",
50+
"properties": {
51+
"region": { "type": "string", "description": "AWS region", "default": "us-west-2" },
52+
"model_id": { "type": "string", "description": "Bedrock model ID", "default": "anthropic.claude-3-5-sonnet-20241022-v2:0" }
53+
}
54+
}
55+
}
56+
}
57+
}
58+
},
59+
"p_compiler": {
60+
"type": "object",
61+
"description": "P compiler paths (auto-detected if omitted)",
62+
"properties": {
63+
"path": { "type": ["string", "null"], "description": "Path to P compiler binary" },
64+
"dotnet_path": { "type": ["string", "null"], "description": "Path to dotnet SDK" }
65+
}
66+
},
67+
"generation": {
68+
"type": "object",
69+
"description": "Code generation defaults",
70+
"properties": {
71+
"ensemble_size": { "type": "integer", "description": "Number of candidates for best-of-N selection", "default": 3 },
72+
"output_dir": { "type": "string", "description": "Default output directory for generated projects", "default": "./PGenerated" }
73+
}
74+
}
75+
}
76+
}
77+

0 commit comments

Comments
 (0)