Skip to content

Add Xquik MCP discovery sample - #126

Open
kriptoburak wants to merge 2 commits into
agentscope-ai:mainfrom
kriptoburak:codex/add-xquik-mcp-discovery-sample
Open

Add Xquik MCP discovery sample#126
kriptoburak wants to merge 2 commits into
agentscope-ai:mainfrom
kriptoburak:codex/add-xquik-mcp-discovery-sample

Conversation

@kriptoburak

@kriptoburak kriptoburak commented Jun 19, 2026

Copy link
Copy Markdown

PR Type

  • Add new sample
  • Update existing sample
  • Add new test cases
  • Fix test failures
  • Documentation/Configuration update

Description

Closes #125.

Adds functionality/xquik_mcp_discovery, a small read-only AgentScope sample for exploring X / Twitter API routes through Xquik remote MCP server. It uses MCPClient and HttpMCPConfig, enables only the explore tool, searches current endpoint metadata, and requires no model-provider credentials.

The MCP origin is fixed to https://xquik.com/mcp. The bearer key cannot be redirected to an environment-configured host. Six offline tests cover that boundary, the read-only tool allow-list, API-key handling, default and explicit queries, JavaScript string escaping, result limits, and output conversion.


Testing Validation

  1. pre-commit run --all-files passed every repository hook, including mypy, Black, Flake8, Pylint, ESLint, Stylelint, and Prettier.
  2. python -m unittest -v functionality.xquik_mcp_discovery.test_main passed 6 offline tests.
  3. python -m py_compile passed for the package, sample, and tests.
  4. uv pip check passed with AgentScope 2.0.6 on Python 3.11.
  5. The current public MCP discovery document returned HTTP 200 and identifies https://xquik.com/mcp as the streamable HTTP endpoint. The endpoint returned 401 without authentication, as expected.

A live tool call was not run because it requires an Xquik API key. The tests make no network requests.


Checklist

  • All sample code has been formatted with pre-commit run --all-files.
  • All new tests pass.
  • Test coverage has not decreased.
  • Sample code follows AgentScope configuration and MCP patterns.
  • The root and sample documentation are updated.
  • The sample installs independently through its requirements.txt.

Security and Independence

  • Only the read-only explore tool is enabled.
  • The sample never calls the live xquik execution tool.
  • The fixed HTTPS origin prevents bearer-key forwarding to a configurable host.
  • Xquik is an independent third-party service. Not affiliated with X Corp. "Twitter" and "X" are trademarks of X Corp.

Codex assisted with the current validation and repair. I reviewed the final implementation and test evidence.

@kriptoburak
kriptoburak requested a review from a team June 19, 2026 10:19
@CLAassistant

CLAassistant commented Jun 19, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@kriptoburak
kriptoburak force-pushed the codex/add-xquik-mcp-discovery-sample branch from 121c9cc to 6c8f728 Compare August 18, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add AgentScope MCP sample for X workflow discovery

2 participants