Skip to content

feat(mcp): add AI/ML API preset - #311

Open
Lookoff-AIMLAPI wants to merge 1 commit into
HKUDS:mainfrom
aimlapi:feat/aimlapi-mcp
Open

Lookoff-AIMLAPI wants to merge 1 commit into
HKUDS:mainfrom
aimlapi:feat/aimlapi-mcp

Conversation

@Lookoff-AIMLAPI

Copy link
Copy Markdown

Description

Adds AI/ML API to the bundled MCP preset catalog. It is a hosted streamable HTTP server at https://mcp.aimlapi.com/mcp with nothing to install. The preset uses OAuth, in the same shape as the Notion, Linear and Xmind presets. After deepcode mcp add aimlapi, the user runs deepcode mcp login aimlapi (or Authenticate in Desktop), then tests and enables it as usual.

The server offers model discovery and comparison, account balance and usage, and inference: chat, embeddings, image, video, audio, speech, transcription and OCR. It also offers Agent Tools such as web search and page extraction. Model calls (chat, embeddings, image, video, audio, speech, OCR), tools_run and the two ranked searches (jev_model_search, jev_tool_search, about $0.002 each) are billed to the user's AI/ML API balance; catalog, account and job-status tools are free.

Related Issues

None. This is a one-entry catalog addition; CONTRIBUTING asks for an issue first only for larger changes. Happy to open one if you prefer.

Changes Made

  • core/mcp/presets.json: one new preset, aimlapi (category: api, auth: oauth, approvalMode: writes), placed after postman.
  • Tests: the bundled preset count goes from 16 to 17 in test_mcp_cli.py, test_management_services.py, test_runtime_probe.py and test_server.py.
  • docs/integrations/MCP.md: AI/ML API added to the list of bundled presets.

The server also accepts Authorization: Bearer <API key>. I did not add that to the preset because McpServerDefinition rejects auth: oauth together with a bearer token, and a bearerTokenEnvVar would not show up in requiredEnvironment / missing_env_keys. Users who prefer a key can add a custom server with bearerTokenEnvVar.

The server answers MCP initialize (serverInfo aimlapi-mcp 0.0.1, protocol 2025-06-18). Without credentials it returns 401 with WWW-Authenticate: Bearer resource_metadata="https://mcp.aimlapi.com/.well-known/oauth-protected-resource/mcp". The authorization server (https://auth.aimlapi.com/mcp-oauth) supports dynamic client registration, PKCE S256 and public clients.

Checklist

  • Changes tested locally
  • Code reviewed
  • Documentation updated (if necessary)
  • Unit tests added (if applicable): no new behaviour; existing count assertions updated

Additional Notes

Tests: the MCP and preset subset (tests/test_mcp_cli.py, tests/application/test_management_services.py, tests/app_server/test_runtime_probe.py, tests/app_server/test_server.py, tests/app_server/test_preset_methods.py, tests/test_mcp_*.py, tests/test_agent_runtime_mcp_env.py, tests/test_bundled_mcp_optional_args.py) gives 91 passed on main and 91 passed on this branch. Re-checked on 2026-11-18 with the branch merged locally onto current main (46 commits ahead, no conflicts): the four preset-count test files give 58 passed. pre-commit run --all-files passes.

The preset catalog records Nanobot as its source. This entry is DeepCode-only. If you would rather keep the catalog identical to Nanobot's, I can propose the same entry there instead.

I left CHANGELOG.md alone because its entries are dated release notes. Tell me if you want a line added.

Hosted streamable HTTP server at https://mcp.aimlapi.com/mcp, signed in with OAuth like the Notion, Linear and Xmind presets. Bumps the bundled preset count in tests and lists the preset in the MCP guide.

This branch has not been deployed

No deployments
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.

1 participant