diff --git a/app/en/home/build-tools/_meta.tsx b/app/en/home/build-tools/_meta.tsx index 14f07d5e8..bc3c702ec 100644 --- a/app/en/home/build-tools/_meta.tsx +++ b/app/en/home/build-tools/_meta.tsx @@ -1,5 +1,5 @@ export default { - "create-a-mcp-server": "Create a MCP Server", + "create-a-mcp-server": "Create an MCP Server", "tool-context": "Tools and Context", "create-a-tool-with-auth": "Create a tool with auth", "create-a-tool-with-secrets": "Create a tool with secrets", diff --git a/app/en/home/build-tools/create-a-mcp-server/page.mdx b/app/en/home/build-tools/create-a-mcp-server/page.mdx index 96dbfecac..4f546eec2 100644 --- a/app/en/home/build-tools/create-a-mcp-server/page.mdx +++ b/app/en/home/build-tools/create-a-mcp-server/page.mdx @@ -18,7 +18,6 @@ Build and run an MCP Server with tools that you define. -- An [Arcade account](https://api.arcade.dev/signup) - For this guide, we'll use [uv](https://docs.astral.sh/uv/getting-started/installation/) as our package manager. @@ -62,7 +61,7 @@ This generates a complete project with: - **server.py** Main server file with MCPApp and example tools - **pyproject.toml** Dependencies and project configuration -- **.env.example** Example `.env` file containing a secret required by one of the generated tools in `server.py` +- **.env.example** Example `.env` file containing a secret required by one of the generated tools in `server.py`. Environments are loaded on server start, so **if you update the `.env` file, you will need to restart your server.** `server.py` includes proper structure with command-line argument handling. It creates an `MCPApp`, defines tools with `@app.tool`, and runs with `app.run()`: @@ -103,29 +102,10 @@ if __name__ == "__main__": Run your MCP Server using one of the with the following commands in your terminal: - - - - ```bash -uv run server.py http +uv run server.py ``` -For HTTP transport, view your server's API docs at [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs). - - - - -```bash -uv run server.py stdio -``` - - - - You should see output like this in your terminal: ```bash diff --git a/app/en/home/build-tools/tool-context/page.mdx b/app/en/home/build-tools/tool-context/page.mdx index f8a48ab43..198f92657 100644 --- a/app/en/home/build-tools/tool-context/page.mdx +++ b/app/en/home/build-tools/tool-context/page.mdx @@ -39,7 +39,9 @@ Let's walk through an example (or skip to [the full code](#example-code)). ### Logging -Send log messages at different levels using the `log` attribute of the `Context` object: +[Logging in MCP](https://modelcontextprotocol.io/specification/2025-06-18/server/utilities/logging) provides a standardized channel for servers to emit structured, leveled messages to clients. Logging is useful for observability, debugging, and user feedback during tool execution. + +You can send log messages at different levels using the `log` attribute of the `Context` object like this: ```python await context.log.debug("Debug message") @@ -228,7 +230,7 @@ async def process_with_progress( return results -# The Context provides at runtime (via TDK wrapper): +# The Context provides at runtime: # - context.user_id: ID of the user making the request # - context.get_secret(key): Retrieve a secret value (raises if missing) # - context.log.(msg): Send log messages to the client (debug/info/warning/error)