-
Notifications
You must be signed in to change notification settings - Fork 2
Add stdio mcp tool support to python-interpreter #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
3f21bd9
9c91c63
8747ee4
d6df1f7
ef6fcc3
e4d9f98
3d2a904
9c6cb40
1f54865
0595c90
09b8d89
3797e6c
edb2674
67b823a
4ad4e7b
d5d5cb3
80d241f
9791b82
4e242bc
4dc533a
49c15ed
7f3763b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,7 @@ | |
| from .exceptions import AFMValidationError, VariableResolutionError | ||
| from .models import ( | ||
| ConsoleChatInterface, | ||
| HttpTransport, | ||
| WebChatInterface, | ||
| WebhookInterface, | ||
| ) | ||
|
|
@@ -178,10 +179,14 @@ def validate_http_variables(afm_record: AFMRecord) -> None: | |
| for server in metadata.tools.mcp: | ||
| if contains_http_variable(server.name): | ||
| errored_fields.append("tools.mcp.name") | ||
| if contains_http_variable(server.transport.url): | ||
| errored_fields.append("tools.mcp.transport.url") | ||
| if _authentication_contains_http_variable(server.transport.authentication): | ||
| errored_fields.append("tools.mcp.transport.authentication") | ||
| # HTTP transport fields: url and authentication | ||
|
||
| if isinstance(server.transport, HttpTransport): | ||
| if contains_http_variable(server.transport.url): | ||
| errored_fields.append("tools.mcp.transport.url") | ||
| if _authentication_contains_http_variable( | ||
| server.transport.authentication | ||
| ): | ||
|
||
| errored_fields.append("tools.mcp.transport.authentication") | ||
| if _tool_filter_contains_http_variable(server.tool_filter): | ||
| errored_fields.append("tools.mcp.tool_filter") | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| --- | ||
| spec_version: '0.3.0' | ||
| name: "StdioMcpAgent" | ||
| description: "A test agent with stdio MCP tools." | ||
| version: "1.0.0" | ||
| tools: | ||
| mcp: | ||
| - name: "filesystem_server" | ||
| transport: | ||
| type: stdio | ||
| command: "npx" | ||
| args: | ||
| - "-y" | ||
| - "@modelcontextprotocol/server-filesystem" | ||
| - "/tmp" | ||
| - name: "local_db_tool" | ||
| transport: | ||
| type: stdio | ||
| command: "python" | ||
| args: | ||
| - "server.py" | ||
| env: | ||
| DB_PATH: "./data.db" | ||
| API_KEY: "dummy-key" | ||
| tool_filter: | ||
| allow: | ||
| - "query" | ||
| - "search" | ||
| deny: | ||
| - "delete" | ||
| --- | ||
| # Role | ||
| You are a file system and database assistant. | ||
|
|
||
| # Instructions | ||
| Use the available stdio tools to interact with the file system and database. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change this variable name now that we have two variants of the Docker image, include a "full" one :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 49c15ed