Skip to content

Commit c1882d4

Browse files
committed
refactor: major architecture overhaul and hybrid http+sse
1 parent 6ec1f47 commit c1882d4

36 files changed

+6430
-1486
lines changed

.env.example

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Kite MCP Server Environment Configuration
2+
# ---------------------------------------
3+
# This file contains all environment variables used by the Kite MCP Server.
4+
# Copy this file to ".env" and update with your actual values.
5+
6+
# Required Kite Connect API credentials
7+
# Register at https://developers.kite.trade/signup to obtain these
8+
KITE_API_KEY=your_api_key_here
9+
KITE_API_SECRET=your_api_secret_here
10+
11+
# Server configuration (optional - defaults shown)
12+
# ------------------------------------------------
13+
# APP_MODE: The communication mode for the server
14+
# - stdio: Standard input/output (best for Claude Desktop)
15+
# - http: HTTP mode (RESTful API) - default
16+
# - sse: Server-Sent Events over HTTP (best for web clients)
17+
# - hybrid: Combined mode with both SSE and MCP endpoints
18+
APP_MODE=http
19+
20+
# Server network settings (only used in http, sse, and hybrid modes)
21+
APP_PORT=8080 # Port to listen on (default: 8080)
22+
APP_HOST=localhost # Host to bind to (use 0.0.0.0 for all interfaces)
23+
24+
# Tool exclusion (optional)
25+
# -------------------------
26+
# EXCLUDED_TOOLS: Comma-separated list of tools to exclude from registration
27+
# - Useful for creating read-only instances or removing destructive operations
28+
# - Example: place_order,modify_order,cancel_order (excludes all order operations)
29+
# - Example: place_gtt_order,modify_gtt_order,delete_gtt_order (excludes GTT operations)
30+
# - Leave empty to enable all tools
31+
# EXCLUDED_TOOLS=place_order,modify_order,cancel_order
32+
33+
# Logging configuration (optional)
34+
# --------------------------------
35+
# LOG_LEVEL: Controls verbosity of logs
36+
# - debug: Verbose output for development
37+
# - info: Normal operational logs (default)
38+
# - warn: Only warning and error logs
39+
# - error: Only error logs
40+
LOG_LEVEL=info

.envrc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
1-
use flake
1+
# Minimal direnv configuration to reduce verbose output
2+
export NIXPKGS_ALLOW_DIRTY=1
23
dotenv_if_exists .env
4+
5+
# Silence direnv output as much as possible
6+
export DIRENV_WARN_TIMEOUT=0
7+
log_status() { :; }
8+
9+
use flake

.gitignore

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,83 @@
1+
# Environment files
12
.env
2-
oldpy
3-
instruments.json
3+
.env.local
4+
.env.*.local
5+
6+
# Go build artifacts
7+
*.exe
8+
*.exe~
9+
*.dll
10+
*.so
11+
*.dylib
412
*.bin
13+
kite-mcp-server
14+
main
15+
16+
# Go test files
17+
*.test
18+
*.prof
19+
coverage.out
20+
coverage.html
21+
22+
# Go module cache
23+
go.sum.backup
24+
25+
# Temporary files
26+
*.tmp
27+
*.temp
28+
*.log
29+
*.pid
30+
*.lock
31+
32+
# OS generated files
33+
.DS_Store
34+
.DS_Store?
35+
._*
36+
.Spotlight-V100
37+
.Trashes
38+
ehthumbs.db
39+
Thumbs.db
40+
41+
# IDE and editor files
42+
.vscode/
43+
.idea/
44+
*.swp
45+
*.swo
46+
*~
47+
.project
48+
.settings/
49+
*.sublime-project
50+
*.sublime-workspace
51+
552
# Nix specific
653
.direnv/
754
result
855
result-*
56+
57+
# Just cache
58+
.just/
59+
60+
# Build directories
61+
build/
62+
dist/
63+
target/
64+
65+
# Documentation build artifacts
66+
67+
# Local data files
68+
instruments.json
69+
*.csv
70+
*.xlsx
71+
72+
# Legacy/old files
73+
oldpy/
74+
75+
# Runtime files
76+
*.pid
77+
*.sock
78+
79+
# Test binaries and artifacts
80+
test-binary
81+
kite-mcp-server-*
82+
83+
.memory

0 commit comments

Comments
 (0)