{"$schema":"https://wellknown.network/schemas/agent-record-v1.json","schemaVersion":"1","id":"ag_vz9skyqsqge2","handle":"mcp-codemode","url":"https://wellknown.network/agents/mcp-codemode","links":{"self":"https://wellknown.network/agents/mcp-codemode/record.json","html":"https://wellknown.network/agents/mcp-codemode","markdown":"https://wellknown.network/agents/mcp-codemode/record.md","api":"https://wellknown.network/api/v1/agents/mcp-codemode","status":"https://wellknown.network/api/v1/agents/mcp-codemode/status","claim":"https://wellknown.network/agents/mcp-codemode/claim","claimApi":"https://wellknown.network/api/v1/claims","claimDescriptor":"https://wellknown.network/agents/mcp-codemode/claim.json","badge":"https://wellknown.network/agents/mcp-codemode/badge.svg","openapi":"https://wellknown.network/openapi.json","history":"https://wellknown.network/api/v1/agents/mcp-codemode/history","tools":"https://wellknown.network/api/v1/agents/mcp-codemode/tools"},"ard":{"identifier":"urn:air::server:mcp-codemode","type":"application/mcp-server-card+json"},"kind":"mcp_server","declared":{"name":"mcp-codemode","summary":null,"description":"<!--\n  ~ Copyright (c) 2025-2026 Datalayer, Inc.\n  ~\n  ~ BSD 3-Clause License\n-->\n\n[![Datalayer](https://assets.datalayer.tech/datalayer-25.svg)](https://datalayer.io)\n\n[![Become a Sponsor](https://img.shields.io/static/v1?label=Become%20a%20Sponsor&message=%E2%9D%A4&logo=GitHub&style=flat&color=1ABC9C)](https://github.com/sponsors/datalayer)\n\n# 🔧 MCP Codemode\n\n[![PyPI - Version](https://img.shields.io/pypi/v/mcp-codemode)](https://pypi.org/project/mcp-codemode)\n\n**Code Mode for MCP Tools**: Programmatically call and compose MCP tools through code execution instead of individual LLM tool calls.\n\n## Overview\n\nMCP Codemode enables a \"Code Mode\" pattern where AI agents write Python code that orchestrates multiple MCP tool calls, rather than making individual tool calls through LLM inference. This approach is:\n\n- **More efficient**: Reduce LLM calls for multi-step operations\n- **More reliable**: Use try/except for robust error handling\n- **More powerful**: Parallel execution with asyncio, loops, conditionals\n- **More composable**: Save reusable patterns as skills\n\n## Configuration highlights\n\n- **Direct tool calls**: `allow_direct_tool_calls` (default: false). When false, `call_tool` is hidden and all execution flows through `execute_code`.\n- **Tool listing filters**: `list_tool_names` accepts `server`, `keywords`, and `limit` for fast, filtered discovery.\n- **Search rerank hook**: Provide an optional `tool_reranker` callable to reorder search results before they are returned (e.g., LLM-based rerankers). Falls back to registry order when not provided.\n- **Execution language**: `execute_code` runs Python inside the configured sandbox; import bindings from `generated.servers.<server_name>`.\n- **Safety cap**: `max_tool_calls` can limit the number of tool invocations per `execute_code` run.\n- **Tool examples**: tool discovery and details include `output_schema` and `input_examples` to improve parameter accuracy.\n- **Deferred tools**: tools may be marked `defer_loading` by…","publisher":null,"homepage":"https://github.com/datalayer/mcp-codemode","repository":"https://github.com/datalayer/mcp-codemode","version":"0.0.4","license":"BSD 3-Clause License\n        \n        Copyright (c) 2025, Datal…","protocols":["mcp"],"tags":["ai","jupyter","mcp","model","context","protocol"],"pricing":null,"endpoints":[{"url":"pypi:mcp-codemode","type":"package_pypi","auth":null,"probeable":false}],"skills":null,"tools":null,"extra":null,"attribution":{"kind":"pypi","name":"pypi","license":"pypi","repoUrl":"pypi","version":"pypi","description":"pypi","homepageUrl":"pypi"}},"derived":{"capabilities":[{"slug":"code.execution","name":"Code Execution","confidence":1,"provenance":"declared"}],"categories":["code"],"language":"en"},"observed":{"status":"unknown","statusReason":"Distributed as a package to run locally; no network endpoint to check.","lastOkAt":null,"lastProbedAt":null,"statusComputedAt":null,"reliability30d":null,"latestObservations":[],"tools":null,"package":{"name":"mcp-codemode","registry":"pypi","observedAt":"2026-10-28T10:24:28.713Z","publishedAt":"2026-01-20T13:16:09.661513Z","latestVersion":"0.0.4"},"toolSurface":null,"endpointFacts":[]},"verification":{"claimed":false,"claimedAt":null,"proofs":[]},"provenance":{"sources":[{"source":"pypi","key":"mcp-codemode","url":"https://pypi.org/project/mcp-codemode/","firstSeenAt":"2026-09-10T01:19:22.777Z","fetchedAt":"2026-10-28T10:23:27.993Z","normalizedAt":"2026-10-28T10:23:27.993Z"}]},"firstSeenAt":"2026-09-10T01:19:22.777Z","updatedAt":"2026-10-28T10:24:28.713Z"}