https://github.com/anyproto/anytype-mcp
So this repo does not have any sense now and will be set to public archieve soon
A FastAPI-based backend service for interacting with Anytype. This is a Python port of the Raycast Anytype Extension, providing RESTful API access to Anytype functionality.
- Python 3.8+
- Anytype installed and running locally
- Clone the repository:
git clone <repository-url>
cd anytype-api
- Create a virtual environment and install dependencies:
uv venv # Creates a virtual environment in .venv directory
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -e .
Development mode:
uvicorn app.main:app --reload
Production mode:
uvicorn app.main:app --host 0.0.0.0 --port 8000
Once the application is running, you can access the interactive API documentation at:
This project includes an MCP (Model Context Protocol) server implementation that exposes Anytype API operations as MCP tools, enabling integration with MCP-compatible clients.
The MCP server uses the following environment variables (should be set in .env
file):
ANYTYPE_API_URL
— Base URL of the Anytype API (e.g.,http://localhost:31009
)ANYTYPE_API_KEY
— API key for authentication
You can obtain an API key using either of these methods:
Run the included utility script:
uv run get_api_key.py
This interactive script will guide you through the process of obtaining your API key.
- Open Anytype it should be running in whole process and also should be launched whenever requests is expected
- run uv run uvicorn app.main:app --port 8081 (or other port)
- open http://localhost:8081/docs
-
- /auth/challenge will show display code and return challenge_id
- both of that goes to /auth/api_key which will return api_key
-
- paste "API Key" to
.env
file
You can run the MCP server directly:
uv run app/anytype_mcp_server.py
or inside Docker (see below).
You can build and run the application using Docker:
docker build -t anytype-api .
docker run --rm --env-file .env --network host anytype-api
This will start the API server with environment variables loaded from .env
and network mode set to host.
In target MCP client choose SSE type and http://localhost:8000/sse for endpoint
MIT License
Based on the Raycast Anytype Extension.