Skip to content

Commit 1493056

Browse files
authored
Merge pull request #12 from RadCod3/feat/add-stdio-template
Add stdio mcp examples to template
2 parents 87cbbd1 + 2f095ba commit 1493056

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

templates/agent_template.afm.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,14 @@ interfaces:
8282
# ============================================================================
8383
tools:
8484
mcp:
85+
# --------------------------------------------------------------------------
86+
# HTTP Transport Examples
87+
# --------------------------------------------------------------------------
88+
8589
# MCP Server with bearer authentication
8690
- name: "github_mcp_server"
8791
transport:
88-
type: "http" # Only "http" is currently supported
92+
type: "http"
8993
url: "${env:GITHUB_MCP_URL}"
9094
authentication:
9195
type: "bearer"
@@ -116,6 +120,41 @@ tools:
116120
transport:
117121
type: "http"
118122
url: "https://public-mcp.example.com"
123+
124+
# --------------------------------------------------------------------------
125+
# stdio Transport Examples
126+
# --------------------------------------------------------------------------
127+
# NOTE: stdio transport is currently only supported in the LangChain-based
128+
# interpreter for AFM
129+
130+
# MCP Server via npx package
131+
- name: "filesystem_server"
132+
transport:
133+
type: "stdio"
134+
command: "npx"
135+
args:
136+
- "-y"
137+
- "@modelcontextprotocol/server-filesystem"
138+
- "${env:ALLOWED_DIRECTORY}"
139+
tool_filter:
140+
deny:
141+
- "write_file"
142+
- "edit_file"
143+
144+
# MCP Server via Python script with environment variables
145+
- name: "local_db_tool"
146+
transport:
147+
type: "stdio"
148+
command: "python"
149+
args:
150+
- "server.py"
151+
env:
152+
DB_PATH: "./data.db"
153+
API_KEY: "${env:LOCAL_DB_API_KEY}"
154+
tool_filter:
155+
allow:
156+
- "query"
157+
- "search"
119158
---
120159

121160
# Role

0 commit comments

Comments
 (0)