docs: add MCP client usage examples#300
Open
JackSpiece wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #201
Summary
examples/mcp_client_usage.py, a runnable stdio MCP client that lists Agentic Security MCP tools and can call no-argument HTTP-backed tools when the app is running.docs/mcp_client_usage.md, wire it into MkDocs navigation, and link it from the README.agentic_security.mcp.clienthelper to launch the server withpython -m agentic_security.mcp.mainand list the real server tools instead of calling a nonexistentecho_tool.AGENTIC_SECURITY_URLso examples can target a non-default local app URL.Testing
python -m py_compile agentic_security/mcp/main.py agentic_security/mcp/client.py examples/mcp_client_usage.pygit diff --checkpython -m pytest tests/unit/test_mcp.py -qstops before collecting this test because this Termux checkout does not have the project dependencysklearninstalled:ModuleNotFoundError: No module named 'sklearn'.maturin) on Termux instead of using wheels, so I stopped and removed the venv to avoid wasting phone storage.Check note
Authorization required to deployfor this fork. I do not see a code failure in that check.