---
title: mcp | CodeWeaver Docs
description: API reference for codeweaver.server.mcp
url: "https://docs.knitli.com/api/server/mcp"
type: static
generatedAt: "2026-04-17T17:21:09.831Z"
---

# mcp
       [Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2F.%20I%20want%20to%20ask%20questions%20about%20it.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2F.%20I%20want%20to%20ask%20questions%20about%20it.)[View in Markdown](/codeweaver/api/server/mcp.md)       [Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2F)[Share on X](https://x.com/intent/tweet?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2F&text=mcp)[Share on Threads](https://threads.net/intent/post?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2F&text=mcp)[Share on Bluesky](https://bsky.app/intent/compose?text=mcp%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2F)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2F)[Share on Reddit](https://reddit.com/submit?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2F&title=mcp)[Share on Hacker News](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2F&t=mcp)[Share on Email](mailto:?subject=mcp&body=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2F)[Share on WhatsApp](https://wa.me/?text=mcp%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2F)[Share on Telegram](https://t.me/share/url?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2F&text=mcp)
# `codeweaver.server.mcp`
[Section titled “codeweaver.server.mcp”](#codeweaverservermcp)
FastMCP Server Creation and Lifespan Management for CodeWeaver.

## Which Find_Code Tool?
[Section titled “Which Find_Code Tool?”](#which-find_code-tool)
There are *three* symbols named “find_code” in CodeWeaver, two in this package:

 - `find_code_tool`: The actual implementation function of the tool. This version is really a wrapper around the real `find_code` function defined in `codeweaver.agent_api`. `find_code_tool` is defined here in `codeweaver.server.mcp.user_agent` because it’s the part exposed as an MCP tool for user’s agents to call.
 - `find_code_tool_definition`: The MCP `Tool` definition for the `find_code` tool. This is defined in `codeweaver.server.mcp.tools` as part of the `TOOL_DEFINITIONS` dictionary. This is what gets registered with the MCP server.
 - `find_code`: The actual implementation function of the `find_code` logic, defined in `codeweaver.agent_api`. This is the core logic that does the code searching. If a user uses the `search` command in CodeWeaver’s CLI, this `find_code` function is what gets called under the hood.